Beispiel #1
0
 /**
  * Check pre-requisites and instantiate attributes
  *
  * @param Array $args array of arguments (URL, GET, POST)
  *
  * @return boolean success flag
  */
 function prepare($args)
 {
     parent::prepare($args);
     $this->feedurl = $this->validateFeedUrl($this->trimmed('feedurl'));
     $this->profile = $this->profileForFeed($this->feedurl);
     return true;
 }
Beispiel #2
0
 /**
  * Check pre-requisites and instantiate attributes
  *
  * @param Array $args array of arguments (URL, GET, POST)
  *
  * @return boolean success flag
  */
 function prepare($args)
 {
     parent::prepare($args);
     $feedurl = $this->getFeedUrl();
     $this->feedurl = $this->validateFeedUrl($feedurl);
     $this->profile = $this->profileForFeed($this->feedurl);
     return true;
 }
Beispiel #3
0
 /**
  * Check pre-requisites and instantiate attributes
  *
  * @param Array $args array of arguments (URL, GET, POST)
  *
  * @return boolean success flag
  */
 function prepare($args)
 {
     parent::prepare($args);
     $this->profile = $this->validateProfile($this->trimmed('profile'));
     $this->mirror = SubMirror::pkeyGet(array('subscriber' => $this->user->id, 'subscribed' => $this->profile->id));
     if (!$this->mirror) {
         $this->clientError(_m("Requested invalid profile to edit."));
     }
     $this->style = $this->validateStyle($this->trimmed('style'));
     // DO NOT change to $this->boolean(), it will be wrong.
     // We're checking for the presence of the setting, not its value.
     $this->delete = (bool) $this->arg('delete');
     return true;
 }
Beispiel #4
0
 /**
  * Check pre-requisites and instantiate attributes
  *
  * @param Array $args array of arguments (URL, GET, POST)
  *
  * @return boolean success flag
  */
 protected function prepare(array $args = array())
 {
     parent::prepare($args);
     $this->profile = $this->validateProfile($this->trimmed('profile'));
     $this->mirror = SubMirror::pkeyGet(array('subscriber' => $this->user->id, 'subscribed' => $this->profile->id));
     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.'));
     }
     $this->style = $this->validateStyle($this->trimmed('style'));
     // DO NOT change to $this->boolean(), it will be wrong.
     // We're checking for the presence of the setting, not its value.
     $this->delete = (bool) $this->arg('delete');
     return true;
 }