]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ActivitySpam/Spam_score.php
More info for a proper, fancy-url lighttpd setup
[quix0rs-gnu-social.git] / plugins / ActivitySpam / Spam_score.php
index 997a9f83ad3add167aec94e1190161ab2635fccb..2ae32fbfaa4835718ca97b411be479f9ae1978e8 100644 (file)
@@ -53,20 +53,6 @@ class Spam_score extends Managed_DataObject
     public $score;       // float
     public $created;     // datetime
 
-    /**
-     * Get an instance by key
-     *
-     * @param string $k Key to use to lookup (usually 'notice_id' for this class)
-     * @param mixed  $v Value to lookup
-     *
-     * @return Spam_score object found, or null for no hits
-     *
-     */
-    function staticGet($k, $v=null)
-    {
-        return Managed_DataObject::staticGet('Spam_score', $k, $v);
-    }
-
     function saveNew($notice, $result) {
 
         $score = new Spam_score();
@@ -88,7 +74,7 @@ class Spam_score extends Managed_DataObject
     function save($notice, $result) {
 
         $orig  = null;
-        $score = Spam_score::staticGet('notice_id', $notice->id);
+        $score = Spam_score::getKV('notice_id', $notice->id);
 
         if (empty($score)) {
             $score = new Spam_score();
@@ -198,7 +184,7 @@ class Spam_score extends Managed_DataObject
         
         if ($score->find()) {
             while ($score->fetch()) {
-                $notice = Notice::staticGet('id', $score->notice_id);
+                $notice = Notice::getKV('id', $score->notice_id);
                 if (!empty($notice)) {
                     $orig = clone($score);
                     $score->notice_created = $notice->created;