summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-27 09:45:26 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-27 09:45:26 +0000
commitc95c17b13311c23998f494ce982da7c633a9285d (patch)
tree3c8172e9837ddb78dbba33c962d40ef384ff6a4f /modules
parent92ca1ba9abb37e49df83e5c313d00b16c19efc66 (diff)
Centralize logging around installing/uninstalling modules.
Diffstat (limited to 'modules')
-rw-r--r--modules/carousel/helpers/carousel_installer.php2
-rw-r--r--modules/comment/helpers/comment_installer.php2
-rw-r--r--modules/gmaps/helpers/gmaps_installer.php2
-rw-r--r--modules/info/helpers/info_installer.php2
-rw-r--r--modules/media_rss/helpers/media_rss_installer.php2
-rw-r--r--modules/search/helpers/search_installer.php5
-rw-r--r--modules/slideshow/helpers/slideshow_installer.php2
-rw-r--r--modules/tag/helpers/tag_installer.php2
-rw-r--r--modules/user/helpers/user_installer.php7
9 files changed, 1 insertions, 25 deletions
diff --git a/modules/carousel/helpers/carousel_installer.php b/modules/carousel/helpers/carousel_installer.php
index 3f4d55b5..b4522334 100644
--- a/modules/carousel/helpers/carousel_installer.php
+++ b/modules/carousel/helpers/carousel_installer.php
@@ -19,9 +19,7 @@
*/
class carousel_installer {
public static function install() {
- Kohana::log("debug", "carousel_installer::install");
$version = module::get_version("carousel");
- Kohana::log("debug", "carousel: $version");
if ($version == 0) {
module::set_version("carousel", 1);
}
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php
index ac035929..8310c6e1 100644
--- a/modules/comment/helpers/comment_installer.php
+++ b/modules/comment/helpers/comment_installer.php
@@ -19,10 +19,8 @@
*/
class comment_installer {
public static function install() {
- Kohana::log("debug", "comment_installer::install");
$db = Database::instance();
$version = module::get_version("comment");
- Kohana::log("debug", "version: $version");
if ($version == 0) {
$db->query("CREATE TABLE IF NOT EXISTS `comments` (
diff --git a/modules/gmaps/helpers/gmaps_installer.php b/modules/gmaps/helpers/gmaps_installer.php
index 8238ec88..fd3ddbe7 100644
--- a/modules/gmaps/helpers/gmaps_installer.php
+++ b/modules/gmaps/helpers/gmaps_installer.php
@@ -19,9 +19,7 @@
*/
class gmaps_installer {
public static function install() {
- Kohana::log("debug", "gmaps_installer::install");
$version = module::get_version("gmaps");
- Kohana::log("debug", "gmaps: $version");
if ($version == 0) {
module::set_version("gmaps", 1);
}
diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php
index edf55c5d..747fc639 100644
--- a/modules/info/helpers/info_installer.php
+++ b/modules/info/helpers/info_installer.php
@@ -19,9 +19,7 @@
*/
class info_installer {
public static function install() {
- Kohana::log("debug", "info_installer::install");
$version = module::get_version("info");
- Kohana::log("debug", "info: $version");
if ($version == 0) {
module::set_version("info", 1);
}
diff --git a/modules/media_rss/helpers/media_rss_installer.php b/modules/media_rss/helpers/media_rss_installer.php
index 481adf8a..aafea9d6 100644
--- a/modules/media_rss/helpers/media_rss_installer.php
+++ b/modules/media_rss/helpers/media_rss_installer.php
@@ -19,9 +19,7 @@
*/
class media_rss_installer {
public static function install() {
- Kohana::log("debug", "media_rss_installer::install");
$version = module::get_version("media_rss");
- Kohana::log("debug", "version: $version");
if ($version == 0) {
module::set_version("media_rss", 1);
}
diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php
index ebcab43b..24efe35a 100644
--- a/modules/search/helpers/search_installer.php
+++ b/modules/search/helpers/search_installer.php
@@ -19,18 +19,13 @@
*/
class search_installer {
public static function install() {
- Kohana::log("debug", "search_installer::install");
- $db = Database::instance();
$version = module::get_version("search");
- Kohana::log("debug", "version: $version");
-
if ($version == 0) {
module::set_version("search", 1);
}
}
public static function uninstall() {
- $db = Database::instance();
module::delete("search");
}
}
diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php
index bd8ef4fc..e505d32f 100644
--- a/modules/slideshow/helpers/slideshow_installer.php
+++ b/modules/slideshow/helpers/slideshow_installer.php
@@ -19,9 +19,7 @@
*/
class slideshow_installer {
public static function install() {
- Kohana::log("debug", "slideshow_installer::install");
$version = module::get_version("slideshow");
- Kohana::log("debug", "version: $version");
if ($version == 0) {
module::set_version("slideshow", 1);
}
diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php
index 379749ed..5734b243 100644
--- a/modules/tag/helpers/tag_installer.php
+++ b/modules/tag/helpers/tag_installer.php
@@ -19,10 +19,8 @@
*/
class tag_installer {
public static function install() {
- Kohana::log("debug", "tag_installer::install");
$db = Database::instance();
$version = module::get_version("tag");
- Kohana::log("debug", "tag: $version");
if ($version == 0) {
$db->query("CREATE TABLE IF NOT EXISTS `tags` (
`id` int(9) NOT NULL auto_increment,
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php
index f47975b7..ae9296f2 100644
--- a/modules/user/helpers/user_installer.php
+++ b/modules/user/helpers/user_installer.php
@@ -18,13 +18,9 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class user_installer {
- protected $has_many = array('items');
-
public static function install() {
- Kohana::log("debug", "user_installer::install");
$db = Database::instance();
$version = module::get_version("user");
- Kohana::log("debug", "version: $version");
if ($version == 0) {
$db->query("CREATE TABLE IF NOT EXISTS `users` (
@@ -54,8 +50,6 @@ class user_installer {
UNIQUE KEY(`user_id`, `group_id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- module::set_version("user", 1);
-
$registered = group::create("Registered Users");
// @todo: get this info from the installer
@@ -67,6 +61,7 @@ class user_installer {
// Let the admin own everything
$db->query("UPDATE `items` SET `owner_id` = {$admin->id} WHERE `owner_id` IS NULL");
+ module::set_version("user", 1);
}
}