summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/controllers/welcome.php162
-rw-r--r--core/helpers/module.php4
-rw-r--r--core/views/welcome.html.php5
-rw-r--r--core/views/welcome_package.html.php33
-rw-r--r--installer/init_var.php18
-rw-r--r--installer/install.sql59
6 files changed, 137 insertions, 144 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index d957e335..ab23fe99 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -53,7 +53,6 @@ class Welcome_Controller extends Template_Controller {
$this->_load_group_info();
$this->_load_comment_info();
$this->_load_tag_info();
- $this->_load_table_info();
restore_error_handler();
$this->_create_directories();
@@ -64,7 +63,7 @@ class Welcome_Controller extends Template_Controller {
}
}
- function install($module_name) {
+ function install($module_name, $redirect=true) {
$to_install = array();
if ($module_name == "*") {
foreach (module::available() as $module_name => $info) {
@@ -83,10 +82,12 @@ class Welcome_Controller extends Template_Controller {
module::install($module_name);
}
- url::redirect("welcome");
+ if ($redirect) {
+ url::redirect("welcome");
+ }
}
- function uninstall($module_name) {
+ function uninstall($module_name, $redirect=true) {
$clean = true;
if ($module_name == "core") {
// We have to uninstall all other modules first, else their tables, etc don't
@@ -118,7 +119,9 @@ class Welcome_Controller extends Template_Controller {
} else {
module::uninstall($module_name);
}
- url::redirect("welcome");
+ if ($redirect) {
+ url::redirect("welcome");
+ }
}
function mptt() {
@@ -465,94 +468,87 @@ class Welcome_Controller extends Template_Controller {
}
}
- private function _load_table_info() {
- $this->template->package = new View("welcome_package.html");
+ public function package() {
+ $this->auto_render = false;
+
+ // Cleanly uninstalling and reinstalling within the same request requires us to do the "cache
+ // invalidation" cha-cha. It's a dance of many steps.
+ $this->uninstall("core", false);
+ module::$module_names = array();
+ module::$modules = array();
+ Database::instance()->clear_cache();
+ $this->install("core", false);
module::load_modules();
- $modules = module::installed();
- $this->template->package->installed = array();
- foreach (array_keys($modules) as $module_name) {
- $this->template->package->installed[$module_name] = $module_name == "core" || $module_name == "user";
+ foreach (array("core", "user", "comment", "info",
+ "media_rss", "search", "slideshow", "tag") as $module_name) {
+ $this->install($module_name, false);
}
+ url::redirect("welcome/dump_database");
}
- public function package() {
+ public function dump_database() {
$this->auto_render = false;
- try {
- $tables = array("sessions"); // The sessions table doesn't have a module so include it
- $modules = array_fill_keys(array_merge(array("core", "user"), $_POST["include"]), 1);
-
- foreach (array(APPPATH . "models/*.php", MODPATH . "*/models/*.php") as $path) {
- foreach (glob($path) as $file) {
- if (preg_match("#.*/(.*)/models/(.*)\.php$#", $file, $matches)) {
- if (!empty($modules[$matches[1]])) {
- $tables[] = "{$matches[2]}s";
- }
- }
- }
- }
- $var_dir = dir(VARPATH);
- $init_g3 = array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\");");
-
- $init_g3 = array_merge($init_g3, array(
- "if (!file_exists(VARPATH)) {",
- " if (!@mkdir(VARPATH)) {",
- " throw new Exception(\"Unable to create directory '\" . VARPATH . \"'\");",
- " }",
- " chmod(VARPATH, 0777);",
- "}"));
-
- $sub_dirs = array();
- while (false !== $entry = $var_dir->read()) {
- if ($entry == "." || $entry == "..") {
- continue;
- }
- if (is_dir(VARPATH . $entry) & $entry != "g3_installer") {
- $sub_dirs[] = "\"$entry\"";
- }
- }
- $var_dir->close();
-
- $init_g3 = array_merge($init_g3, array(
- "foreach (array(" . implode(", ", $sub_dirs) . ") as \$dir) {",
- " if (!@mkdir(\"var/\$dir\")) {",
- " throw new Exception(\"Unable to create directory '\$dir'\");",
- " }",
- " chmod(\"var/\$dir\", 0777);",
- "}"));
-
- $install_data = VARPATH . "g3_installer/";
- if (!file_exists($install_data)) {
- mkdir($install_data);
- chmod($install_data, 0775);
- }
+ // We now have a clean install with just the packages that we want. Make sure that the
+ // database is clean too.
+ $db = Database::instance();
+ $db->query("TRUNCATE `sessions`");
+ $db->query("TRUNCATE `logs`");
+ $db->query("UPDATE `users` SET `password` = '' WHERE `id` = 2");
+
+ $dbconfig = Kohana::config('database.default');
+ $dbconfig = $dbconfig["connection"];
+ $pass = $dbconfig["pass"] ? "-p{$dbconfig['pass']}" : "";
+ $sql_file = DOCROOT . "installer/install.sql";
+ if (!is_writable($sql_file)) {
+ print "$sql_file is not writeable";
+ return;
+ }
+ $command = "mysqldump --compact --add-drop-table -h{$dbconfig['host']} " .
+ "-u{$dbconfig['user']} $pass {$dbconfig['database']} > $sql_file";
+ exec($command, $output, $status);
+ if ($status) {
+ print "<pre>";
+ print "$command\n";
+ print "Failed to dump database\n";
+ print implode("\n", $output);
+ return;
+ }
+ url::redirect("welcome/dump_var");
+ }
+
+ public function dump_var() {
+ $this->auto_render = false;
- file_put_contents("$install_data/init_var.php", implode("\n", $init_g3));
-
- // Dump the database tables and data.
- $dbconfig = Kohana::config('database.default');
- $dbconfig = $dbconfig["connection"];
- $db_install_sql = "{$install_data}install.sql";
- $command = "mysqldump --compact --add-drop-table -h{$dbconfig['host']} " .
- "-u{$dbconfig['user']} -p{$dbconfig['pass']} $no_data {$dbconfig['database']} " .
- "> \"$db_install_sql\"";
- exec($command, $output, $status);
- if ($status) {
- Kohana::log("alert", implode("\n", $output));
- throw new Exception("@TODO FAILED TO DUMP DATABASE SEE LOGS");
+ $objects = new RecursiveIteratorIterator(
+ new RecursiveDirectoryIterator(VARPATH),
+ RecursiveIteratorIterator::SELF_FIRST);
+
+ $var_file = DOCROOT . "installer/init_var.php";
+ if (!is_writable($var_file)) {
+ print "$var_file is not writeable";
+ return;
+ }
+
+ $fd = fopen($var_file, "w");
+ fwrite($fd, "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");\n");
+ foreach($objects as $name => $file){
+ if ($file->getBasename() == "database.php") {
+ continue;
+ } else if (basename($file->getPath()) == "logs") {
+ continue;
}
- $installer_path = DOCROOT . "installer/data";
- print json_encode(
- array("result" => "success",
- "message" => "Gallery3 initial sql created. <br/>Copy the files from " .
- "'$install_data' to <br/>'$installer_path'."));
- } catch(Exception $e) {
- Kohana::log("alert", $e->getMessage() . "\n" . $e->getTraceAsString());
- print json_encode(
- array("result" => "error",
- "message" => $e->getMessage()));
+ if ($file->isDir()) {
+ fwrite($fd, "mkdir(\"var/" . substr($name, strlen(VARPATH)) . "\");\n");
+ } else {
+ // @todo: serialize non-directories
+ print "Unknown file: $name";
+ return;
+ }
}
+ fclose($fd);
+ url::redirect("welcome");
}
public function add_user() {
diff --git a/core/helpers/module.php b/core/helpers/module.php
index b45f6c78..70e9bec6 100644
--- a/core/helpers/module.php
+++ b/core/helpers/module.php
@@ -24,8 +24,8 @@
* Note: by design, this class does not do any permission checking.
*/
class module_Core {
- private static $module_names = array();
- private static $modules = array();
+ public static $module_names = array();
+ public static $modules = array();
static function get_version($module_name) {
return ORM::factory("module")->where("name", $module_name)->find()->version;
diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php
index 27aa6184..be801163 100644
--- a/core/views/welcome.html.php
+++ b/core/views/welcome.html.php
@@ -295,7 +295,10 @@
<input type="hidden" name="type" value="album"/>
</form>
</fieldset>
- <?= $package ?>
+ <fieldset>
+ <legend>Packaging</legend>
+ <a href="<?= url::site("welcome/package") ?>">Make Package</a>
+ </fieldset>
<? if (module::is_installed("rearrange")): ?>
<fieldset>
<legend>Rearrange</legend>
diff --git a/core/views/welcome_package.html.php b/core/views/welcome_package.html.php
deleted file mode 100644
index 6996dda6..00000000
--- a/core/views/welcome_package.html.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script>
-$("document").ready(function() {
- ajaxify_package_form();
-});
-
-function ajaxify_package_form() {
- $("#gPackageSQL").ajaxForm({
- dataType: "json",
- success: function(data) {
- if (data.result == "success") {
- $("#gSuccessMsg").html(data.message);
- $("#gSuccessMsg").removeClass("gHide");
- $("#gFailMsg").addClass("gHide");
- } else {
- $("#gFailMsg").html(data.message);
- $("#gFailMsg").removeClass("gHide");
- $("#gSuccessMsg").addClass("gHide");
- }
- }
- });
-};
-
-</script>
-<fieldset>
- <legend>Create install.sql</legend>
- <p>Press the button to extract the initial database configuration.</p>
- <form id="gPackageSQL" action="<?= url::site("welcome/package") ?>" method="POST">
- <input type="Submit" value="Package" />
- <div id="gSuccessMsg" class="success gHide"></div>
- <div id="gFailMsg" class="error gHide"></div>
- </form>
-</fieldset>
diff --git a/installer/init_var.php b/installer/init_var.php
index 42d50c0a..471de7e7 100644
--- a/installer/init_var.php
+++ b/installer/init_var.php
@@ -1,13 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
-if (!file_exists(VARPATH)) {
- if (!@mkdir(VARPATH)) {
- throw new Exception("Unable to create directory '" . VARPATH . "'");
- }
- chmod(VARPATH, 0777);
-}
-foreach (array("resizes", "modules", "uploads", "logs", "albums", "thumbs") as $dir) {
- if (!@mkdir("var/$dir")) {
- throw new Exception("Unable to create directory '$dir'");
- }
- chmod("var/$dir", 0777);
-} \ No newline at end of file
+mkdir("var/albums");
+mkdir("var/resizes");
+mkdir("var/thumbs");
+mkdir("var/logs");
+mkdir("var/uploads");
+mkdir("var/modules");
diff --git a/installer/install.sql b/installer/install.sql
index f87b930f..4871f56b 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -11,7 +11,7 @@ CREATE TABLE `access_caches` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `access_caches` VALUES (1,1,1,0,1,1);
+INSERT INTO `access_caches` VALUES (1,1,0,0,0,0);
DROP TABLE IF EXISTS `access_intents`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -27,7 +27,7 @@ CREATE TABLE `access_intents` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `access_intents` VALUES (1,1,1,1,0,1,1,1);
+INSERT INTO `access_intents` VALUES (1,1,0,0,0,0,0,0);
DROP TABLE IF EXISTS `comments`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -143,7 +143,19 @@ CREATE TABLE `items` (
KEY `type` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `items` VALUES (NULL,1232112015,'Welcome to your Gallery3',NULL,1,1,1,NULL,NULL,2,0,NULL,NULL,1,2,NULL,NULL,1,'Gallery','album',1232112015,5,NULL,1,1);
+INSERT INTO `items` VALUES (NULL,1232341626,'Welcome to your Gallery3',NULL,1,1,1,NULL,NULL,2,0,NULL,NULL,1,2,NULL,NULL,1,'Gallery','album',1232341626,0,NULL,0,0);
+DROP TABLE IF EXISTS `items_tags`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `items_tags` (
+ `id` int(9) NOT NULL auto_increment,
+ `item_id` int(9) NOT NULL,
+ `tag_id` int(9) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `tag_id` (`tag_id`,`id`),
+ KEY `item_id` (`item_id`,`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `logs`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -158,9 +170,8 @@ CREATE TABLE `logs` (
`url` varchar(255) default NULL,
`user_id` int(9) default '0',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `logs` VALUES (1,'module','','Installed module core','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232112015,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/core',0),(2,'module','','Installed module user','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232112019,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/user',1),(3,'module','','Installed module comment','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232113208,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/comment',1),(4,'module','','Installed module akismet','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232113211,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/akismet',1),(5,'user','','User admin logged in','http://sandbox.timalmdal.com:1955/gallery3/index.php/albums/1',2,1232172351,'http://sandbox.timalmdal.com:1955/gallery3/index.php/login',2);
DROP TABLE IF EXISTS `messages`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -171,9 +182,8 @@ CREATE TABLE `messages` (
`severity` varchar(32) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `messages` VALUES (1,'akismet_config','Akismet is not quite ready! Please provide an <a href=\"/gallery3/index.php/admin/akismet\">API Key</a>','3');
DROP TABLE IF EXISTS `modules`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -183,9 +193,9 @@ CREATE TABLE `modules` (
`version` int(9) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `modules` VALUES (1,'core',1),(2,'user',1),(3,'comment',1),(4,'akismet',1);
+INSERT INTO `modules` VALUES (1,'core',1),(2,'user',1),(3,'comment',1),(4,'info',1),(5,'media_rss',1),(6,'search',1),(7,'slideshow',1),(8,'tag',1);
DROP TABLE IF EXISTS `permissions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -198,6 +208,19 @@ CREATE TABLE `permissions` (
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
INSERT INTO `permissions` VALUES (1,'view','View'),(2,'view_full','View Full Size'),(3,'edit','Edit');
+DROP TABLE IF EXISTS `search_records`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `search_records` (
+ `id` int(9) NOT NULL auto_increment,
+ `item_id` int(9) default NULL,
+ `dirty` tinyint(1) default '1',
+ `data` longtext,
+ PRIMARY KEY (`id`),
+ FULLTEXT KEY `data` (`data`)
+) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO `search_records` VALUES (1,1,0,'Welcome to your Gallery3 Gallery ');
DROP TABLE IF EXISTS `sessions`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -208,7 +231,17 @@ CREATE TABLE `sessions` (
PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `sessions` VALUES ('7d414ede0f86afc6079a90e424b51c41',1232179528,'c2Vzc2lvbl9pZHxzOjMyOiI3ZDQxNGVkZTBmODZhZmM2MDc5YTkwZTQyNGI1MWM0MSI7dG90YWxfaGl0c3xpOjc0O19rZl9mbGFzaF98YTowOnt9dXNlcl9hZ2VudHxzOjkwOiJNb3ppbGxhLzUuMCAoV2luZG93czsgVTsgV2luZG93cyBOVCA1LjE7IGVuLVVTOyBydjoxLjkuMC41KSBHZWNrby8yMDA4MTIwMTIyIEZpcmVmb3gvMy4wLjUiO2lwX2FkZHJlc3N8czoxMzoiMjQuNjkuMjExLjEzNSI7bGFzdF9hY3Rpdml0eXxpOjEyMzIxNzk1MjE7dXNlcnxPOjEwOiJVc2VyX01vZGVsIjo2OntzOjE0OiIAKgBvYmplY3RfbmFtZSI7czo0OiJ1c2VyIjtzOjk6IgAqAG9iamVjdCI7YToxMDp7czoyOiJpZCI7aToyO3M6NDoibmFtZSI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7czo5OiJmdWxsX25hbWUiO3M6MTA6Ikd1ZXN0IFVzZXIiO3M6ODoicGFzc3dvcmQiO3M6MzY6Im1QYGhmNmJmMjViOTBlMjc2NWZmZTJlNjU3MzdiMTQyZGJhNSI7czoxMToibG9naW5fY291bnQiO2k6MDtzOjEwOiJsYXN0X2xvZ2luIjtpOjA7czo1OiJlbWFpbCI7TjtzOjU6ImFkbWluIjtpOjA7czo1OiJndWVzdCI7aToxO3M6MzoidXJsIjtOO31zOjEwOiIAKgBjaGFuZ2VkIjthOjA6e31zOjk6IgAqAGxvYWRlZCI7YjoxO3M6ODoiACoAc2F2ZWQiO2I6MTtzOjEwOiIAKgBzb3J0aW5nIjthOjE6e3M6MjoiaWQiO3M6MzoiYXNjIjt9fWdyb3VwX2lkc3xhOjE6e2k6MDtpOjE7fWNzcmZ8czozMjoiYzlhZDY2YmFjMzRhYjk5Y2NmOTRiMGEwMjhkNWI3ZWQiOw==');
+DROP TABLE IF EXISTS `tags`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `tags` (
+ `id` int(9) NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL,
+ `count` int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `tasks`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -255,7 +288,7 @@ CREATE TABLE `users` (
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `users` VALUES (1,'guest','Guest User','mP`hf6bf25b90e2765ffe2e65737b142dba5',0,0,NULL,0,1,NULL),(2,'admin','Gallery Administrator','SU]63326748b5026b4d7b5d5c8c83a266743',1,1232172351,NULL,1,0,NULL);
+INSERT INTO `users` VALUES (1,'guest','Guest User','qb9ta17514f489c7c0d46c6832c678849e47',0,0,NULL,0,1,NULL),(2,'admin','Gallery Administrator','',0,0,NULL,1,0,NULL);
DROP TABLE IF EXISTS `vars`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
@@ -266,6 +299,6 @@ CREATE TABLE `vars` (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `module_name` (`module_name`,`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
-INSERT INTO `vars` VALUES (1,'core','active_site_theme','default'),(2,'core','active_admin_theme','admin_default'),(3,'core','page_size','9'),(4,'core','thumb_size','200'),(5,'core','resize_size','640'),(6,'core','graphics_toolkit','imagemagick'),(7,'core','graphics_toolkit_path','/usr/bin'),(8,'core','dashboard_blocks','a:2:{s:7:\"sidebar\";a:3:{i:1897057832;a:2:{i:0;s:4:\"core\";i:1;s:5:\"stats\";}i:863091211;a:2:{i:0;s:4:\"core\";i:1;s:13:\"platform_info\";}i:1286303073;a:2:{i:0;s:4:\"core\";i:1;s:12:\"project_news\";}}s:4:\"main\";a:4:{i:1969666309;a:2:{i:0;s:4:\"core\";i:1;s:7:\"welcome\";}i:353682022;a:2:{i:0;s:4:\"core\";i:1;s:12:\"photo_stream\";}i:1636721943;a:2:{i:0;s:4:\"core\";i:1;s:11:\"log_entries\";}i:458629768;a:2:{i:0;s:7:\"comment\";i:1;s:15:\"recent_comments\";}}}'),(9,'core','version','3.0'),(10,'comment','spam_caught','0');
+INSERT INTO `vars` VALUES (1,'core','active_site_theme','default'),(2,'core','active_admin_theme','admin_default'),(3,'core','page_size','9'),(4,'core','thumb_size','200'),(5,'core','resize_size','640'),(6,'core','graphics_toolkit','imagemagick'),(7,'core','graphics_toolkit_path','/usr/bin'),(8,'core','blocks_dashboard_sidebar','a:4:{i:296985161;a:2:{i:0;s:4:\"core\";i:1;s:11:\"block_adder\";}i:226504839;a:2:{i:0;s:4:\"core\";i:1;s:5:\"stats\";}i:603830327;a:2:{i:0;s:4:\"core\";i:1;s:13:\"platform_info\";}i:1728549679;a:2:{i:0;s:4:\"core\";i:1;s:12:\"project_news\";}}'),(9,'core','blocks_dashboard_center','a:4:{i:1086295926;a:2:{i:0;s:4:\"core\";i:1;s:7:\"welcome\";}i:55717447;a:2:{i:0;s:4:\"core\";i:1;s:12:\"photo_stream\";}i:1368963415;a:2:{i:0;s:4:\"core\";i:1;s:11:\"log_entries\";}i:2029466538;a:2:{i:0;s:7:\"comment\";i:1;s:15:\"recent_comments\";}}'),(10,'core','version','3.0'),(11,'comment','spam_caught','0');