Ejemplo n.º 1
0
 function _tags_search()
 {
     $app = \GCore\Libs\App::getInstance();
     $app->tvout = 'ajax';
     $tag_term = Request::data('term');
     $tags_model = new \GCore\Admin\Models\Tag();
     $list = $tags_model->find('list', array('fields' => array('Tag.title'), 'conditions' => array('Tag.title LIKE' => '%' . $tag_term . '%')));
     return json_encode(array_values($list));
 }
Ejemplo n.º 2
0
 public static function getApp($site = GCORE_SITE, $thread = 'gcore')
 {
     if (\GCore\C::get('GSITE_PLATFORM') == 'joomla') {
         $app = \GCore\Libs\AppJ::getInstance($site, $thread);
     } else {
         if (\GCore\C::get('GSITE_PLATFORM') == 'wordpress') {
             $app = \GCore\Libs\AppWp::getInstance($site, $thread);
         } else {
             if (\GCore\C::get('GSITE_PLATFORM') == '') {
                 $app = \GCore\Libs\App::getInstance($site, $thread);
             }
         }
     }
     return $app;
 }