aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-12 02:09:50 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-12 02:09:50 +0000
commit868c5c7aa1cccb55a3c64aa463dbcd343b5273d6 (patch)
tree3fe9962b760ed86545fd1037052d41533dca7567 /engine/lib
parentc6299905a4f25b763fc2469b1a59e6405dee11a8 (diff)
downloadelgg-868c5c7aa1cccb55a3c64aa463dbcd343b5273d6.tar.gz
elgg-868c5c7aa1cccb55a3c64aa463dbcd343b5273d6.tar.bz2
Data migration: Disabled execution time and clearing out caches to avoid OOM errors.
git-svn-id: http://code.elgg.org/elgg/trunk@3668 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/upgrades/2009102801.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/lib/upgrades/2009102801.php b/engine/lib/upgrades/2009102801.php
index 23149e5c5..fea59b411 100644
--- a/engine/lib/upgrades/2009102801.php
+++ b/engine/lib/upgrades/2009102801.php
@@ -1,5 +1,8 @@
<?php
+// disable timeout for large sites.
+set_time_limit(0);
+
/**
Elgg 1.0
*/
@@ -173,12 +176,14 @@ function user_file_matrix($guid) {
return "$time_created/$user->guid/";
}
-
+global $DB_QUERY_CACHE, $DB_PROFILE, $ENTITY_CACHE;
/**
Upgrade file locations
*/
$users = mysql_query("SELECT guid, username FROM {$CONFIG->dbprefix}users_entity");
while ($user = mysql_fetch_object($users)) {
+ $DB_QUERY_CACHE = $DB_PROFILE = $ENTITY_CACHE = array();
+
$to = $CONFIG->dataroot . user_file_matrix($user->guid);
foreach (array('1_0', '1_1', '1_6') as $version) {
$function = "file_matrix_$version";