Skip to content

Commit 664f54f

Browse files
author
mcramer
committed
Bugfix: Database creation through remoting api failed
1 parent 54f1581 commit 664f54f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,8 @@ public function sites_database_get($session_id, $primary_id)
12551255
//* Add a record
12561256
public function sites_database_add($session_id, $client_id, $params)
12571257
{
1258+
global $app;
1259+
12581260
if(!$this->checkPerm($session_id, 'sites_database_add')) {
12591261
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
12601262
return false;
@@ -1277,6 +1279,8 @@ public function sites_database_add($session_id, $client_id, $params)
12771279
//* Update a record
12781280
public function sites_database_update($session_id, $client_id, $primary_id, $params)
12791281
{
1282+
global $app;
1283+
12801284
if(!$this->checkPerm($session_id, 'sites_database_update')) {
12811285
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
12821286
return false;
@@ -1298,6 +1302,7 @@ public function sites_database_update($session_id, $client_id, $primary_id, $par
12981302
//* Delete a record
12991303
public function sites_database_delete($session_id, $primary_id)
13001304
{
1305+
global $app;
13011306
if(!$this->checkPerm($session_id, 'sites_database_delete')) {
13021307
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
13031308
return false;

interface/lib/classes/tform.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function getHTML($record, $tab, $action = 'NEW') {
400400
$selected = ($k == $val)?' SELECTED':'';
401401
if(!empty($this->wordbook[$v]))
402402
$v = $this->wordbook[$v];
403-
$out .= "<option value='$k'$selected>$v</option>\r\n";
403+
$out .= "<option value='$k'$selected>".$this->lng($v)."</option>\r\n";
404404
}
405405
}
406406
$new_record[$key] = $out;

interface/web/sites/form/database.tform.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
'keyfield'=> 'domain_id',
8484
'valuefield'=> 'domain'
8585
),
86-
'value' => array('0' => $app->tform->lng('select_site_txt'))
86+
'value' => array('0' => 'select_site_txt')
8787
),
8888
'type' => array (
8989
'datatype' => 'VARCHAR',
@@ -115,7 +115,7 @@
115115
'keyfield'=> 'database_user_id',
116116
'valuefield'=> 'database_user'
117117
),
118-
'value' => array('0' => $app->tform->lng('select_dbuser_txt'))
118+
'value' => array('0' => 'select_dbuser_txt')
119119
),
120120
'database_ro_user_id' => array (
121121
'datatype' => 'INTEGER',
@@ -126,7 +126,7 @@
126126
'keyfield'=> 'database_user_id',
127127
'valuefield'=> 'database_user'
128128
),
129-
'value' => array('0' => $app->tform->lng('no_dbuser_txt'))
129+
'value' => array('0' => 'no_dbuser_txt')
130130
),
131131
'database_charset' => array (
132132
'datatype' => 'VARCHAR',

0 commit comments

Comments
 (0)