Пример #1
0
 /**
  * Searches for a tag suggestion
  * @param string $term the text to search for
  */
 public function actionGettags($term = '', $limit = '')
 {
     $tags = $limit ? Subject::getTags($term, (int) $limit) : Subject::getTags($term);
     if ($tags) {
         echo json_encode($tags);
     }
 }
Пример #2
0
 /**
  * Searches for a tag suggestion
  * @param string $term the text to search for
  */
 public function actionGettags($term = '', $limit = '')
 {
     global $arr_response;
     $term = $_REQUEST['term'];
     $limit = $_REQUEST['limit'];
     $tags = $limit ? Subject::getTags($term, (int) $limit) : Subject::getTags($term);
     $arr_response = $tags;
     //Notice we are altering the arr_response completely, thus errasing any previous values stored. ie: on a taglist autocomplete json request so that results dont get contaminated
     //TODO:Implemento some kind of condition that if $_REQUEST['response_info'] param is received, response_code,response_message, etc should be in the response either way
 }