Skip to content
Snippets Groups Projects
Commit b9ce1a88 authored by xaver's avatar xaver
Browse files

PHP 5.4 fixes for Notice Errors

parent 4a32aada
No related branches found
No related tags found
No related merge requests found
...@@ -267,6 +267,8 @@ class listform_actions { ...@@ -267,6 +267,8 @@ class listform_actions {
$limits = array('5'=>'5','15'=>'15','25'=>'25','50'=>'50','100'=>'100','999999999' => 'all'); $limits = array('5'=>'5','15'=>'15','25'=>'25','50'=>'50','100'=>'100','999999999' => 'all');
//* create options and set selected, if default -> 15 is selected //* create options and set selected, if default -> 15 is selected
$options = '';
foreach($limits as $key => $val){ foreach($limits as $key => $val){
$options .= '<option value="'.$key.'" '.(isset($_SESSION['search']['limit']) && $_SESSION['search']['limit'] == $key ? 'selected="selected"':'' ).(!isset($_SESSION['search']['limit']) && $key == '15' ? 'selected="selected"':'').'>'.$val.'</option>'; $options .= '<option value="'.$key.'" '.(isset($_SESSION['search']['limit']) && $_SESSION['search']['limit'] == $key ? 'selected="selected"':'' ).(!isset($_SESSION['search']['limit']) && $key == '15' ? 'selected="selected"':'').'>'.$val.'</option>';
} }
......
...@@ -142,7 +142,7 @@ class page_action extends tform_actions { ...@@ -142,7 +142,7 @@ class page_action extends tform_actions {
$username = $app->db->quote($this->dataRecord["username"]); $username = $app->db->quote($this->dataRecord["username"]);
$password = $app->db->quote($this->dataRecord["password"]); $password = $app->db->quote($this->dataRecord["password"]);
$modules = $conf['interface_modules_enabled']; $modules = $conf['interface_modules_enabled'];
if($this->dataRecord["limit_client"] > 0) $modules .= ',client'; if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] > 0) $modules .= ',client';
$startmodule = (stristr($modules,'dashboard'))?'dashboard':'client'; $startmodule = (stristr($modules,'dashboard'))?'dashboard':'client';
$usertheme = $app->db->quote($this->dataRecord["usertheme"]); $usertheme = $app->db->quote($this->dataRecord["usertheme"]);
$type = 'user'; $type = 'user';
...@@ -194,9 +194,8 @@ class page_action extends tform_actions { ...@@ -194,9 +194,8 @@ class page_action extends tform_actions {
*/ */
function onAfterUpdate() { function onAfterUpdate() {
global $app; global $app;
// username changed // username changed
if($conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
$username = $app->db->quote($this->dataRecord["username"]); $username = $app->db->quote($this->dataRecord["username"]);
$client_id = $this->id; $client_id = $this->id;
$sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id"; $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";
...@@ -208,7 +207,7 @@ class page_action extends tform_actions { ...@@ -208,7 +207,7 @@ class page_action extends tform_actions {
} }
// password changed // password changed
if($conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') { if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
$password = $app->db->quote($this->dataRecord["password"]); $password = $app->db->quote($this->dataRecord["password"]);
$salt="$1$"; $salt="$1$";
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
...@@ -223,7 +222,7 @@ class page_action extends tform_actions { ...@@ -223,7 +222,7 @@ class page_action extends tform_actions {
} }
// language changed // language changed
if($conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
$language = $app->db->quote($this->dataRecord["language"]); $language = $app->db->quote($this->dataRecord["language"]);
$client_id = $this->id; $client_id = $this->id;
$sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id"; $sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id";
......
...@@ -220,7 +220,7 @@ $form["tabs"]['address'] = array ( ...@@ -220,7 +220,7 @@ $form["tabs"]['address'] = array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'SELECT', 'formtype' => 'SELECT',
'default' => $conf["country"], 'default' => (isset($conf["country"]) ? $conf["country"] : ''),
'datasource' => array ( 'type' => 'SQL', 'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name', 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
'keyfield'=> 'iso', 'keyfield'=> 'iso',
......
...@@ -220,7 +220,7 @@ $form["tabs"]['address'] = array ( ...@@ -220,7 +220,7 @@ $form["tabs"]['address'] = array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'SELECT', 'formtype' => 'SELECT',
'default' => $conf["country"], 'default' => (isset($conf["country"]) ? $conf["country"] : ''),
'datasource' => array ( 'type' => 'SQL', 'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name', 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
'keyfield'=> 'iso', 'keyfield'=> 'iso',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment