예제 #1
0
 /**
  * Handle request
  *
  * Does the subscription and returns results.
  *
  * @param Array $args unused.
  *
  * @return void
  */
 function handle($args)
 {
     // Throws exception on error
     SearchSub::start($this->user->getProfile(), $this->search);
     if ($this->boolean('ajax')) {
         $this->startHTML('text/xml;charset=utf-8');
         $this->elementStart('head');
         // TRANS: Page title when search subscription succeeded.
         $this->element('title', null, _m('Subscribed'));
         $this->elementEnd('head');
         $this->elementStart('body');
         $unsubscribe = new SearchUnsubForm($this, $this->search);
         $unsubscribe->show();
         $this->elementEnd('body');
         $this->endHTML();
     } else {
         $url = common_local_url('search', array('search' => $this->search));
         common_redirect($url, 303);
     }
 }
예제 #2
0
 function showOwnerControls()
 {
     $this->out->elementStart('div', 'entity_actions');
     $searchsub = $this->profile;
     // ?
     $form = new SearchUnsubForm($this->out, $searchsub->search);
     $form->show();
     $this->out->elementEnd('div');
     return;
 }