X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FSubMirror%2Factions%2Feditmirror.php;h=d3d79966b9b4e130c203c4ea0b46ce891a9d00b2;hb=1635d459ec1988104f28f3346c45ee5aebbfcc1a;hp=1119e8718f23182c0395b9540ffbd6d1d672b572;hpb=2a4dc77a633cc78907934fd93200ac16d55be78e;p=quix0rs-gnu-social.git diff --git a/plugins/SubMirror/actions/editmirror.php b/plugins/SubMirror/actions/editmirror.php index 1119e8718f..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) {