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