Changeset 25018 for trunk/admin/site_update.php
- Timestamp:
- Oct 19, 2013, 7:43:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/site_update.php
r23430 r25018 200 200 if (isset($_POST['cat'])) 201 201 { 202 array_push($fs_fulldirs, $basedir);202 $fs_fulldirs[] = $basedir; 203 203 } 204 204 // If $_POST['subcats-included'] != 1 ("Search in sub-albums" is unchecked) … … 254 254 } 255 255 256 array_push($inserts, $insert); 257 array_push( 258 $infos, 259 array( 256 $inserts[] = $insert; 257 $infos[] = array( 260 258 'path' => $fulldir, 261 259 'info' => l10n('added') … … 278 276 else 279 277 { 280 array_push( 281 $errors, 282 array( 283 'path' => $fulldir, 284 'type' => 'PWG-UPDATE-1' 285 ) 278 $errors[] = array( 279 'path' => $fulldir, 280 'type' => 'PWG-UPDATE-1' 286 281 ); 287 282 } … … 327 322 $granted_grps[$row['cat_id']]=array(); 328 323 } 324 // TODO: explanaition 329 325 array_push( 330 326 $granted_grps, … … 350 346 $granted_users[$row['cat_id']]=array(); 351 347 } 348 // TODO: explanaition 352 349 array_push( 353 350 $granted_users, … … 373 370 foreach ($granted_grps[$parent_id] as $granted_grp) 374 371 { 375 array_push( 376 $insert_granted_grps, 377 array( 378 'group_id' => $granted_grp, 379 'cat_id' => $ids 380 ) 381 ); 372 $insert_granted_grps[] = array( 373 'group_id' => $granted_grp, 374 'cat_id' => $ids 375 ); 382 376 } 383 377 } … … 386 380 foreach ($granted_users[$parent_id] as $granted_user) 387 381 { 388 array_push( 389 $insert_granted_users, 390 array( 391 'user_id' => $granted_user, 392 'cat_id' => $ids 393 ) 394 ); 382 $insert_granted_users[] = array( 383 'user_id' => $granted_user, 384 'cat_id' => $ids 385 ); 395 386 } 396 387 } 397 388 foreach (get_admins() as $granted_user) 398 389 { 399 array_push( 400 $insert_granted_users, 401 array( 402 'user_id' => $granted_user, 403 'cat_id' => $ids 404 ) 405 ); 390 $insert_granted_users[] = array( 391 'user_id' => $granted_user, 392 'cat_id' => $ids 393 ); 406 394 } 407 395 } … … 421 409 422 410 // to delete categories 423 $to_delete = array(); $to_delete_derivative_dirs = array(); 411 $to_delete = array(); 412 $to_delete_derivative_dirs = array(); 413 424 414 foreach (array_diff(array_keys($db_fulldirs), $fs_fulldirs) as $fulldir) 425 415 { 426 array_push($to_delete, $db_fulldirs[$fulldir]);416 $to_delete[] = $db_fulldirs[$fulldir]; 427 417 unset($db_fulldirs[$fulldir]); 428 array_push($infos, array('path' => $fulldir, 429 'info' => l10n('deleted'))); 418 419 $infos[] = array( 420 'path' => $fulldir, 421 'info' => l10n('deleted') 422 ); 423 430 424 if (substr_compare($fulldir, '../', 0, 3)==0) 431 425 { … … 434 428 $to_delete_derivative_dirs[] = PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$fulldir; 435 429 } 430 436 431 if (count($to_delete) > 0) 437 432 { … … 506 501 if (!preg_match($conf['sync_chars_regex'], $filename)) 507 502 { 508 array_push( 509 $errors, 510 array( 511 'path' => $path, 512 'type' => 'PWG-UPDATE-1' 513 ) 503 $errors[] = array( 504 'path' => $path, 505 'type' => 'PWG-UPDATE-1' 514 506 ); 515 507 … … 533 525 } 534 526 535 array_push( 536 $inserts, 537 $insert 527 $inserts[] = $insert; 528 529 $insert_links[] = array( 530 'image_id' => $insert['id'], 531 'category_id' => $insert['storage_category_id'], 538 532 ); 539 533 540 array_push( 541 $insert_links, 542 array( 543 'image_id' => $insert['id'], 544 'category_id' => $insert['storage_category_id'], 545 ) 546 ); 547 548 array_push( 549 $infos, 550 array( 551 'path' => $insert['path'], 552 'info' => l10n('added') 553 ) 534 $infos[] = array( 535 'path' => $insert['path'], 536 'info' => l10n('added') 554 537 ); 555 538 … … 588 571 foreach (array_diff($db_elements, array_keys($fs)) as $path) 589 572 { 590 array_push($to_delete_elements, array_search($path, $db_elements)); 591 array_push($infos, array('path' => $path, 592 'info' => l10n('deleted'))); 573 $to_delete_elements[] = array_search($path, $db_elements); 574 $infos[] = array( 575 'path' => $path, 576 'info' => l10n('deleted') 577 ); 593 578 } 594 579 if (count($to_delete_elements) > 0) … … 659 644 660 645 $data['id']=$id; 661 array_push($datas, $data);646 $datas[] = $data; 662 647 } // end foreach file 663 648 … … 740 725 $data['date_metadata_update'] = CURRENT_DATE; 741 726 $data['id']=$id; 742 array_push($datas, $data);727 $datas[] = $data; 743 728 744 729 foreach (array('keywords', 'tags') as $key) … … 753 738 foreach (explode(',', $data[$key]) as $tag_name) 754 739 { 755 array_push( 756 $tags_of[$id], 757 tag_id_from_tag_name($tag_name) 758 ); 740 $tags_of[$id][] = tag_id_from_tag_name($tag_name); 759 741 } 760 742 } … … 763 745 else 764 746 { 765 array_push($errors, array('path' => $element_infos['path'], 'type' => 'PWG-ERROR-NO-FS')); 747 $errors[] = array( 748 'path' => $element_infos['path'], 749 'type' => 'PWG-ERROR-NO-FS' 750 ); 766 751 } 767 752 }
Note: See TracChangeset
for help on using the changeset viewer.