diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 11:51:20 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 11:51:20 -0800 |
| commit | 594742b7d1c9960f08253411f3d7c08532bddd7f (patch) | |
| tree | aee12e2775ec7cd5b9e2b8e6e841793050e36b26 /modules/gallery/controllers/packager.php | |
| parent | d12e3698e3e6a259f34ced2050e4343f54e130aa (diff) | |
| parent | 670629fe10322ca3b996d2ec4206a1aa71ae449d (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3
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}"); |
