X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FSubMirror%2Factions%2Feditmirror.php;h=d3d79966b9b4e130c203c4ea0b46ce891a9d00b2;hb=1635d459ec1988104f28f3346c45ee5aebbfcc1a;hp=557eb0aba47d3ba123c69830b45a483c9edb9450;hpb=9948523c33ea0d02681ff1e0cd4fcb839dc9df96;p=quix0rs-gnu-social.git diff --git a/plugins/SubMirror/actions/editmirror.php b/plugins/SubMirror/actions/editmirror.php index 557eb0aba4..d3d79966b9 100644 --- a/plugins/SubMirror/actions/editmirror.php +++ b/plugins/SubMirror/actions/editmirror.php @@ -26,9 +26,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL') && !defined('STATUSNET')) { exit(1); } /** * Takes parameters: @@ -54,7 +52,7 @@ class EditMirrorAction extends BaseMirrorAction * * @return boolean success flag */ - function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); @@ -63,7 +61,7 @@ class EditMirrorAction extends BaseMirrorAction $this->mirror = SubMirror::pkeyGet(array('subscriber' => $this->user->id, 'subscribed' => $this->profile->id)); - if (!$this->mirror) { + if (!$this->mirror instanceof SubMirror) { // TRANS: Client error displayed when trying to edit an object that is not a feed mirror. $this->clientError(_m('Requested invalid profile to edit.')); } @@ -88,7 +86,7 @@ class EditMirrorAction extends BaseMirrorAction } } - function saveMirror() + protected function saveMirror() { $mirror = SubMirror::getMirror($this->user, $this->profile); if (!$mirror) { @@ -98,7 +96,7 @@ class EditMirrorAction extends BaseMirrorAction if ($this->delete) { $mirror->delete(); - $oprofile = Ostatus_profile::staticGet('profile_id', $this->profile->id); + $oprofile = Ostatus_profile::getKV('profile_id', $this->profile->id); if ($oprofile) { $oprofile->garbageCollect(); }