]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/Fave_tally.php
The overloaded DB_DataObject function staticGet is now called getKV
[quix0rs-gnu-social.git] / plugins / AnonymousFave / Fave_tally.php
index f48a1e82b313f7cf5e342a650b2f3eb7f423c16e..5962e5ad87f474cb1e140bcdc0f3ba464145311b 100644 (file)
@@ -44,7 +44,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
  * @link     http://status.net/
  */
-class Fave_tally extends Memcached_DataObject
+class Fave_tally extends Managed_DataObject
 {
     ###START_AUTOCODE
     /* the code below is auto generated do not remove the above tag */
@@ -54,9 +54,6 @@ class Fave_tally extends Memcached_DataObject
     public $count;                           // int(4)  not_null
     public $modified;                        // datetime   not_null default_0000-00-00%2000%3A00%3A00
 
-    /* Static get */
-    function staticGet($k, $v = NULL) { return Memcached_DataObject::staticGet('Fave_tally', $k, $v); }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
@@ -152,7 +149,7 @@ class Fave_tally extends Memcached_DataObject
             $msg = sprintf(
                 // TRANS: Server exception.
                 // TRANS: %d is the notice ID (number).
-                _m("Couldn't update favorite tally for notice ID %d."),
+                _m("Could not update favorite tally for notice ID %d."),
                 $noticeID
             );
             throw new ServerException($msg);
@@ -181,7 +178,7 @@ class Fave_tally extends Memcached_DataObject
                 $msg = sprintf(
                     // TRANS: Server exception.
                     // TRANS: %d is the notice ID (number).
-                    _m("Couldn't update favorite tally for notice ID %d."),
+                    _m("Could not update favorite tally for notice ID %d."),
                     $noticeID
                 );
                 throw new ServerException($msg);
@@ -201,7 +198,7 @@ class Fave_tally extends Memcached_DataObject
      */
     static function ensureTally($noticeID)
     {
-        $tally = Fave_tally::staticGet('notice_id', $noticeID);
+        $tally = Fave_tally::getKV('notice_id', $noticeID);
 
         if (!$tally) {
             $tally = new Fave_tally();
@@ -212,7 +209,7 @@ class Fave_tally extends Memcached_DataObject
                 $msg = sprintf(
                     // TRANS: Server exception.
                     // TRANS: %d is the notice ID (number).
-                    _m("Couldn't create favorite tally for notice ID %d."),
+                    _m("Could not create favorite tally for notice ID %d."),
                     $noticeID
                 );
                 throw new ServerException($msg);