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

    r20720 r25018  
    9494  while ($row = pwg_db_fetch_assoc($result))
    9595  {
    96     array_push($plugins, $row['id']);
     96    $plugins[] = $row['id'];
    9797  }
    9898
     
    106106    pwg_query($query);
    107107
    108     array_push($page['infos'],
    109       l10n('As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:').'<p><i>'.implode(', ', $plugins).'</i></p>');
     108    $page['infos'][] = l10n('As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:')
     109                        .'<p><i>'.implode(', ', $plugins).'</i></p>';
    110110  }
    111111}
     
    136136  while ($row = pwg_db_fetch_assoc($result))
    137137  {
    138     array_push($theme_ids, $row['id']);
    139     array_push($theme_names, $row['name']);
     138    $theme_ids[] = $row['id'];
     139    $theme_names[] = $row['name'];
    140140  }
    141141
     
    149149    pwg_query($query);
    150150
    151     array_push($page['infos'],
    152       l10n('As a precaution, following themes have been deactivated. You must check for themes upgrade before reactiving them:').'<p><i>'.implode(', ', $theme_names).'</i></p>');
     151    $page['infos'][] = l10n('As a precaution, following themes have been deactivated. You must check for themes upgrade before reactiving them:')
     152                        .'<p><i>'.implode(', ', $theme_names).'</i></p>';
    153153
    154154    // what is the default theme?
     
    250250  if (!$conf['password_verify']($password, $row['password']))
    251251  {
    252     array_push($page['errors'], l10n('Invalid password!'));
     252    $page['errors'][] = l10n('Invalid password!');
    253253  }
    254254  elseif ($row['status'] != 'admin' and $row['status'] != 'webmaster')
    255255  {
    256     array_push($page['errors'], l10n('You do not have access rights to run upgrade'));
     256    $page['errors'][] = l10n('You do not have access rights to run upgrade');
    257257  }
    258258  else
     
    280280          and preg_match('/^(.*?)-database\.php$/', $node, $match))
    281281      {
    282         array_push($available_upgrade_ids, $match[1]);
     282        $available_upgrade_ids[] = $match[1];
    283283      }
    284284    }
Note: See TracChangeset for help on using the changeset viewer.