Changeset 3874:ab8368569446 for admin/index.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r3833 r3874 31 31 dcPage::check('usage,contentadmin'); 32 32 33 if ($core->plugins->disableDepModules($core->adminurl->get('admin.home', array()))) {33 if ($core->plugins->disableDepModules($core->adminurl->get('admin.home', []))) { 34 34 exit; 35 35 } … … 108 108 109 109 # Latest news for dashboard 110 $__dashboard_items = new ArrayObject( array(new ArrayObject(), new ArrayObject()));110 $__dashboard_items = new ArrayObject([new ArrayObject(), new ArrayObject()]); 111 111 112 112 $dashboardItem = 0; … … 131 131 132 132 # Dashboard content 133 $__dashboard_contents = new ArrayObject( array(new ArrayObject, new ArrayObject));133 $__dashboard_contents = new ArrayObject([new ArrayObject, new ArrayObject]); 134 134 $core->callBehavior('adminDashboardContents', $core, $__dashboard_contents); 135 135 … … 142 142 if ($post_editor && !empty($post_editor[$post_format])) { 143 143 // context is not post because of tags not available 144 $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content'), $post_format);144 $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', ['#post_content'], $post_format); 145 145 } 146 146 } … … 157 157 $core->callBehavior('adminDashboardHeaders'), 158 158 dcPage::breadcrumb( 159 array(159 [ 160 160 __('Dashboard') . ' : ' . html::escapeHTML($core->blog->name) => '' 161 ),162 array('home_link' => false)161 ], 162 ['home_link' => false] 163 163 ) 164 164 ); … … 166 166 if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) { 167 167 echo 168 '<p><a href="' . $core->adminurl->get("admin.home", array('default_blog' => 1)) . '" class="button">' . __('Make this blog my default blog') . '</a></p>';168 '<p><a href="' . $core->adminurl->get("admin.home", ['default_blog' => 1]) . '" class="button">' . __('Make this blog my default blog') . '</a></p>'; 169 169 } 170 170 … … 191 191 } 192 192 193 $err = array();193 $err = []; 194 194 195 195 # Check cache directory … … 248 248 # Get current main orders 249 249 $main_order = $core->auth->user_prefs->dashboard->main_order; 250 $main_order = ($main_order != '' ? explode(',', $main_order) : array());250 $main_order = ($main_order != '' ? explode(',', $main_order) : []); 251 251 252 252 # Get current boxes orders 253 253 $boxes_order = $core->auth->user_prefs->dashboard->boxes_order; 254 $boxes_order = ($boxes_order != '' ? explode(',', $boxes_order) : array());254 $boxes_order = ($boxes_order != '' ? explode(',', $boxes_order) : []); 255 255 256 256 # Get current boxes items orders 257 257 $boxes_items_order = $core->auth->user_prefs->dashboard->boxes_items_order; 258 $boxes_items_order = ($boxes_items_order != '' ? explode(',', $boxes_items_order) : array());258 $boxes_items_order = ($boxes_items_order != '' ? explode(',', $boxes_items_order) : []); 259 259 260 260 # Get current boxes contents orders 261 261 $boxes_contents_order = $core->auth->user_prefs->dashboard->boxes_contents_order; 262 $boxes_contents_order = ($boxes_contents_order != '' ? explode(',', $boxes_contents_order) : array());262 $boxes_contents_order = ($boxes_contents_order != '' ? explode(',', $boxes_contents_order) : []); 263 263 264 264 $composeItems = function ($list, $blocks, $flat = false) { 265 265 266 $ret = array();267 $items = array();266 $ret = []; 267 $items = []; 268 268 269 269 if ($flat) { … … 278 278 279 279 # First loop to find ordered indexes 280 $order = array();280 $order = []; 281 281 $index = 0; 282 282 foreach ($items as $v) { … … 321 321 $dashboardContents = $composeItems($boxes_contents_order, $__dashboard_contents); 322 322 323 $__dashboard_boxes = array();323 $__dashboard_boxes = []; 324 324 if ($dashboardItems != '') { 325 325 $__dashboard_boxes[] = '<div class="db-items" id="db-items">' . $dashboardItems . '</div>'; … … 331 331 332 332 # Compose main area 333 $__dashboard_main = array();333 $__dashboard_main = []; 334 334 if (!$core->auth->user_prefs->dashboard->nofavicons) { 335 335 # Dashboard icons … … 346 346 # Getting categories 347 347 $categories_combo = dcAdminCombos::getCategoriesCombo( 348 $core->blog->getCategories( array())348 $core->blog->getCategories([]) 349 349 ); 350 350 … … 355 355 '<h4>' . __('New entry') . '</h4>' . 356 356 '<p class="col"><label for="post_title" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . 357 form::field('post_title', 20, 255, array(357 form::field('post_title', 20, 255, [ 358 358 'class' => 'maximal', 359 359 'extra_html' => 'required placeholder="' . __('Title') . '"' 360 )) .360 ]) . 361 361 '</p>' . 362 362 '<p class="area"><label class="required" ' . 363 363 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . 364 form::textarea('post_content', 50, 10, array('extra_html' => 'required placeholder="' . __('Content') . '"')) .364 form::textarea('post_content', 50, 10, ['extra_html' => 'required placeholder="' . __('Content') . '"']) . 365 365 '</p>' . 366 366 '<p><label for="cat_id" class="classic">' . __('Category:') . '</label> ' .
Note: See TracChangeset
for help on using the changeset viewer.