Changeset 3874:ab8368569446 for inc/admin/lib.admincombos.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.admincombos.php
r3731 r3874 29 29 public static function getCategoriesCombo($categories, $include_empty = true, $use_url = false) 30 30 { 31 $categories_combo = array();31 $categories_combo = []; 32 32 if ($include_empty) { 33 $categories_combo = array(new formSelectOption(__('(No cat)'), ''));33 $categories_combo = [new formSelectOption(__('(No cat)'), '')]; 34 34 } 35 35 while ($categories->fetch()) { … … 51 51 public static function getPostStatusesCombo() 52 52 { 53 $status_combo = array();53 $status_combo = []; 54 54 foreach (self::$core->blog->getAllPostStatus() as $k => $v) { 55 55 $status_combo[$v] = (string) $k; … … 66 66 public static function getUsersCombo($users) 67 67 { 68 $users_combo = array();68 $users_combo = []; 69 69 while ($users->fetch()) { 70 70 $user_cn = dcUtils::getUserCN($users->user_id, $users->user_name, … … 88 88 public static function getDatesCombo($dates) 89 89 { 90 $dt_m_combo = array();90 $dt_m_combo = []; 91 91 while ($dates->fetch()) { 92 92 $dt_m_combo[dt::str('%B %Y', $dates->ts())] = $dates->year() . $dates->month(); … … 107 107 $all_langs = l10n::getISOcodes(0, 1); 108 108 if ($with_available) { 109 $langs_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1, 1));109 $langs_combo = ['' => '', __('Most used') => [], __('Available') => l10n::getISOcodes(1, 1)]; 110 110 while ($langs->fetch()) { 111 111 if (isset($all_langs[$langs->post_lang])) { … … 117 117 } 118 118 } else { 119 $langs_combo = array();119 $langs_combo = []; 120 120 while ($langs->fetch()) { 121 121 $lang_name = isset($all_langs[$langs->post_lang]) ? $all_langs[$langs->post_lang] : $langs->post_lang; … … 134 134 public static function getAdminLangsCombo() 135 135 { 136 $lang_combo = array();136 $lang_combo = []; 137 137 $langs = l10n::getISOcodes(1, 1); 138 138 foreach ($langs as $k => $v) { … … 150 150 public static function getEditorsCombo() 151 151 { 152 $editors_combo = array();152 $editors_combo = []; 153 153 154 154 foreach (self::$core->getEditors() as $v) { … … 167 167 public static function getFormatersCombo($editor_id = '') 168 168 { 169 $formaters_combo = array();169 $formaters_combo = []; 170 170 171 171 if (!empty($editor_id)) { … … 191 191 public static function getBlogStatusesCombo() 192 192 { 193 $status_combo = array();193 $status_combo = []; 194 194 foreach (self::$core->getAllBlogStatus() as $k => $v) { 195 195 $status_combo[$v] = (string) $k; … … 205 205 public static function getCommentStatusescombo() 206 206 { 207 $status_combo = array();207 $status_combo = []; 208 208 foreach (self::$core->blog->getAllCommentStatus() as $k => $v) { 209 209 $status_combo[$v] = (string) $k;
Note: See TracChangeset
for help on using the changeset viewer.