Changeset 25018 for trunk/include
- Timestamp:
- Oct 19, 2013, 7:43:04 PM (11 years ago)
- Location:
- trunk/include
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_monthly.class.php
r19703 r25018 389 389 } 390 390 391 array_push( $wday_labels, array_shift($wday_labels));391 $wday_labels[] = array_shift($wday_labels); 392 392 } 393 393 -
trunk/include/calendar_weekly.class.php
r25005 r25018 69 69 $this->calendar_levels[CWEEK]['sql'] = pwg_db_get_week($this->date_field, 5).'+1'; 70 70 $this->calendar_levels[CDAY]['sql'] = pwg_db_get_weekday($this->date_field); 71 array_push( $this->calendar_levels[CDAY]['labels'], 72 array_shift( $this->calendar_levels[CDAY]['labels'] ) ); 71 $this->calendar_levels[CDAY]['labels'][] = array_shift($this->calendar_levels[CDAY]['labels']); 73 72 } 74 73 } -
trunk/include/category_cats.inc.php
r25005 r25018 208 208 if (isset($image_id) and !in_array($image_id, $image_ids)) 209 209 { 210 array_push($new_image_ids, $image_id);210 $new_image_ids[] = $image_id; 211 211 } 212 212 -
trunk/include/dblayer/functions_mysql.inc.php
r21088 r25018 329 329 $column.= " collate '".$row['Collation']."'"; 330 330 } 331 array_push($columns, $column);331 $columns[] = $column; 332 332 } 333 333 } … … 565 565 while ($row = pwg_db_fetch_row($result)) 566 566 { 567 array_push($all_tables, $row[0]);567 $all_tables[] = $row[0]; 568 568 } 569 569 … … 583 583 if ($row['Key'] == 'PRI') 584 584 { 585 array_push($all_primary_key, $row['Field']);585 $all_primary_key[] = $row['Field']; 586 586 } 587 587 } … … 599 599 if ($mysql_rc) 600 600 { 601 array_push( 602 $page['infos'], 603 l10n('All optimizations have been successfully completed.') 604 ); 601 $page['infos'][] = l10n('All optimizations have been successfully completed.'); 605 602 } 606 603 else 607 604 { 608 array_push( 609 $page['errors'], 610 l10n('Optimizations have been completed with some errors.') 611 ); 605 $page['errors'][] = l10n('Optimizations have been completed with some errors.'); 612 606 } 613 607 } -
trunk/include/dblayer/functions_mysqli.inc.php
r24346 r25018 366 366 $column.= " collate '".$row['Collation']."'"; 367 367 } 368 array_push($columns, $column);368 $columns[] = $column; 369 369 } 370 370 } … … 602 602 while ($row = pwg_db_fetch_row($result)) 603 603 { 604 array_push($all_tables, $row[0]);604 $all_tables[] = $row[0]; 605 605 } 606 606 … … 620 620 if ($row['Key'] == 'PRI') 621 621 { 622 array_push($all_primary_key, $row['Field']);622 $all_primary_key[] = $row['Field']; 623 623 } 624 624 } … … 636 636 if ($mysqli_rc) 637 637 { 638 array_push( 639 $page['infos'], 640 l10n('All optimizations have been successfully completed.') 641 ); 638 $page['infos'][] = l10n('All optimizations have been successfully completed.'); 642 639 } 643 640 else 644 641 { 645 array_push( 646 $page['errors'], 647 l10n('Optimizations have been completed with some errors.') 648 ); 642 $page['errors'][] = l10n('Optimizations have been completed with some errors.'); 649 643 } 650 644 } -
trunk/include/filter.inc.php
r19703 r25018 124 124 if (get_filter_page_value('add_notes')) 125 125 { 126 $header_notes[] = l10n_dec('Photos posted within the last %d day.', 'Photos posted within the last %d days.', $filter['recent_period']); 126 $header_notes[] = l10n_dec( 127 'Photos posted within the last %d day.', 'Photos posted within the last %d days.', 128 $filter['recent_period'] 129 ); 127 130 } 128 131 include_once(PHPWG_ROOT_PATH.'include/functions_filter.inc.php'); -
trunk/include/functions.inc.php
r25005 r25018 879 879 foreach ($caddiables as $caddiable) 880 880 { 881 array_push($datas, array('element_id' => $caddiable, 882 'user_id' => $user['id'])); 881 $datas[] = array( 882 'element_id' => $caddiable, 883 'user_id' => $user['id'], 884 ); 883 885 } 884 886 -
trunk/include/functions_calendar.inc.php
r19703 r25018 213 213 if ( isset($page['chronology_date'][0]) ) 214 214 { 215 array_push($chronology_date, $page['chronology_date'][0]);215 $chronology_date[] = $page['chronology_date'][0]; 216 216 } 217 217 } -
trunk/include/functions_comment.inc.php
r21817 r25018 94 94 if ($conf['comments_author_mandatory']) 95 95 { 96 array_push($infos, l10n('Username is mandatory'));96 $infos[] = l10n('Username is mandatory'); 97 97 $comment_action='reject'; 98 98 } … … 111 111 if ( $row['user_exists'] == 1 ) 112 112 { 113 array_push($infos, l10n('This login is already used by another user'));113 $infos[] = l10n('This login is already used by another user'); 114 114 $comment_action='reject'; 115 115 } … … 142 142 if (!url_check_format($comm['website_url'])) 143 143 { 144 array_push($infos, l10n('Your website URL is invalid'));144 $infos[] = l10n('Your website URL is invalid'); 145 145 $comment_action='reject'; 146 146 } … … 156 156 else if ($conf['comments_email_mandatory']) 157 157 { 158 array_push($infos, l10n('Email address is missing. Please specify an email address.'));158 $infos[] = l10n('Email address is missing. Please specify an email address.'); 159 159 $comment_action='reject'; 160 160 } … … 162 162 else if (!email_check_format($comm['email'])) 163 163 { 164 array_push($infos, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));164 $infos[] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'); 165 165 $comment_action='reject'; 166 166 } … … 193 193 if ( $counter > 0 ) 194 194 { 195 array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment'));195 $infos[] = l10n('Anti-flood system : please wait for a moment before trying to post another comment'); 196 196 $comment_action='reject'; 197 197 } -
trunk/include/functions_mail.inc.php
r24966 r25018 294 294 if (!empty($admin['mail_address'])) 295 295 { 296 array_push($admins, format_email($admin['username'], $admin['mail_address']));296 $admins[] = format_email($admin['username'], $admin['mail_address']); 297 297 } 298 298 } … … 420 420 if (!empty($row['mail_address'])) 421 421 { 422 array_push($Bcc, format_email(stripslashes($row['username']), $row['mail_address']));422 $Bcc[] = format_email(stripslashes($row['username']), $row['mail_address']); 423 423 } 424 424 } -
trunk/include/functions_notification.inc.php
r19703 r25018 207 207 while ($row = pwg_db_fetch_assoc($result)) 208 208 { 209 array_push($infos, $row);209 $infos[] = $row; 210 210 } 211 211 … … 370 370 $line = '<a href="'.$url.'">'.$line.'</a>'; 371 371 } 372 array_push($news, $line);372 $news[] = $line; 373 373 } 374 374 } … … 451 451 while ($row = pwg_db_fetch_assoc($result)) 452 452 { 453 array_push($dates, $row);453 $dates[] = $row; 454 454 } 455 455 … … 470 470 while ($row = pwg_db_fetch_assoc($result)) 471 471 { 472 array_push($dates[$i]['elements'], $row);472 $dates[$i]['elements'][] = $row; 473 473 } 474 474 } … … 490 490 while ($row = pwg_db_fetch_assoc($result)) 491 491 { 492 array_push($dates[$i]['categories'], $row);492 $dates[$i]['categories'][] = $row; 493 493 } 494 494 } … … 547 547 $description .= 548 548 '<li>' 549 .l10n_dec('%d album updated', '%d albums updated', 550 $date_detail['nb_cats']) 549 .l10n_dec('%d album updated', '%d albums updated', $date_detail['nb_cats']) 551 550 .'</li>'; 552 551 … … 558 557 .get_cat_display_name_cache($cat['uppercats']) 559 558 .' ('. 560 l10n_dec('%d new photo', 561 '%d new photos', $cat['img_count']).')' 559 l10n_dec('%d new photo', '%d new photos', $cat['img_count']).')' 562 560 .'</li>'; 563 561 } -
trunk/include/functions_plugins.inc.php
r24160 r25018 221 221 while ($row = pwg_db_fetch_assoc($result)) 222 222 { 223 array_push($plugins, $row);223 $plugins[] = $row; 224 224 } 225 225 return $plugins; -
trunk/include/functions_search.inc.php
r22175 r25018 69 69 foreach ($search['fields'][$textfield]['words'] as $word) 70 70 { 71 array_push($local_clauses, $textfield." LIKE '%".$word."%'");71 $local_clauses[] = $textfield." LIKE '%".$word."%'"; 72 72 } 73 73 … … 75 75 $local_clauses = prepend_append_array_items($local_clauses, '(', ')'); 76 76 77 array_push( 78 $clauses, 79 implode( 80 ' '.$search['fields'][$textfield]['mode'].' ', 81 $local_clauses 82 ) 77 $clauses[] = implode( 78 ' '.$search['fields'][$textfield]['mode'].' ', 79 $local_clauses 83 80 ); 84 81 } … … 101 98 foreach ($fields as $field) 102 99 { 103 array_push($field_clauses, $field." LIKE '%".$word."%'");100 $field_clauses[] = $field." LIKE '%".$word."%'"; 104 101 } 105 102 // adds brackets around where clauses 106 array_push( 107 $word_clauses, 108 implode( 109 "\n OR ", 110 $field_clauses 111 ) 103 $word_clauses[] = implode( 104 "\n OR ", 105 $field_clauses 112 106 ); 113 107 } … … 118 112 ); 119 113 120 array_push( 121 $clauses, 122 "\n ". 114 $clauses[] = "\n ". 123 115 implode( 124 "\n ". 125 $search['fields']['allwords']['mode']. 126 "\n ", 116 "\n ". $search['fields']['allwords']['mode']. "\n ", 127 117 $word_clauses 128 ) 129 ); 118 ); 130 119 } 131 120 … … 134 123 if (isset($search['fields'][$datefield])) 135 124 { 136 array_push( 137 $clauses, 138 $datefield." = '".$search['fields'][$datefield]['date']."'" 139 ); 125 $clauses[] = $datefield." = '".$search['fields'][$datefield]['date']."'" 140 126 } 141 127 … … 146 132 if (isset($search['fields'][$key])) 147 133 { 148 array_push( 149 $clauses, 150 151 $datefield. 134 $clauses[] = $datefield. 152 135 ($suffix == 'after' ? ' >' : ' <'). 153 136 ($search['fields'][$key]['inc'] ? '=' : ''). 154 " '".$search['fields'][$key]['date']."'" 155 156 ); 137 " '".$search['fields'][$key]['date']."'"; 157 138 } 158 139 } … … 172 153 173 154 $local_clause = 'category_id IN ('.implode(',', $cat_ids).')'; 174 array_push($clauses, $local_clause);155 $clauses[] = $local_clause; 175 156 } 176 157 -
trunk/include/functions_tag.inc.php
r21817 r25018 333 333 while ($row = pwg_db_fetch_assoc($result)) 334 334 { 335 array_push($tags, $row);335 $tags[] = $row; 336 336 } 337 337 return $tags; -
trunk/include/functions_url.inc.php
r23822 r25018 467 467 if (empty($maybe_permalinks)) 468 468 { 469 array_push($maybe_permalinks, $tokens[$current_token]);469 $maybe_permalinks[] = $tokens[$current_token]; 470 470 } 471 471 else 472 472 { 473 array_push($maybe_permalinks,473 $maybe_permalinks[] = 474 474 $maybe_permalinks[count($maybe_permalinks)-1] 475 . '/' . $tokens[$current_token] 476 ); 475 . '/' . $tokens[$current_token]; 477 476 } 478 477 $current_token++; … … 528 527 if ( $conf['tag_url_style'] != 'tag' and preg_match('/^(\d+)(?:-(.*)|)$/', $tokens[$i], $matches) ) 529 528 { 530 array_push($requested_tag_ids, $matches[1]);529 $requested_tag_ids[] = $matches[1]; 531 530 } 532 531 else 533 532 { 534 array_push($requested_tag_url_names, $tokens[$i]);533 $requested_tag_url_names[] = $tokens[$i]; 535 534 } 536 535 $i++; … … 598 597 { 599 598 // Add dummy element list 600 array_push($page['list'], -1);599 $page['list'][] = -1; 601 600 } 602 601 // With pictures list … … 609 608 foreach (explode(',', $tokens[$next_token]) as $image_id) 610 609 { 611 array_push($page['list'], $image_id);610 $page['list'][] = $image_id; 612 611 } 613 612 } -
trunk/include/picture_comment.inc.php
r19703 r25018 61 61 { 62 62 case 'moderate': 63 array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.'));63 $page['infos'][] = l10n('An administrator must authorize your comment before it is visible.'); 64 64 case 'validate': 65 array_push($page['infos'], l10n('Your comment has been registered'));65 $page['infos'][] = l10n('Your comment has been registered'); 66 66 break; 67 67 case 'reject': 68 68 set_status_header(403); 69 array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules'));69 $page['errors'][] = l10n('Your comment has NOT been registered because it did not pass the validation rules'); 70 70 break; 71 71 default: -
trunk/include/section_init.inc.php
r22283 r25018 340 340 foreach ($page['tags'] as $tag) 341 341 { 342 array_push($page['tag_ids'], $tag['id']);342 $page['tag_ids'][] = $tag['id']; 343 343 } 344 344 -
trunk/include/ws_functions.inc.php
r25005 r25018 402 402 foreach ( array_from_query($query, 'id') as $id ) 403 403 { 404 array_push($datas, array('element_id'=>$id, 'user_id'=>$user['id']));404 $datas[] = array('element_id'=>$id, 'user_id'=>$user['id']); 405 405 } 406 406 if (count($datas)) … … 794 794 if (isset($image_id) and !in_array($image_id, $image_ids)) 795 795 { 796 array_push($new_image_ids, $image_id);796 $new_image_ids[] = $image_id; 797 797 } 798 798 … … 833 833 foreach ($user_representative_updates_for as $cat_id => $image_id) 834 834 { 835 array_push( 836 $updates, 837 array( 838 'user_id' => $user['id'], 839 'cat_id' => $cat_id, 840 'user_representative_picture_id' => $image_id, 841 ) 835 $updates[] = array( 836 'user_id' => $user['id'], 837 'cat_id' => $cat_id, 838 'user_representative_picture_id' => $image_id, 842 839 ); 843 840 } … … 995 992 { 996 993 case 'reject': 997 array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules'));994 $infos[] = l10n('Your comment has NOT been registered because it did not pass the validation rules'); 998 995 return new PwgError(403, implode("; ", $infos) ); 999 996 case 'validate': 1000 997 case 'moderate': 1001 998 $ret = array( 1002 1003 999 'id' => $comm['id'], 1000 'validation' => $comment_action=='validate', 1004 1001 ); 1005 1002 return array( 'comment' => new PwgNamedStruct($ret) ); … … 1072 1069 ); 1073 1070 $row['id']=(int)$row['id']; 1074 array_push($related_categories, $row);1071 $related_categories[] = $row; 1075 1072 } 1076 1073 usort($related_categories, 'global_rank_compare'); … … 1545 1542 { 1546 1543 ws_logfile($file); 1547 array_push($chunks, $upload_dir.'/'.$file);1544 $chunks[] = $upload_dir.'/'.$file; 1548 1545 } 1549 1546 } … … 1602 1599 if (preg_match($pattern, $file)) 1603 1600 { 1604 array_push($chunks, $upload_dir.'/'.$file);1601 $chunks[] = $upload_dir.'/'.$file; 1605 1602 } 1606 1603 } … … 1959 1956 foreach ($params['tags'] as $tag_name) 1960 1957 { 1961 $tag_id = tag_id_from_tag_name($tag_name); 1962 array_push($tag_ids, $tag_id); 1958 $tag_ids[] = tag_id_from_tag_name($tag_name); 1963 1959 } 1964 1960 } … … 1968 1964 foreach ($tag_names as $tag_name) 1969 1965 { 1970 $tag_id = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name)); 1971 array_push($tag_ids, $tag_id); 1966 $tag_ids[] = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name)); 1972 1967 } 1973 1968 } … … 2663 2658 if ($image_id > 0) 2664 2659 { 2665 array_push($image_ids, $image_id);2660 $image_ids[] = $image_id; 2666 2661 } 2667 2662 } … … 2695 2690 } 2696 2691 2697 array_push($cat_ids, $cat_id);2692 $cat_ids[] = $cat_id; 2698 2693 2699 2694 if (!isset($rank)) … … 2804 2799 foreach ($new_cat_ids as $cat_id) 2805 2800 { 2806 array_push( 2807 $inserts, 2808 array( 2809 'image_id' => $image_id, 2810 'category_id' => $cat_id, 2811 'rank' => $rank_on_category[$cat_id], 2812 ) 2801 $inserts[] = array( 2802 'image_id' => $image_id, 2803 'category_id' => $cat_id, 2804 'rank' => $rank_on_category[$cat_id], 2813 2805 ); 2814 2806 } … … 2996 2988 if ($category_id > 0) 2997 2989 { 2998 array_push($category_ids, $category_id);2990 $category_ids[] = $category_id; 2999 2991 } 3000 2992 } … … 3054 3046 if ($category_id > 0) 3055 3047 { 3056 array_push($category_ids, $category_id);3048 $category_ids[] = $category_id; 3057 3049 } 3058 3050 } … … 3421 3413 if (!in_array($params['id'], $conf['updates_ignored'][$params['type']])) 3422 3414 { 3423 array_push($conf['updates_ignored'][$params['type']], $params['id']);3415 $conf['updates_ignored'][ $params['type'] ][] = $params['id']; 3424 3416 } 3425 3417 conf_update_param('updates_ignored', pwg_db_real_escape_string(serialize($conf['updates_ignored']))); -
trunk/include/ws_protocols/rest_encoder.php
r22729 r25018 67 67 $this->_output( '<'.$name ); 68 68 $this->_lastTagOpen = true; 69 array_push( $this->_elementStack, $name);69 $this->_elementStack[] = $name; 70 70 } 71 71
Note: See TracChangeset
for help on using the changeset viewer.