Changeset 3874:ab8368569446 for admin/category.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/category.php
r3731 r3874 41 41 42 42 # Allowed parents list 43 $children = $core->blog->getCategories( array('start' => $cat_id));44 $allowed_parents = array(__('Top level') => 0);45 46 $p = array();43 $children = $core->blog->getCategories(['start' => $cat_id]); 44 $allowed_parents = [__('Top level') => 0]; 45 46 $p = []; 47 47 while ($children->fetch()) { 48 48 $p[$children->cat_id] = 1; … … 61 61 62 62 # Allowed siblings list 63 $siblings = array();63 $siblings = []; 64 64 $rs = $core->blog->getCategoryFirstChildren($cat_parent); 65 65 while ($rs->fetch()) { … … 126 126 dcPage::addSuccessNotice(__('The category has been successfully updated.')); 127 127 128 $core->adminurl->redirect("admin.category", array('id' => $_POST['id']));128 $core->adminurl->redirect("admin.category", ['id' => $_POST['id']]); 129 129 } 130 130 # Create category … … 149 149 $title = $cat_id ? html::escapeHTML($cat_title) : __('New category'); 150 150 151 $elements = array(151 $elements = [ 152 152 html::escapeHTML($core->blog->name) => '', 153 153 __('Categories') => $core->adminurl->get("admin.categories") 154 );154 ]; 155 155 if ($cat_id) { 156 156 while ($parents->fetch()) { 157 $elements[html::escapeHTML($parents->cat_title)] = $core->adminurl->get("admin.category", array('id' => $parents->cat_id));157 $elements[html::escapeHTML($parents->cat_title)] = $core->adminurl->get("admin.category", ['id' => $parents->cat_id]); 158 158 } 159 159 } … … 170 170 dcPage::jsConfirmClose('category-form') . 171 171 dcPage::jsLoad('js/_category.js') . 172 ($rte_flag ? $core->callBehavior('adminPostEditor', $category_editor['xhtml'], 'category', array('#cat_desc'), 'xhtml') : ''),172 ($rte_flag ? $core->callBehavior('adminPostEditor', $category_editor['xhtml'], 'category', ['#cat_desc'], 'xhtml') : ''), 173 173 dcPage::breadcrumb($elements) 174 174 ); … … 182 182 '<h3>' . __('Category information') . '</h3>' . 183 183 '<p><label class="required" for="cat_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label> ' . 184 form::field('cat_title', 40, 255, array(184 form::field('cat_title', 40, 255, [ 185 185 'default' => html::escapeHTML($cat_title), 186 186 'extra_html' => 'required placeholder="' . __('Name') . '"' 187 )) .187 ]) . 188 188 '</p>'; 189 189 if (!$cat_id) { … … 231 231 form::combo('cat_parent', $allowed_parents, $cat_parent) . '</p>' . 232 232 '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . 233 form::hidden( array('id'), $cat_id) . $core->formNonce() . '</p>' .233 form::hidden(['id'], $cat_id) . $core->formNonce() . '</p>' . 234 234 '</form>' . 235 235 '</div>'; … … 241 241 '<h4>' . __('Category sibling') . '</h4>' . 242 242 '<p><label class="classic" for="cat_sibling">' . __('Move current category') . '</label> ' . 243 form::combo('cat_move', array(__('before') => 'before', __('after') => 'after'),244 array('extra_html' => 'title="' . __('position: ') . '"')) . ' ' .243 form::combo('cat_move', [__('before') => 'before', __('after') => 'after'], 244 ['extra_html' => 'title="' . __('position: ') . '"']) . ' ' . 245 245 form::combo('cat_sibling', $siblings) . '</p>' . 246 246 '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . 247 form::hidden( array('id'), $cat_id) . $core->formNonce() . '</p>' .247 form::hidden(['id'], $cat_id) . $core->formNonce() . '</p>' . 248 248 '</form>' . 249 249 '</div>';
Note: See TracChangeset
for help on using the changeset viewer.