var $profile = null;
var $user = null;
var $page = null;
+ var $tag = null;
function prepare($args)
{
if ($this->arg('page') && $this->arg('page') != 1) {
$args['page'] = $this->arg['page'];
}
- common_redirect(common_local_url('subscriptions', $args), 301);
+ common_redirect(common_local_url($this->trimmed('action'), $args), 301);
return false;
}
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
+ $this->tag = $this->trimmed('tag');
+ $this->q = $this->trimmed('q');
+
return true;
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
# Post from the tag dropdown; redirect to a GET
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- common_redirect($this->self_url(), 307);
+ common_redirect($this->selfUrl(), 303);
return;
}
array('href' =>
common_local_url($this->trimmed('action'),
array('nickname' =>
- $profile->nickname))),
+ $this->user->nickname))),
_('All'));
$this->elementEnd('li');
$this->elementStart('li', array('id'=>'filter_tags_item'));
'method' => 'post'));
$this->dropdown('tag', _('Tag'), $content,
_('Choose a tag to narrow list'), false, $tag);
- $this->submit('go', _('Go'));
+ $this->submit('submit', _('Go'));
$this->elementEnd('form');
$this->elementEnd('li');
$this->elementEnd('ul');
$profile_tag = new Notice_tag();
$profile_tag->query('SELECT DISTINCT(tag) ' .
'FROM profile_tag, subscription ' .
- 'WHERE tagger = ' . $profile->id . ' ' .
- 'AND ' . $usr . ' = ' . $profile->id . ' ' .
+ 'WHERE tagger = ' . $this->profile->id . ' ' .
+ 'AND ' . $usr . ' = ' . $this->profile->id . ' ' .
'AND ' . $lst . ' = tagged ' .
'AND tagger != tagged');
$tags = array();