Skip to content

Commit b9ce1a8

Browse files
author
xaver
committed
PHP 5.4 fixes for Notice Errors
1 parent 4a32aad commit b9ce1a8

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

interface/lib/classes/listform_actions.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ public function onShow()
267267
$limits = array('5'=>'5','15'=>'15','25'=>'25','50'=>'50','100'=>'100','999999999' => 'all');
268268

269269
//* create options and set selected, if default -> 15 is selected
270+
271+
$options = '';
270272
foreach($limits as $key => $val){
271273
$options .= '<option value="'.$key.'" '.(isset($_SESSION['search']['limit']) && $_SESSION['search']['limit'] == $key ? 'selected="selected"':'' ).(!isset($_SESSION['search']['limit']) && $key == '15' ? 'selected="selected"':'').'>'.$val.'</option>';
272274
}

interface/web/client/client_edit.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function onAfterInsert() {
142142
$username = $app->db->quote($this->dataRecord["username"]);
143143
$password = $app->db->quote($this->dataRecord["password"]);
144144
$modules = $conf['interface_modules_enabled'];
145-
if($this->dataRecord["limit_client"] > 0) $modules .= ',client';
145+
if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] > 0) $modules .= ',client';
146146
$startmodule = (stristr($modules,'dashboard'))?'dashboard':'client';
147147
$usertheme = $app->db->quote($this->dataRecord["usertheme"]);
148148
$type = 'user';
@@ -194,9 +194,8 @@ function onAfterInsert() {
194194
*/
195195
function onAfterUpdate() {
196196
global $app;
197-
198197
// username changed
199-
if($conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
198+
if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
200199
$username = $app->db->quote($this->dataRecord["username"]);
201200
$client_id = $this->id;
202201
$sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";
@@ -208,7 +207,7 @@ function onAfterUpdate() {
208207
}
209208

210209
// password changed
211-
if($conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
210+
if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
212211
$password = $app->db->quote($this->dataRecord["password"]);
213212
$salt="$1$";
214213
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -223,7 +222,7 @@ function onAfterUpdate() {
223222
}
224223

225224
// language changed
226-
if($conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
225+
if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
227226
$language = $app->db->quote($this->dataRecord["language"]);
228227
$client_id = $this->id;
229228
$sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id";

interface/web/client/form/client.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
'datatype' => 'VARCHAR',
221221

222222
'formtype' => 'SELECT',
223-
'default' => $conf["country"],
223+
'default' => (isset($conf["country"]) ? $conf["country"] : ''),
224224
'datasource' => array ( 'type' => 'SQL',
225225
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
226226
'keyfield'=> 'iso',

interface/web/client/form/reseller.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
'datatype' => 'VARCHAR',
221221

222222
'formtype' => 'SELECT',
223-
'default' => $conf["country"],
223+
'default' => (isset($conf["country"]) ? $conf["country"] : ''),
224224
'datasource' => array ( 'type' => 'SQL',
225225
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
226226
'keyfield'=> 'iso',

0 commit comments

Comments
 (0)