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/include/functions_url.inc.php

    r23822 r25018  
    467467          if (empty($maybe_permalinks))
    468468          {
    469             array_push($maybe_permalinks, $tokens[$current_token]);
     469            $maybe_permalinks[] = $tokens[$current_token];
    470470          }
    471471          else
    472472          {
    473             array_push($maybe_permalinks,
     473            $maybe_permalinks[] =
    474474                $maybe_permalinks[count($maybe_permalinks)-1]
    475                 . '/' . $tokens[$current_token]
    476               );
     475                . '/' . $tokens[$current_token];
    477476          }
    478477          $current_token++;
     
    528527      if ( $conf['tag_url_style'] != 'tag' and preg_match('/^(\d+)(?:-(.*)|)$/', $tokens[$i], $matches) )
    529528      {
    530         array_push($requested_tag_ids, $matches[1]);
     529        $requested_tag_ids[] = $matches[1];
    531530      }
    532531      else
    533532      {
    534         array_push($requested_tag_url_names, $tokens[$i]);
     533        $requested_tag_url_names[] = $tokens[$i];
    535534      }
    536535      $i++;
     
    598597    {
    599598      // Add dummy element list
    600       array_push($page['list'], -1);
     599      $page['list'][] = -1;
    601600    }
    602601    // With pictures list
     
    609608      foreach (explode(',', $tokens[$next_token]) as $image_id)
    610609      {
    611         array_push($page['list'], $image_id);
     610        $page['list'][] = $image_id;
    612611      }
    613612    }
Note: See TracChangeset for help on using the changeset viewer.