Changeset 306:dbcdebc54a75
- Timestamp:
- 05/23/11 13:21:08 (13 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/lib.urlhandlers.php
r303 r306 204 204 205 205 $n = self::getPageNumber($args); 206 207 $params['lang'] = $args; 206 $params = new ArrayObject(array( 207 'lang' => $args)); 208 209 $core->callBehavior('publicLangBeforeGetLangs',$params,$args); 210 208 211 $_ctx->langs = $core->blog->getLangs($params); 209 212 … … 235 238 else 236 239 { 237 $params['cat_url'] = $args; 238 $params['post_type'] = 'post'; 240 $params = new ArrayObject(array( 241 'cat_url' => $args, 242 'post_type' => 'post')); 243 244 $core->callBehavior('publicCategoryBeforeGetCategories',$params,$args); 239 245 240 246 $_ctx->categories = $core->blog->getCategories($params); … … 267 273 elseif (preg_match('|^/([0-9]{4})/([0-9]{2})$|',$args,$m)) 268 274 { 269 $params['year'] = $m[1]; 270 $params['month'] = $m[2]; 271 $params['type'] = 'month'; 275 $params = new ArrayObject(array( 276 'year' => $m[1], 277 'month' => $m[2], 278 'type' => 'month')); 279 280 $core->callBehavior('publicArchiveBeforeGetDates',$params,$args); 281 272 282 $_ctx->archives = $core->blog->getDates($params); 273 283 … … 300 310 $core->blog->withoutPassword(false); 301 311 302 $params = new ArrayObject(); 303 $params['post_url'] = $args; 304 312 $params = new ArrayObject(array( 313 'post_url' => $args)); 314 315 $core->callBehavior('publicPostBeforeGetPosts',$params,$args); 316 305 317 $_ctx->posts = $core->blog->getPosts($params); 306 318 … … 481 493 $cat_url = false; 482 494 $post_id = null; 483 $params = array();484 495 $subtitle = ''; 485 496 … … 490 501 491 502 if (preg_match('!^([a-z]{2}(-[a-z]{2})?)/(.*)$!',$args,$m)) { 492 $params['lang'] = $m[1]; 503 $params = new ArrayObject(array('lang' => $m[1])); 504 493 505 $args = $m[3]; 506 507 $core->callBehavior('publicFeedBeforeGetLangs',$params,$args); 494 508 495 509 $_ctx->langs = $core->blog->getLangs($params); … … 535 549 if ($cat_url) 536 550 { 537 $params['cat_url'] = $cat_url; 538 $params['post_type'] = 'post'; 551 $params = new ArrayObject(array( 552 'cat_url' => $cat_url, 553 'post_type' => 'post')); 554 555 $core->callBehavior('publicFeedBeforeGetCategories',$params,$args); 556 539 557 $_ctx->categories = $core->blog->getCategories($params); 540 558 … … 549 567 elseif ($post_id) 550 568 { 551 $params['post_id'] = $post_id; 552 $params['post_type'] = ''; 569 $params = new ArrayObject(array( 570 'post_id' => $post_id, 571 'post_type' => '')); 572 573 $core->callBehavior('publicFeedBeforeGetPosts',$params,$args); 574 553 575 $_ctx->posts = $core->blog->getPosts($params); 554 576 -
plugins/pages/_public.php
r270 r306 33 33 $core->blog->withoutPassword(false); 34 34 35 $params = new ArrayObject(); 36 $params['post_type'] = 'page'; 37 $params['post_url'] = $args; 35 $params = new ArrayObject(array( 36 'post_type' => 'page', 37 'post_url' => $args)); 38 39 $core->callBehavior('publicPagesBeforeGetPosts',$params,$args); 38 40 39 41 $_ctx->posts = $core->blog->getPosts($params);
Note: See TracChangeset
for help on using the changeset viewer.