public function getautoform($name)
 {
     if (isset($this->_form)) {
         return $this->_form;
     }
     switch ($name) {
         case 'rss':
             $form = new tautoform(trss::i(), 'options', 'rssoptions');
             $form->add($form->feedburner, $form->feedburnercomments, $form->template('editor'));
             break;
         case 'ping':
             $form = new tautoform(tpinger::i(), 'options', 'optionsping');
             $form->add($form->enabled, $form->services('editor'));
             break;
         case 'notfound404':
             $form = new tautoform(tnotfound404::i(), 'options', 'edit404');
             $form->add($form->notify, $form->text('editor'));
             break;
         default:
             return false;
     }
     $this->_form = $form;
     return $form;
 }
Exemple #2
0
 public function rejectinvate($id)
 {
     if (!$this->itemexists($id)) {
         return false;
     }
     $item = $this->getitem($id);
     $this->setstatus($id, 'rejected');
     if ($ping = tpinger::Discover($item['url'])) {
         $actions = TXMLRPCAction::i();
         if ($actions->rejectfriend($ping, $this->profile)) {
             return true;
         }
     }
     return false;
 }