Changeset 25018 for trunk/picture.php


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/picture.php

    r25005 r25018  
    103103        if ('best_rated'==$page['section'])
    104104        {
    105           $page['rank_of'][$page['image_id']] = count($page['items']);
    106           array_push($page['items'], $page['image_id'] );
     105          $page['rank_of'][ $page['image_id'] ] = count($page['items']);
     106          $page['items'][] = $page['image_id'];
    107107        }
    108108        else
     
    469469if (isset($page['previous_item']))
    470470{
    471   array_push($ids, $page['previous_item']);
    472   array_push($ids, $page['first_item']);
     471  $ids[] = $page['previous_item'];
     472  $ids[] = $page['first_item'];
    473473}
    474474if (isset($page['next_item']))
    475475{
    476   array_push($ids, $page['next_item']);
    477   array_push($ids, $page['last_item']);
     476  $ids[] = $page['next_item'];
     477  $ids[] = $page['last_item'];
    478478}
    479479
Note: See TracChangeset for help on using the changeset viewer.