Changeset 25018 for trunk/admin/user_list.php
- Timestamp:
- Oct 19, 2013, 7:43:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/user_list.php
r25005 r25018 120 120 $user['groups'] = array(); 121 121 122 array_push($users, $user);122 $users[] = $user; 123 123 } 124 124 … … 141 141 while ($row = pwg_db_fetch_assoc($result)) 142 142 { 143 array_push( 144 $users[$user_nums[$row['user_id']]]['groups'], 145 $row['group_id'] 146 ); 143 $users[ $user_nums[ $row['user_id'] ] ]['groups'][] = $row['group_id']; 147 144 } 148 145 } … … 192 189 if(empty($_POST['password'])) 193 190 { 194 array_push($page['errors'], l10n('Password is missing. Please enter the password.'));191 $page['errors'][] = l10n('Password is missing. Please enter the password.'); 195 192 } 196 193 else if(empty($_POST['password_conf'])) 197 194 { 198 array_push($page['errors'], l10n('Password confirmation is missing. Please confirm the chosen password.'));195 $page['errors'][] = l10n('Password confirmation is missing. Please confirm the chosen password.'); 199 196 } 200 197 else if(empty($_POST['email'])) 201 198 { 202 array_push($page['errors'], l10n('Email address is missing. Please specify an email address.'));199 $page['errors'][] = l10n('Email address is missing. Please specify an email address.'); 203 200 } 204 201 else if ($_POST['password'] != $_POST['password_conf']) 205 202 { 206 array_push($page['errors'], l10n('The passwords do not match'));203 $page['errors'][] = l10n('The passwords do not match'); 207 204 } 208 205 else … … 213 210 if (count($page['errors']) == 0) 214 211 { 215 array_push( 216 $page['infos'], 217 l10n( 218 'user "%s" added', 219 $_POST['login'] 220 ) 221 ); 212 $page['infos'][] = l10n('user "%s" added', $_POST['login']); 222 213 } 223 214 } … … 233 224 if (count($page['errors']) == 0) 234 225 { 235 array_push( 236 $page['infos'], 237 l10n( 238 'user "%s" added', 239 stripslashes($_POST['login']) 240 ) 241 ); 226 $page['infos'][] = l10n('user "%s" added', stripslashes($_POST['login'])); 242 227 } 243 228 } … … 296 281 foreach($page['filtered_users'] as $local_user) 297 282 { 298 array_push($collection, $local_user['id']);283 $collection[] = $local_user['id']; 299 284 } 300 285 break; … … 312 297 if (count($collection) == 0) 313 298 { 314 array_push($page['errors'], l10n('Select at least one user'));299 $page['errors'][] = l10n('Select at least one user'); 315 300 } 316 301 } … … 323 308 if (in_array($conf['guest_id'], $collection)) 324 309 { 325 array_push($page['errors'], l10n('Guest cannot be deleted'));310 $page['errors'][] = l10n('Guest cannot be deleted'); 326 311 } 327 312 if (($conf['guest_id'] != $conf['default_user_id']) and 328 313 in_array($conf['default_user_id'], $collection)) 329 314 { 330 array_push($page['errors'], l10n('Default user cannot be deleted'));315 $page['errors'][] = l10n('Default user cannot be deleted'); 331 316 } 332 317 if (in_array($conf['webmaster_id'], $collection)) 333 318 { 334 array_push($page['errors'], l10n('Webmaster cannot be deleted'));319 $page['errors'][] = l10n('Webmaster cannot be deleted'); 335 320 } 336 321 if (in_array($user['id'], $collection)) 337 322 { 338 array_push($page['errors'], l10n('You cannot delete your account'));323 $page['errors'][] = l10n('You cannot delete your account'); 339 324 } 340 325 … … 347 332 delete_user($user_id); 348 333 } 349 array_push( 350 $page['infos'], 351 l10n_dec( 352 '%d user deleted', '%d users deleted', 353 count($collection) 354 ) 334 335 $page['infos'][] = l10n_dec( 336 '%d user deleted', '%d users deleted', 337 count($collection) 355 338 ); 339 356 340 foreach ($page['filtered_users'] as $filter_key => $filter_user) 357 341 { … … 364 348 else 365 349 { 366 array_push($page['errors'], l10n('You need to confirm deletion'));350 $page['errors'][] = l10n('You need to confirm deletion'); 367 351 } 368 352 } … … 392 376 foreach ($associable as $item) 393 377 { 394 array_push($datas, 395 array('group_id'=>$_POST['associate'], 396 'user_id'=>$item)); 378 $datas[] = array( 379 'group_id' => $_POST['associate'], 380 'user_id' => $item 381 ); 397 382 } 398 383 … … 427 412 if ($conf['activate_comments']) 428 413 { 429 array_push($formfields, 'show_nb_comments');430 array_push($true_false_fields, 'show_nb_comments');414 $formfields[] = 'show_nb_comments'; 415 $true_false_fields[] = 'show_nb_comments'; 431 416 } 432 417 … … 445 430 if ($_POST[$test] != 'leave') 446 431 { 447 array_push($dbfields['update'], $formfield);432 $dbfields['update'][] = $formfield; 448 433 } 449 434 } … … 481 466 if (!in_array('level', $dbfields['update'])) 482 467 { 483 array_push($dbfields['update'], 'level');468 $dbfields['update'][] = 'level'; 484 469 } 485 470 } … … 508 493 } 509 494 510 array_push($datas, $data);495 $datas[] = $data; 511 496 } 512 497
Note: See TracChangeset
for help on using the changeset viewer.