aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-10 21:27:46 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-10 21:27:46 +0000
commit5a5a7eb2f442fdedcc916009600aedf6e105a105 (patch)
tree661ff2e7fb916813049625bb7470e685296688ec /engine/lib/upgrades
parent267281e13e8e8baedec7ef06a88fd4024a54256d (diff)
downloadelgg-5a5a7eb2f442fdedcc916009600aedf6e105a105.tar.gz
elgg-5a5a7eb2f442fdedcc916009600aedf6e105a105.tar.bz2
Using php default functions instead of ElggUser in upgrade script.
Large Elgg sites could not handle the "select * from users" query without hitting memory limit. git-svn-id: http://code.elgg.org/elgg/trunk@3662 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/upgrades')
-rw-r--r--engine/lib/upgrades/2009102801.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/engine/lib/upgrades/2009102801.php b/engine/lib/upgrades/2009102801.php
index 01d7a9ad2..23149e5c5 100644
--- a/engine/lib/upgrades/2009102801.php
+++ b/engine/lib/upgrades/2009102801.php
@@ -177,9 +177,8 @@ function user_file_matrix($guid) {
/**
Upgrade file locations
*/
-// loop over all users
-$users = get_data("SELECT * FROM {$CONFIG->dbprefix}users_entity");
-foreach ($users as $user) {
+$users = mysql_query("SELECT guid, username FROM {$CONFIG->dbprefix}users_entity");
+while ($user = mysql_fetch_object($users)) {
$to = $CONFIG->dataroot . user_file_matrix($user->guid);
foreach (array('1_0', '1_1', '1_6') as $version) {
$function = "file_matrix_$version";