Refactor dashboard block handling out into a dashboard helper so that

module installers don't have to know the grotty details of how it works.
This commit is contained in:
Bharat Mediratta
2009-01-12 08:51:54 +00:00
parent bc421a615a
commit c5f77510a7
4 changed files with 82 additions and 50 deletions
@@ -50,9 +50,7 @@ class comment_installer {
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
$dashboard_blocks = unserialize(module::get_var("core", "dashboard_blocks"));
$dashboard_blocks["main"][rand()] = array("comment", "recent_comments");
module::set_var("core", "dashboard_blocks", serialize($dashboard_blocks));
dashboard::add_block("main", "comment", "recent_comments");
module::set_var("comment", "spam_caught", 0);
module::set_version("comment", 1);
}