tbrehm
2009-09-17 a8dc8ba685061f5821b508710233cdf78d158fab
Fixed bugs in remoting Library. Many thanks to Horfic!
2 files modified
48 ■■■■■ changed files
interface/lib/classes/remoting.inc.php 46 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remoting_lib.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php
@@ -211,6 +211,52 @@
        $affected_rows = $this->deleteQuery('../mail/form/mail_user.tform.php',$domain_id);
        return $affected_rows;
    }
    //* Get mail user filter details
    public function mail_user_filter_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'mail_user_filter_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../mail/form/mail_user_filter.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    public function mail_user_filter_add($session_id, $client_id, $params)
    {
        if (!$this->checkPerm($session_id, 'mail_user_filter_add')){
            $this->server->fault('permission_denied','You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->insertQuery('../mail/form/mail_user_filter.tform.php', $client_id, $params);
        return $affected_rows;
    }
    public function mail_user_filter_update($session_id, $client_id, $primary_id, $params)
    {
        if (!$this->checkPerm($session_id, 'mail_user_filter_update'))
        {
            $this->server->fault('permission_denied','You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../mail/form/mail_user_filter.tform.php', $client_id, $primary_id, $params);
        return $affected_rows;
    }
    public function mail_user_filter_delete($session_id,$domain_id)
    {
        if (!$this->checkPerm($session_id, 'mail_user_filter_delete'))
        {
            $this->server->fault('permission_denied','You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../mail/form/mail_user_filter.tform.php',$domain_id);
        return $affected_rows;
    }
    //* Get alias details
    public function mail_alias_get($session_id, $primary_id)
interface/lib/classes/remoting_lib.inc.php
@@ -615,7 +615,7 @@
                }
                $sql_where = substr($sql_where,0,-5);
                $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$sql_where;
                return $app->db->queryOneRecord($sql);
                return $app->db->queryAllRecords($sql);
            } else {
                $this->errorMessage = 'The ID must be either an integer or an array.';
                return array();