Changeset 3874:ab8368569446 for inc/public/lib.urlhandlers.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/lib.urlhandlers.php
r3731 r3874 33 33 { 34 34 $core = &$GLOBALS['core']; 35 $t = new ArrayObject( array($type, $url, $representation, $handler));35 $t = new ArrayObject([$type, $url, $representation, $handler]); 36 36 $core->callBehavior("publicRegisterURL", $t); 37 37 parent::register($t[0], $t[1], $t[2], $t[3]); … … 241 241 $GLOBALS['_search'] = !empty($_GET['q']) ? rawurldecode($_GET['q']) : ''; 242 242 if ($GLOBALS['_search']) { 243 $params = new ArrayObject( array('search' => $GLOBALS['_search']));243 $params = new ArrayObject(['search' => $GLOBALS['_search']]); 244 244 $core->callBehavior('publicBeforeSearchCount', $params); 245 245 $GLOBALS['_search_count'] = $core->blog->getPosts($params, true)->f(0); … … 256 256 257 257 $n = self::getPageNumber($args); 258 $params = new ArrayObject( array(259 'lang' => $args ));258 $params = new ArrayObject([ 259 'lang' => $args]); 260 260 261 261 $core->callBehavior('publicLangBeforeGetLangs', $params, $args); … … 286 286 self::p404(); 287 287 } else { 288 $params = new ArrayObject( array(288 $params = new ArrayObject([ 289 289 'cat_url' => $args, 290 290 'post_type' => 'post', 291 'without_empty' => false ));291 'without_empty' => false]); 292 292 293 293 $core->callBehavior('publicCategoryBeforeGetCategories', $params, $args); … … 317 317 self::serveDocument('archive.html'); 318 318 } elseif (preg_match('|^/([0-9]{4})/([0-9]{2})$|', $args, $m)) { 319 $params = new ArrayObject( array(319 $params = new ArrayObject([ 320 320 'year' => $m[1], 321 321 'month' => $m[2], 322 'type' => 'month' ));322 'type' => 'month']); 323 323 324 324 $core->callBehavior('publicArchiveBeforeGetDates', $params, $args); … … 349 349 $core->blog->withoutPassword(false); 350 350 351 $params = new ArrayObject( array(352 'post_url' => $args ));351 $params = new ArrayObject([ 352 'post_url' => $args]); 353 353 354 354 $core->callBehavior('publicPostBeforeGetPosts', $params, $args); … … 380 380 $pwd_cookie = json_decode($_COOKIE['dc_passwd']); 381 381 if ($pwd_cookie === null) { 382 $pwd_cookie = array();382 $pwd_cookie = []; 383 383 } else { 384 384 $pwd_cookie = (array) $pwd_cookie; 385 385 } 386 386 } else { 387 $pwd_cookie = array();387 $pwd_cookie = []; 388 388 } 389 389 … … 542 542 543 543 if (preg_match('!^([a-z]{2}(-[a-z]{2})?)/(.*)$!', $args, $m)) { 544 $params = new ArrayObject( array('lang' => $m[1]));544 $params = new ArrayObject(['lang' => $m[1]]); 545 545 546 546 $args = $m[3]; … … 582 582 583 583 if ($cat_url) { 584 $params = new ArrayObject( array(584 $params = new ArrayObject([ 585 585 'cat_url' => $cat_url, 586 'post_type' => 'post' ));586 'post_type' => 'post']); 587 587 588 588 $core->callBehavior('publicFeedBeforeGetCategories', $params, $args); … … 598 598 $subtitle = ' - ' . $_ctx->categories->cat_title; 599 599 } elseif ($post_id) { 600 $params = new ArrayObject( array(600 $params = new ArrayObject([ 601 601 'post_id' => $post_id, 602 'post_type' => '' ));602 'post_type' => '']); 603 603 604 604 $core->callBehavior('publicFeedBeforeGetPosts', $params, $args); … … 650 650 651 651 if (!is_array($args)) { 652 $args = array();652 $args = []; 653 653 } 654 654 … … 668 668 $core = &$GLOBALS['core']; 669 669 if (!is_array($args)) { 670 $args = array();670 $args = []; 671 671 } 672 672
Note: See TracChangeset
for help on using the changeset viewer.