Skip to content

Commit cedad16

Browse files
author
Till Brehm
committed
Merge branch 'master' into 'master'
fixes for the SOAP interface correcting a typo and the backticks of columns in queries See merge request !233
2 parents 9f557dd + 6fe4103 commit cedad16

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function login($username, $password, $client_login = false)
9090
}
9191

9292
//* Delete old remoting sessions
93-
$sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMSTAMP()";
93+
$sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMESTAMP()";
9494
$app->db->query($sql);
9595

9696
if($client_login == true) {
@@ -231,7 +231,7 @@ protected function klientadd($formdef_file, $reseller_id, $params)
231231

232232
/* copied from the client_edit php */
233233
exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""');
234-
$app->db->query("UPDATE client SET created_at = UNIX_TIMSTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id);
234+
$app->db->query("UPDATE client SET created_at = UNIX_TIMESTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id);
235235
exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub');
236236

237237

@@ -475,7 +475,7 @@ protected function getSession($session_id)
475475
return false;
476476
}
477477

478-
$sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMSTAMP()";
478+
$sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMESTAMP()";
479479
$session = $app->db->queryOneRecord($sql, $session_id);
480480
if($session['remote_userid'] > 0) {
481481
return $session;

interface/lib/classes/remoting_lib.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ function getDataRecord($primary_id) {
243243
if($key == '#OFFSET#') $sql_offset = $app->functions->intval($val);
244244
elseif($key == '#LIMIT#') $sql_limit = $app->functions->intval($val);
245245
elseif(stristr($val, '%')) {
246-
$sql_where .= "? like ? AND ";
246+
$sql_where .= "?? like ? AND ";
247247
} else {
248-
$sql_where .= "? = ? AND ";
248+
$sql_where .= "?? = ? AND ";
249249
}
250250
$params[] = $key;
251251
$params[] = $val;

0 commit comments

Comments
 (0)