@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | |
28 | 28 | const ABORT = "abortAction"; |
29 | 29 | |
30 | - function __construct($params=null) { |
|
31 | - $this->ci =& get_instance(); |
|
30 | + function __construct($params = null) { |
|
31 | + $this->ci = & get_instance(); |
|
32 | 32 | $this->ci->load->database(); |
33 | 33 | $this->table_name = self::TABLE_PREFIX . (isset($params["name"]) ? "_" . $params["name"] : ""); |
34 | 34 | $this->ci->load->database(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param [type] $adminIdColumnConstraint [description] |
46 | 46 | * @return [type] [description] |
47 | 47 | */ |
48 | - public function install($blogName=null, $adminTableName = null, $adminIdColumnName = null, $adminIdColumnConstraint = null) { |
|
48 | + public function install($blogName = null, $adminTableName = null, $adminIdColumnName = null, $adminIdColumnConstraint = null) { |
|
49 | 49 | $blogName = $blogName == null ? $this->table_name : self::TABLE_PREFIX . "_" . $blogName; |
50 | 50 | $this->ci->load->dbforge(); |
51 | 51 | $this->ci->dbforge->add_field("id"); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @param boolean $w3css [description] |
138 | 138 | * @return [type] [description] |
139 | 139 | */ |
140 | - public function loadEditor($callback, $postId=null, $w3css=true) { |
|
140 | + public function loadEditor($callback, $postId = null, $w3css = true) { |
|
141 | 141 | $this->loadScripts($w3css); |
142 | 142 | $this->ci->load->helper("form"); |
143 | 143 | $data = array( |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * @param [type] $posterId [description] |
159 | 159 | * @return [type] [description] |
160 | 160 | */ |
161 | - public function savePost($posterId=null) { |
|
161 | + public function savePost($posterId = null) { |
|
162 | 162 | $action = $this->ci->security->xss_clean($this->ci->input->post("action")); |
163 | 163 | if ($action == "save") { |
164 | 164 | $id = $this->ci->security->xss_clean($this->ci->input->post("id")); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | * return all posts. false by default. |
195 | 195 | * @return array Array of posts for a given page. |
196 | 196 | */ |
197 | - public function getPosts($page, $limit, $filter=false, $hits=false) { |
|
197 | + public function getPosts($page, $limit, $filter = false, $hits = false) { |
|
198 | 198 | return $this->ci->bmanager->getPosts($page, $limit, $filter, $hits); |
199 | 199 | } |
200 | 200 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * @param boolean $hits [description] |
208 | 208 | * @return [type] [description] |
209 | 209 | */ |
210 | - public function renderPostItems($view=null, $callback=null, $empty_view=null, $page=1, $limit=5, $filter=false, $hits=false, $slug=true) { |
|
210 | + public function renderPostItems($view = null, $callback = null, $empty_view = null, $page = 1, $limit = 5, $filter = false, $hits = false, $slug = true) { |
|
211 | 211 | if ($view == null || $empty_view == null) $this->ci->load->bind("francis94c/blog", $blogger); |
212 | 212 | $posts = $this->getPosts($page, $limit, $filter, $hits); |
213 | 213 | if (count($posts) == 0) { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | * @param boolean $filter [description] |
233 | 233 | * @return [type] [description] |
234 | 234 | */ |
235 | - public function getRecentPosts($limit=5, $filter=false) { |
|
235 | + public function getRecentPosts($limit = 5, $filter = false) { |
|
236 | 236 | return $this->ci->bmanager->getRecentPosts($limit, $filter); |
237 | 237 | } |
238 | 238 | /** |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * @param [type] $view [description] |
242 | 242 | * @return [type] [description] |
243 | 243 | */ |
244 | - public function renderPost($post, $view=null) { |
|
244 | + public function renderPost($post, $view = null) { |
|
245 | 245 | if (!is_array($post)) $post = $this->ci->bmanager->getPost($post); |
246 | 246 | $post["content"] = $this->ci->parsedown->text($post["content"]); |
247 | 247 | if ($view == null) { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * @param [type] $postId [description] |
276 | 276 | * @return [type] [description] |
277 | 277 | */ |
278 | - public function getPost($postId, $hit=true) { |
|
278 | + public function getPost($postId, $hit = true) { |
|
279 | 279 | return $this->ci->bmanager->getPost($postId, $hit); |
280 | 280 | } |
281 | 281 | /** |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | * @param boolean $filter [description] |
312 | 312 | * @return [type] [description] |
313 | 313 | */ |
314 | - public function searchPosts($words, $page, $limit=0, $filter=false) { |
|
314 | + public function searchPosts($words, $page, $limit = 0, $filter = false) { |
|
315 | 315 | return $this->ci->bmanager->searchPosts($words, $page, $limit, $filter); |
316 | 316 | } |
317 | 317 | } |