Ejemplo n.º 1
0
 /**
  * Handle request
  *
  * Does the subscription and returns results.
  *
  * @param Array $args unused.
  *
  * @return void
  */
 function handle($args)
 {
     // Throws exception on error
     TagSub::cancel($this->user->getProfile(), $this->tag);
     if ($this->boolean('ajax')) {
         $this->startHTML('text/xml;charset=utf-8');
         $this->elementStart('head');
         // TRANS: Page title when tag unsubscription succeeded.
         $this->element('title', null, _m('Unsubscribed'));
         $this->elementEnd('head');
         $this->elementStart('body');
         $subscribe = new TagSubForm($this, $this->tag);
         $subscribe->show();
         $this->elementEnd('body');
         $this->endHTML();
     } else {
         $url = common_local_url('tag', array('tag' => $this->tag));
         common_redirect($url, 303);
     }
 }