diff options
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..82c3c938 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}"); |