Ignore:
Timestamp:
Oct 19, 2013, 7:43:04 PM (11 years ago)
Author:
mistic100
Message:

remove all array_push (50% slower than []) + some changes missing for feature:2978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_list.php

    r24985 r25018  
    7979    }
    8080   
    81     array_push($datas, array('id' => $id, 'rank' => $current_rank));
     81    $datas[] = array('id' => $id, 'rank' => $current_rank);
    8282  }
    8383  $fields = array('primary' => array('id'), 'update' => array('rank'));
     
    134134  if (isset($output_create['error']))
    135135  {
    136     array_push($page['errors'], $output_create['error']);
     136    $page['errors'][] = $output_create['error'];
    137137  }
    138138  else
    139139  {
    140     array_push($page['infos'], $output_create['info']);
     140    $page['infos'][] = $output_create['info'];
    141141  }
    142142}
     
    147147  save_categories_order(array_keys($_POST['catOrd']));
    148148
    149   array_push(
    150     $page['infos'],
    151     l10n('Album manual order was saved')
    152     );
     149  $page['infos'][] = l10n('Album manual order was saved');
    153150}
    154151else if (isset($_POST['submitAutoOrder']))
     
    179176  while ($row = pwg_db_fetch_assoc($result))
    180177  {
    181     array_push(
    182       $categories,
    183       array(
    184         'id' => $row['id'],
    185         'id_uppercat' => $row['id_uppercat'],
    186         )
     178    $categories[] = array(
     179      'id' => $row['id'],
     180      'id_uppercat' => $row['id_uppercat'],
    187181      );
    188     array_push(
    189       $names,
    190       $row['name']
    191       );
     182    $names[] = $row['name'];
    192183  }
    193184
     
    200191  save_categories_order($categories);
    201192
    202   array_push(
    203     $page['infos'],
    204     l10n('Albums automatically sorted')
    205     );
     193  $page['infos'][] = l10n('Albums automatically sorted');
    206194}
    207195
Note: See TracChangeset for help on using the changeset viewer.