summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/controllers/admin_manage_comments.php (renamed from modules/comment/controllers/admin_comments.php)14
-rw-r--r--modules/comment/helpers/comment_event.php10
-rw-r--r--modules/comment/views/admin_comments.html.php8
3 files changed, 20 insertions, 12 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_manage_comments.php
index 68794638..338e4799 100644
--- a/modules/comment/controllers/admin_comments.php
+++ b/modules/comment/controllers/admin_manage_comments.php
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
-class Admin_Comments_Controller extends Admin_Controller {
+class Admin_Manage_Comments_Controller extends Admin_Controller {
private static $items_per_page = 20;
public function index() {
@@ -29,7 +29,7 @@ class Admin_Comments_Controller extends Admin_Controller {
->execute();
// Redirect to the appropriate queue
- url::redirect("admin/comments/queue/unpublished");
+ url::redirect("admin/manage_comments/queue/unpublished");
}
public function menu_labels() {
@@ -71,25 +71,25 @@ class Admin_Comments_Controller extends Admin_Controller {
->label(t2("Awaiting Moderation (%count)",
"Awaiting Moderation (%count)",
$counts->unpublished))
- ->url(url::site("admin/comments/queue/unpublished")))
+ ->url(url::site("admin/manage_comments/queue/unpublished")))
->append(Menu::factory("link")
->id("published")
->label(t2("Approved (%count)",
"Approved (%count)",
$counts->published))
- ->url(url::site("admin/comments/queue/published")))
+ ->url(url::site("admin/manage_comments/queue/published")))
->append(Menu::factory("link")
->id("spam")
->label(t2("Spam (%count)",
"Spam (%count)",
$counts->spam))
- ->url(url::site("admin/comments/queue/spam")))
+ ->url(url::site("admin/manage_comments/queue/spam")))
->append(Menu::factory("link")
->id("deleted")
->label(t2("Recently Deleted (%count)",
"Recently Deleted (%count)",
$counts->deleted))
- ->url(url::site("admin/comments/queue/deleted")));
+ ->url(url::site("admin/manage_comments/queue/deleted")));
}
private function _counts() {
@@ -127,7 +127,7 @@ class Admin_Comments_Controller extends Admin_Controller {
->delete("comments")
->where("state", "=", "spam")
->execute();
- url::redirect("admin/comments/queue/spam");
+ url::redirect("admin/manage_comments/queue/spam");
}
}
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php
index 51e663e6..25fd4171 100644
--- a/modules/comment/helpers/comment_event.php
+++ b/modules/comment/helpers/comment_event.php
@@ -51,11 +51,19 @@ class comment_event_Core {
}
static function admin_menu($menu, $theme) {
+ /*
+ $menu->get("settings_menu")
+ ->append(Menu::factory("link")
+ ->id("comment")
+ ->label(t("Comments"))
+ ->url(url::site("admin/comments")));
+ */
+
$menu->get("content_menu")
->append(Menu::factory("link")
->id("comments")
->label(t("Comments"))
- ->url(url::site("admin/comments")));
+ ->url(url::site("admin/manage_comments")));
}
static function photo_menu($menu, $theme) {
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php
index f58267bd..34a28986 100644
--- a/modules/comment/views/admin_comments.html.php
+++ b/modules/comment/views/admin_comments.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
var set_state_url =
- <?= html::js_string(url::site("admin/comments/set_state/__ID__/__STATE__?csrf=$csrf")) ?>;
+ <?= html::js_string(url::site("admin/manage_comments/set_state/__ID__/__STATE__?csrf=$csrf")) ?>;
function set_state(state, id) {
$.get(set_state_url.replace("__STATE__", state).replace("__ID__", id),
{},
@@ -12,7 +12,7 @@
}
var delete_url =
- <?= html::js_string(url::site("admin/comments/delete/__ID__?csrf=$csrf")) ?>;
+ <?= html::js_string(url::site("admin/manage_comments/delete/__ID__?csrf=$csrf")) ?>;
function del(id) {
$.get(delete_url.replace("__ID__", id),
@@ -24,7 +24,7 @@
}
function update_menu() {
- $.get(<?= html::js_string(url::site("admin/comments/menu_labels")) ?>, {},
+ $.get(<?= html::js_string(url::site("admin/manage_comments/menu_labels")) ?>, {},
function(data) {
for (var i = 0; i < data.length; i++) {
$("#g-admin-comments-menu li:eq(" + i + ") a").html(data[i]);
@@ -73,7 +73,7 @@
$counts->spam) ?>
</p>
<p>
- <a href="<?= url::site("admin/comments/delete_all_spam?csrf=$csrf") ?>">
+ <a href="<?= url::site("admin/manage_comments/delete_all_spam?csrf=$csrf") ?>">
<?= t("Delete all spam") ?>
</a>
<? else: ?>