mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 17:29:18 -04:00
Normalize the random values used in the blocks_dashboard_xxx vars so
that install.sql is more stable.
This commit is contained in:
@@ -72,6 +72,15 @@ class Package_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}");
|
||||
|
||||
Reference in New Issue
Block a user