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_perm.php

    r23430 r25018  
    126126      while ($row = pwg_db_fetch_assoc($result))
    127127      {
    128         array_push($granteds[$row['cat_id']], $row['group_id']);
     128        $granteds[ $row['cat_id'] ][] = $row['group_id'];
    129129      }
    130130
     
    136136        foreach ($group_ids as $group_id)
    137137        {
    138           array_push(
    139             $inserts,
    140             array(
    141               'group_id' => $group_id,
    142               'cat_id' => $cat_id
    143               )
     138          $inserts[] = array(
     139            'group_id' => $group_id,
     140            'cat_id' => $cat_id
    144141            );
    145142        }
     
    191188  }
    192189
    193   array_push($page['infos'], l10n('Album updated successfully'));
     190  $page['infos'][] = l10n('Album updated successfully');
    194191}
    195192
     
    273270  while ($row = pwg_db_fetch_assoc($result))
    274271  {
    275     if (!isset($granted_groups[$row['group_id']]))
    276     {
    277       $granted_groups[$row['group_id']] = array();
    278     }
    279     array_push($granted_groups[$row['group_id']], $row['user_id']);
     272    if (!isset($granted_groups[ $row['group_id'] ]))
     273    {
     274      $granted_groups[ $row['group_id'] ] = array();
     275    }
     276    $granted_groups[ $row['group_id'] ][] = $row['user_id'];
    280277  }
    281278
     
    303300      if (in_array($user_id, $user_granted_indirect_ids))
    304301      {
    305         array_push($group_usernames, $users[$user_id]);
     302        $group_usernames[] = $users[$user_id];
    306303      }
    307304    }
Note: See TracChangeset for help on using the changeset viewer.