View file mooSocial v2.3.0 - PHP Social Network/upload/app/Controller/HashtagsController.php

File size: 652B
<?php
/**
 * mooSocial - The Web 2.0 Social Network Software
 * @website: http://www.moosocial.com
 */
class HashtagsController extends AppController
{
    public function getHashtag()
    {
        $conditions = null;
        if($this->request->named['item_table'] != 'all' )
        {
            $item_table = $this->request->named['item_table'];
            if($item_table == 'activities')
                $item_table = array('activities','activity_comments');
            $conditions = array('conditions' => array('Hashtag.item_table' => $item_table ) );
        }
        return $this->Hashtag->find('all',$conditions);
    }
}