diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:11:47 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:11:47 -0700 |
| commit | 74363ced870d4114e7570729636875e0258917b3 (patch) | |
| tree | 61bc27831a362994fc96ea90172d50e25d5c76cb /modules/akismet/helpers/akismet_event.php | |
| parent | 98e9a96ba4d2419e02717369be8c0d886bc35ef7 (diff) | |
| parent | 4828db003f3ee505eb9e6d056cdb142da34b78ff (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3 into HEAD
Conflicts:
modules/slideshow/helpers/slideshow_event.php
Diffstat (limited to 'modules/akismet/helpers/akismet_event.php')
| -rw-r--r-- | modules/akismet/helpers/akismet_event.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/modules/akismet/helpers/akismet_event.php b/modules/akismet/helpers/akismet_event.php index 80fe0127..cec6d95d 100644 --- a/modules/akismet/helpers/akismet_event.php +++ b/modules/akismet/helpers/akismet_event.php @@ -40,15 +40,31 @@ class akismet_event_Core { $comment->save(); } - static function comment_updated($old, $new) { + static function comment_updated($original, $new) { if (!module::get_var("akismet", "api_key")) { return; } - if ($old->state != "spam" && $new->state == "spam") { + if ($original->state != "spam" && $new->state == "spam") { akismet::submit_spam($new); - } else if ($old->state == "spam" && $new->state != "spam") { + } else if ($original->state == "spam" && $new->state != "spam") { akismet::submit_ham($new); } } + + static function admin_menu($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("akismet") + ->label(t("Akismet")) + ->url(url::site("admin/akismet"))); + + if (module::get_var("akismet", "api_key")) { + $menu->get("statistics_menu") + ->append(Menu::factory("link") + ->id("akismet") + ->label(t("Akismet")) + ->url(url::site("admin/akismet/stats"))); + } + } } |
