mcramer
2012-09-12 664f54f60f1bdb1494801cc674b7bc6b60864db2
Bugfix: Database creation through remoting api failed

3 files modified
13 ■■■■■ changed files
interface/lib/classes/remoting.inc.php 5 ●●●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/form/database.tform.php 6 ●●●● patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php
@@ -1255,6 +1255,8 @@
    //* Add a record
    public function sites_database_add($session_id, $client_id, $params)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_database_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
@@ -1277,6 +1279,8 @@
    //* Update a record
    public function sites_database_update($session_id, $client_id, $primary_id, $params)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_database_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
@@ -1298,6 +1302,7 @@
    //* Delete a record
    public function sites_database_delete($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_database_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
interface/lib/classes/tform.inc.php
@@ -400,7 +400,7 @@
                                                                $selected = ($k == $val)?' SELECTED':'';
                                                                if(!empty($this->wordbook[$v]))
                                                                    $v = $this->wordbook[$v];
                                                                $out .= "<option value='$k'$selected>$v</option>\r\n";
                                                                $out .= "<option value='$k'$selected>".$this->lng($v)."</option>\r\n";
                                                        }
                                                }
                                                $new_record[$key] = $out;
interface/web/sites/form/database.tform.php
@@ -83,7 +83,7 @@
                                        'keyfield'=> 'domain_id',
                                        'valuefield'=> 'domain'
                                     ),
            'value'        => array('0' => $app->tform->lng('select_site_txt'))
            'value'        => array('0' => 'select_site_txt')
        ),
        'type' => array (
            'datatype'    => 'VARCHAR',
@@ -115,7 +115,7 @@
                                        'keyfield'=> 'database_user_id',
                                        'valuefield'=> 'database_user'
                                     ),
            'value'        => array('0' => $app->tform->lng('select_dbuser_txt'))
            'value'        => array('0' => 'select_dbuser_txt')
        ),
        'database_ro_user_id' => array (
            'datatype'    => 'INTEGER',
@@ -126,7 +126,7 @@
                                        'keyfield'=> 'database_user_id',
                                        'valuefield'=> 'database_user'
                                     ),
            'value'        => array('0' => $app->tform->lng('no_dbuser_txt'))
            'value'        => array('0' => 'no_dbuser_txt')
        ),
        'database_charset' => array (
            'datatype'    => 'VARCHAR',