* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL') && !defined('STATUSNET')) { exit(1); }
/**
* Takes parameters:
*
* @return boolean success flag
*/
- function prepare($args)
+ protected function prepare(array $args=array())
{
parent::prepare($args);
$feedurl = $this->getFeedUrl();
}
}
- function saveMirror()
+ protected function saveMirror()
{
if ($this->oprofile->subscribe()) {
SubMirror::saveMirror($this->user, $this->profile);
* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL') && !defined('STATUSNET')) { exit(1); }
/**
* Takes parameters:
*
* @return boolean success flag
*/
- function prepare($args)
+ protected function prepare(array $args=array())
{
parent::prepare($args);
return $this->sharedBoilerplate();
*
* @return void
*/
- function handle($args)
+ protected function handle()
{
// Throws exception on error
$this->saveMirror();
}
}
- abstract function saveMirror();
+ abstract protected function saveMirror();
}
* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL') && !defined('STATUSNET')) { exit(1); }
/**
* Takes parameters:
*
* @return boolean success flag
*/
- function prepare($args)
+ protected function prepare(array $args=array())
{
parent::prepare($args);
$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.'));
}
}
}
- function saveMirror()
+ protected function saveMirror()
{
$mirror = SubMirror::getMirror($this->user, $this->profile);
if (!$mirror) {