summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/admin_sidebar.php2
-rw-r--r--modules/gallery/controllers/packager.php14
2 files changed, 3 insertions, 13 deletions
diff --git a/modules/gallery/controllers/admin_sidebar.php b/modules/gallery/controllers/admin_sidebar.php
index c83b5a37..6c8d15f1 100644
--- a/modules/gallery/controllers/admin_sidebar.php
+++ b/modules/gallery/controllers/admin_sidebar.php
@@ -35,7 +35,7 @@ class Admin_Sidebar_Controller extends Admin_Controller {
$active_blocks = array();
foreach ($this->input->get("block", array()) as $block_id) {
- $active_blocks[] = explode(":", (string) $block_id);
+ $active_blocks[md5($block_id)] = explode(":", (string) $block_id);
}
block_manager::set_active("site.sidebar", $active_blocks);
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php
index ae87d74b..f0e35b2d 100644
--- a/modules/gallery/controllers/packager.php
+++ b/modules/gallery/controllers/packager.php
@@ -62,6 +62,7 @@ class Packager_Controller extends Controller {
srand(0);
gallery_installer::install(true);
+
module::load_modules();
foreach (array("user", "comment", "organize", "info", "rss",
@@ -72,21 +73,10 @@ 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("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}");
- $db->query("DELETE FROM {vars} WHERE `module_name` = 'core' AND `name` = '_cache'");
+ $db->query("DELETE FROM {vars} WHERE `module_name` = 'gallery' AND `name` = '_cache'");
$db->update("users", array("password" => ""), array("id" => 1));
$db->update("users", array("password" => ""), array("id" => 2));