diff options
author | mistic100 <mistic@piwigo.org> | 2013-10-19 17:43:04 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2013-10-19 17:43:04 +0000 |
commit | ae707279a1945e383c312cd648d288606a79e341 (patch) | |
tree | 917bdc6e0609ed0eefed5f3693de3a017685acc4 /admin/group_perm.php | |
parent | 35ff1b7c1f933799397a0ce0a6723cf82f416ff3 (diff) |
remove all array_push (50% slower than []) + some changes missing for feature:2978
git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/group_perm.php')
-rw-r--r-- | admin/group_perm.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/admin/group_perm.php b/admin/group_perm.php index d31102a4d..42c3309b2 100644 --- a/admin/group_perm.php +++ b/admin/group_perm.php @@ -81,7 +81,7 @@ SELECT id $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { - array_push($private_uppercats, $row['id']); + $private_uppercats[] = $row['id']; } // retrying to authorize a category which is already authorized may cause @@ -98,19 +98,16 @@ SELECT cat_id while ($row = pwg_db_fetch_assoc($result)) { - array_push($authorized_ids, $row['cat_id']); + $authorized_ids[] = $row['cat_id']; } $inserts = array(); $to_autorize_ids = array_diff($private_uppercats, $authorized_ids); foreach ($to_autorize_ids as $to_autorize_id) { - array_push( - $inserts, - array( - 'group_id' => $page['group'], - 'cat_id' => $to_autorize_id - ) + $inserts[] = array( + 'group_id' => $page['group'], + 'cat_id' => $to_autorize_id ); } @@ -158,7 +155,7 @@ $result = pwg_query($query_true); $authorized_ids = array(); while ($row = pwg_db_fetch_assoc($result)) { - array_push($authorized_ids, $row['id']); + $authorized_ids[] = $row['id']; } $query_false = ' |