diff options
-rw-r--r-- | modules/comment/controllers/admin_manage_comments.php (renamed from modules/comment/controllers/admin_comments.php) | 16 | ||||
-rw-r--r-- | modules/comment/helpers/comment_event.php | 10 | ||||
-rw-r--r-- | modules/comment/views/admin_manage_comments.html.php (renamed from modules/comment/views/admin_comments.html.php) | 8 | ||||
-rw-r--r-- | modules/digibug/helpers/digibug_event.php | 2 |
4 files changed, 22 insertions, 14 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_manage_comments.php index 68794638..bc1c9e64 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() { @@ -45,7 +45,7 @@ class Admin_Comments_Controller extends Admin_Controller { $view = new Admin_View("admin.html"); $view->page_title = t("Manage comments"); - $view->content = new View("admin_comments.html"); + $view->content = new View("admin_manage_comments.html"); $view->content->counts = $this->_counts(); $view->content->menu = $this->_menu($view->content->counts); $view->content->state = $state; @@ -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_manage_comments.html.php index f58267bd..34a28986 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_manage_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: ?> diff --git a/modules/digibug/helpers/digibug_event.php b/modules/digibug/helpers/digibug_event.php index 4c842615..413bf586 100644 --- a/modules/digibug/helpers/digibug_event.php +++ b/modules/digibug/helpers/digibug_event.php @@ -28,7 +28,7 @@ class digibug_event_Core { static function site_menu($menu, $theme) { $item = $theme->item(); - if ($item->type == "photo") { + if ($item && $item->type == "photo") { $menu->get("options_menu") ->append(Menu::factory("link") ->id("digibug") |