latham
2011-05-25 f99b37f56dad8e3a1f844f8d3b33ee1ba4b86d62
interface/lib/classes/remoting.inc.php
@@ -2139,6 +2139,8 @@
      
      $app->db->query($sql);
      
      $app->plugin->raiseEvent('client:client:on_after_insert',$this);
      if($app->db->errorMessage != '') {
         $this->server->fault('database_error', $app->db->errorMessage . ' '.$sql);
         return false;
@@ -2450,24 +2452,29 @@
         return false;
        }
    }
    /**
    * Fetch the mail_domain record for the provided domain.
    * @param int session_id
    * @param string the fully qualified domain (or subdomain)
    * @return array array of arrays corresponding to the mail_domain table's records
    * @author till, benlake
    */
   public function mail_domain_get_by_domain($session_id, $domain) {
        global $app;
        if(!$this->checkPerm($session_id, 'mail_domain_get_by_domain')) {
         $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }        
        if (!empty($domain_id)) {
        if (!empty($domain)) {
           $domain         = $app->db->quote($domain);           
           $sql            = "SELECT * FROM mail_domain WHERE domain = $domain";
           $sql            = "SELECT * FROM mail_domain WHERE domain = '$domain'";
           $result         = $app->db->queryAllRecords($sql);
           return          $result;
        }
        return false;
    }
   /**
      * Get a list of functions
      * @param    int      session id
@@ -2536,7 +2543,23 @@
        return false;
    }
    
   /**
    *    Get all dns records for a zone
    *   @param    int      session id
    *   @param    int      dns zone id
    *   @author   Sebastian Mogilowski <sebastian@mogilowski.net> 2011
    */
   public function dns_rr_get_all_by_zone($session_id, $zone_id) {
      global $app;
      if(!$this->checkPerm($session_id, 'dns_zone_get')) {
          $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
      }
        $sql    = "SELECT * FROM dns_rr WHERE zone = ".intval($zone_id);;
      $result = $app->db->queryAllRecords($sql);
        return $result;
   }
   /**
    * Changes DNS zone status 
    *   @param    int      session id