TagAction extends ManagedAction
This commit is contained in:
parent
f42f7a1c85
commit
182605cb6a
@ -17,26 +17,28 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||
|
||||
// @todo FIXME: documentation missing.
|
||||
class TagAction extends Action
|
||||
class TagAction extends ManagedAction
|
||||
{
|
||||
var $notice;
|
||||
var $tag;
|
||||
var $page;
|
||||
|
||||
function prepare($args)
|
||||
protected function prepare(array $args=array())
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
||||
$taginput = $this->trimmed('tag');
|
||||
$this->tag = common_canonical_tag($taginput);
|
||||
|
||||
if (!$this->tag) {
|
||||
if (empty($this->tag)) {
|
||||
common_redirect(common_local_url('publictagcloud'), 301);
|
||||
}
|
||||
|
||||
if ($this->tag != $taginput) {
|
||||
// after common_canonical_tag we have a lowercase, no-specials tag string
|
||||
if ($this->tag !== $taginput) {
|
||||
common_redirect(common_local_url('tag', array('tag' => $this->tag)), 301);
|
||||
}
|
||||
|
||||
@ -69,13 +71,6 @@ class TagAction extends Action
|
||||
}
|
||||
}
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
||||
$this->showPage();
|
||||
}
|
||||
|
||||
function getFeeds()
|
||||
{
|
||||
return array(new Feed(Feed::JSON,
|
||||
@ -111,7 +106,7 @@ class TagAction extends Action
|
||||
$this->tag)));
|
||||
}
|
||||
|
||||
function showContent()
|
||||
protected function showContent()
|
||||
{
|
||||
if(Event::handle('StartTagShowContent', array($this))) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user