diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-13 09:14:39 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-13 09:14:39 -0800 |
commit | def88149ccf8b542b376b96dd25c52f2ec6920e1 (patch) | |
tree | 310ec0dfc5ea65dbfa68d3434ef7598d04b00857 /modules/gallery/controllers/packager.php | |
parent | ab37d89bba88de676123069e4f9072e3706c4dc0 (diff) |
Undo using the md5 hash of the module name and block_id, so duplicate blocks are no allowed again
Diffstat (limited to 'modules/gallery/controllers/packager.php')
-rw-r--r-- | modules/gallery/controllers/packager.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php index f0e35b2d..b2550603 100644 --- a/modules/gallery/controllers/packager.php +++ b/modules/gallery/controllers/packager.php @@ -73,6 +73,17 @@ class Packager_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("dashboard_sidebar", "dashboard_center", "site.sidebar") as $key) { + $blocks = array(); + foreach (unserialize(module::get_var("gallery", "blocks_{$key}")) as $rnd => $value) { + $blocks[++$i] = $value; + } + module::set_var("gallery", "blocks_{$key}", serialize($blocks)); + } + $db = Database::instance(); $db->query("TRUNCATE {sessions}"); $db->query("TRUNCATE {logs}"); |