diff options
-rw-r--r-- | core/helpers/module.php | 4 | ||||
-rw-r--r-- | themes/default/views/photo.html.php | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/helpers/module.php b/core/helpers/module.php index dbb2e989..8e6ef3ac 100644 --- a/core/helpers/module.php +++ b/core/helpers/module.php @@ -44,4 +44,8 @@ class Module_Core { public static function delete ($module_name) { ORM::factory("module")->where("name", $module_name)->find()->delete(); } + + public static function is_installed($module_name) { + return ORM::factory("module")->where("name", $module_name)->find()->loaded; + } } diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 8b8f44d4..512c1e17 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -9,5 +9,7 @@ <h1><?= $item->title_edit ?></h1> <div><?= $item->description_edit ?></div> - <?= comment::block($theme, true); ?> + <? if (module::is_installed("comment")): ?> + <?= comment::block($theme, true); ?> + <? endif ?> </div> |