X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FSubMirror%2Fclasses%2FSubMirror.php;h=ac1eb01f60bd1d230afd38ada5171b19e01991fc;hb=2a4dc77a633cc78907934fd93200ac16d55be78e;hp=bd8fc80a5fbc0fb3a46c6398a4e005c2b369d580;hpb=718317542940a8976f2c6f2a9ea09a04f2f00ca6;p=quix0rs-gnu-social.git diff --git a/plugins/SubMirror/classes/SubMirror.php b/plugins/SubMirror/classes/SubMirror.php index bd8fc80a5f..ac1eb01f60 100644 --- a/plugins/SubMirror/classes/SubMirror.php +++ b/plugins/SubMirror/classes/SubMirror.php @@ -22,7 +22,7 @@ * @maintainer Brion Vibber */ -class SubMirror extends Memcached_DataObject +class SubMirror extends Managed_DataObject { public $__table = 'submirror'; @@ -34,11 +34,6 @@ class SubMirror extends Memcached_DataObject public $created; public $modified; - public /*static*/ function staticGet($k, $v=null) - { - return parent::staticGet(__CLASS__, $k, $v); - } - /** * return table definition for DB_DataObject * @@ -79,7 +74,7 @@ class SubMirror extends Memcached_DataObject /** * Temporary hack to set up the compound index, since we can't do * it yet through regular Schema interface. (Coming for 1.0...) - * + * * @param Schema $schema * @return void */ @@ -117,7 +112,7 @@ class SubMirror extends Memcached_DataObject function keyTypes() { - // @fixme keys + // @todo FIXME keys // need a sane key for reverse lookup too return array('subscriber' => 'K', 'subscribed' => 'K'); } @@ -145,7 +140,7 @@ class SubMirror extends Memcached_DataObject $mirror->created = common_sql_now(); $mirror->modified = common_sql_now(); $mirror->insert(); - + return $mirror; } @@ -155,9 +150,9 @@ class SubMirror extends Memcached_DataObject */ public function mirrorNotice($notice) { - $profile = Profile::staticGet('id', $this->subscriber); + $profile = Profile::getKV('id', $this->subscriber); if (!$profile) { - common_log(LOG_ERROR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id"); + common_log(LOG_ERR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id"); return false; } @@ -173,7 +168,7 @@ class SubMirror extends Memcached_DataObject * This retains attribution within the site, and other nice things, * but currently ends up looking like 'RT @foobar bla bla' when * bridged out over OStatus or TwitterBridge. - * + * * @param Notice $notice * @return mixed Notice on successful repeat, true if already repeated, false on failure */ @@ -192,7 +187,7 @@ class SubMirror extends Memcached_DataObject * Mirror a notice by emitting a new notice with the same contents. * Kind of dirty, but if pulling an external data feed into an account * that may be what you want. - * + * * @param Notice $notice * @return mixed Notice on successful repeat, true if already repeated, false on failure */ @@ -216,7 +211,7 @@ class SubMirror extends Memcached_DataObject /** * Get the mirroring setting for a pair of profiles, if existing. - * + * * @param Profile $subscriber * @param Profile $subscribed * @return mixed Profile or empty