APPPATH/classes/Model/Poll.php [ 14 ]
9 if (!$result = Cache::instance()->get("vote_articles_{$lang}_{$offset}_{$limit}")) {
10 $result = array();
11
12 $num = DB::query(Database::SELECT, "SELECT COUNT(*) as cnt FROM fm_polls WHERE state = 1 AND in_{$lang} = TRUE")->execute()->get('cnt', 0);
13
14 if (count($num) > 0) {
15 $rows = DB::query(Database::SELECT, "SELECT p.title_{$lang} as \"title\", p.fulltext_{$lang} as \"text\", p.id, p.input_type,"
16 . " (SELECT SUM(o.cnt) FROM fm_polls_options o WHERE o.poll_id = p.id) AS total_cnt "
17 . "FROM fm_polls p "
18 . "WHERE p.state = 1 AND p.in_{$lang} = TRUE "
19 . "ORDER BY p.pub_date DESC "
-
APPPATH/classes/Model/Poll.php [ 14 ] » Kohana_Core::error_handler()
9 if (!$result = Cache::instance()->get("vote_articles_{$lang}_{$offset}_{$limit}")) { 10 $result = array(); 11 12 $num = DB::query(Database::SELECT, "SELECT COUNT(*) as cnt FROM fm_polls WHERE state = 1 AND in_{$lang} = TRUE")->execute()->get('cnt', 0); 13 14 if (count($num) > 0) { 15 $rows = DB::query(Database::SELECT, "SELECT p.title_{$lang} as \"title\", p.fulltext_{$lang} as \"text\", p.id, p.input_type," 16 . " (SELECT SUM(o.cnt) FROM fm_polls_options o WHERE o.poll_id = p.id) AS total_cnt " 17 . "FROM fm_polls p " 18 . "WHERE p.state = 1 AND p.in_{$lang} = TRUE " 19 . "ORDER BY p.pub_date DESC "
-
APPPATH/classes/Controller/Vote.php [ 29 ] » Model_Poll->get_poll_articles()
24 if (empty($vote)) 25 throw new HTTP_Exception_404(); 26 27 $this->add_run_script("Polls.init(); $('p.title a[data-id={$id}]').trigger('click'); "); 28 29 $articles = $model->get_poll_articles($this->lang, 0 * $this->items_per_page, $this->items_per_page); 30 31 $total_items = (isset($articles[0]['count'])) ? $articles[0]['count'] : 0; 32 33 $pagination = Pagination::factory(array('total_items' => $total_items , 'items_per_page' => $this->items_per_page, 34 'current_page' => array('source' => 'route', 'key' => 'page')));
-
SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Vote->action_index()
79 [':uri' => $this->request->uri()] 80 )->request($this->request); 81 } 82 83 // Execute the action itself 84 $this->{$action}(); 85 86 // Execute the "after action" method 87 $this->after(); 88 89 // Return the response
-
{PHP internal call} » Kohana_Controller->execute()
-
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 94 ] » ReflectionMethod->invoke()
89 90 // Create a new instance of the controller 91 $controller = $class->newInstance($request, $response); 92 93 // Run the controller's execute() method 94 $response = $class->getMethod('execute')->invoke($controller); 95 96 if ( ! $response instanceof Response) 97 { 98 // Controller failed to return a Response. 99 throw new Kohana_Exception('Controller failed to return a Response');
-
SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request()
109 $orig_response = $response = Response::factory(['_protocol' => $request->protocol()]); 110 111 if (($cache = $this->cache()) instanceof HTTP_Cache) 112 return $cache->execute($this, $request, $response); 113 114 $response = $this->execute_request($request, $response); 115 116 // Execute response callbacks 117 foreach ($this->header_callbacks() as $header => $callback) 118 { 119 if ($response->headers($header))
-
SYSPATH/classes/Kohana/Request.php [ 1000 ] » Kohana_Request_Client->execute()
995 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', [ 996 ':uri' => $this->_uri, 997 ]); 998 } 999 1000 return $this->_client->execute($this); 1001 } 1002 1003 /** 1004 * Returns whether this request is the initial request Kohana received. 1005 * Can be used to test for sub requests.
-
DOCROOT/index.php [ 138 ] » Kohana_Request->execute()
133 /** 134 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 135 * If no source is specified, the URI will be automatically detected. 136 */ 137 echo Request::factory(TRUE, array(), FALSE) 138 ->execute() 139 ->send_headers(TRUE) 140 ->body(); 141 }