summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-25 02:14:04 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-25 02:14:04 +0000
commitc725a0f16eeb0dfaff47549898540b178b7d4b48 (patch)
treed6b97627faa3a99490793de0aa092e38b165da0d
parent1ad18467745612ecc892550810d55a4fe371409c (diff)
Move comment listing into the comment module
-rw-r--r--modules/comment/helpers/comment_block.php25
-rw-r--r--themes/default/views/photo.html.php4
2 files changed, 25 insertions, 4 deletions
diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php
new file mode 100644
index 00000000..58a1a416
--- /dev/null
+++ b/modules/comment/helpers/comment_block.php
@@ -0,0 +1,25 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2008 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+class comment_block_Core {
+ public static function photo_bottom($theme) {
+ return comment::block($theme, true);
+ }
+} \ No newline at end of file
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php
index 2a5079b4..f9ce96cf 100644
--- a/themes/default/views/photo.html.php
+++ b/themes/default/views/photo.html.php
@@ -9,9 +9,5 @@
<h1><?= $item->title_edit ?></h1>
<div><?= $item->description_edit ?></div>
- <? if (module::is_installed("comment")): ?>
- <?= comment::block($theme, true); ?>
- <? endif ?>
-
<?= $theme->photo_bottom() ?>
</div>