summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-01 00:22:30 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-01 00:22:30 -0700
commitc94c11eb3e4f48d2dbcc73ea6ca9358170733392 (patch)
treee2c7232a799c2cfeac770a387b4ea995014dd241 /modules
parente4f4c8b2e878ae2941ce784cc7f6b5b219f55c18 (diff)
Normalize the random values used in the blocks_dashboard_xxx vars so
that install.sql is more stable.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/controllers/package.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/controllers/package.php b/modules/gallery/controllers/package.php
index 1b096cb5..f5146fc8 100644
--- a/modules/gallery/controllers/package.php
+++ b/modules/gallery/controllers/package.php
@@ -72,6 +72,15 @@ class Package_Controller extends Controller {
private function _dump_database() {
// We now have a clean install with just the packages that we want. Make sure that the
// database is clean too.
+ $i = 1;
+ foreach (array("blocks_dashboard_sidebar", "blocks_dashboard_center") as $key) {
+ $blocks = array();
+ foreach (unserialize(module::get_var("gallery", $key)) as $rnd => $value) {
+ $blocks[++$i] = $value;
+ }
+ module::set_var("gallery", $key, serialize($blocks));
+ }
+
$db = Database::instance();
$db->query("TRUNCATE {sessions}");
$db->query("TRUNCATE {logs}");