From ea5faab2b05ddd2da90199527ea52f8ee3d33327 Mon Sep 17 00:00:00 2001 From: Max Klaversma Date: Thu, 17 Apr 2014 19:35:27 +0200 Subject: [PATCH] Throw callback on change in Dedimania records --- application/plugins/Dedimania/Dedimania.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index 3f498939..6d0e8bd6 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -47,6 +47,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { const SETTING_WIDGET_LINESCOUNT = 'Widget Displayed Lines Count'; const SETTING_WIDGET_LINEHEIGHT = 'Widget Line Height'; const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for '; + const CB_DEDIMANIA_CHANGE = 'Dedimania.Change'; /** * Private Properties @@ -441,6 +442,8 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { break; } + $this->maniaControl->callbackManager->triggerCallback(self::CB_DEDIMANIA_CHANGE, array($newRecord)); + // Announce record if ($oldRecord->nullRecord || $newRecord->rank < $oldRecord->rank) { // Gained rank