Changeset 3874:ab8368569446 for plugins/userPref
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- Location:
- plugins/userPref
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/userPref/_define.php
r3731 r3874 17 17 "Franck Paul", // Author 18 18 '0.3', // Version 19 array(19 [ 20 20 'type' => 'plugin' 21 )21 ] 22 22 ); -
plugins/userPref/index.php
r3813 r3874 69 69 { 70 70 if ($s['type'] == 'boolean') { 71 $field = form::combo( array($field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id),72 array(__('yes') => 1, __('no') => 0), $s['value'] ? 1 : 0);71 $field = form::combo([$field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id], 72 [__('yes') => 1, __('no') => 0], $s['value'] ? 1 : 0); 73 73 } else { 74 74 if ($s['type'] == 'array') { 75 $field = form::field( array($field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id), 40, null,75 $field = form::field([$field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id], 40, null, 76 76 html::escapeHTML(json_encode($s['value']))); 77 77 } else { 78 $field = form::field( array($field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id), 40, null,78 $field = form::field([$field_name . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id], 40, null, 79 79 html::escapeHTML($s['value'])); 80 80 } 81 81 } 82 $type = form::hidden( array($field_name . '_type' . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id . '_type'),82 $type = form::hidden([$field_name . '_type' . '[' . $ws . '][' . $id . ']', $field_name . '_' . $ws . '_' . $id . '_type'], 83 83 html::escapeHTML($s['type'])); 84 84 … … 103 103 <?php 104 104 echo dcPage::breadcrumb( 105 array(105 [ 106 106 __('System') => '', 107 107 html::escapeHTML($core->auth->userID()) => '', 108 108 __('user:preferences') => '' 109 )) .109 ]) . 110 110 dcPage::notices(); 111 111 … … 128 128 $table_footer = '</tbody></table></div>'; 129 129 130 $prefs = array();130 $prefs = []; 131 131 foreach ($core->auth->user_prefs->dumpWorkspaces() as $ws => $workspace) { 132 132 foreach ($workspace->dumpPrefs() as $k => $v) { … … 136 136 ksort($prefs); 137 137 if (count($prefs) > 0) { 138 $ws_combo = array();138 $ws_combo = []; 139 139 foreach ($prefs as $ws => $s) { 140 140 $ws_combo[$ws] = '#l_' . $ws; … … 144 144 '<p class="anchor-nav">' . 145 145 '<label for="lp_nav" class="classic">' . __('Goto:') . '</label> ' . 146 form::combo('lp_nav', $ws_combo, array('class' => 'navigation')) .146 form::combo('lp_nav', $ws_combo, ['class' => 'navigation']) . 147 147 ' <input type="submit" value="' . __('Ok') . '" id="lp_submit" />' . 148 148 '<input type="hidden" name="p" value="userPref" />' . … … 174 174 175 175 <?php 176 $prefs = array();176 $prefs = []; 177 177 178 178 foreach ($core->auth->user_prefs->dumpWorkspaces() as $ws => $workspace) { … … 185 185 186 186 if (count($prefs) > 0) { 187 $ws_combo = array();187 $ws_combo = []; 188 188 foreach ($prefs as $ws => $s) { 189 189 $ws_combo[$ws] = '#g_' . $ws; … … 193 193 '<p class="anchor-nav">' . 194 194 '<label for="gp_nav" class="classic">' . __('Goto:') . '</label> ' . 195 form::combo('gp_nav', $ws_combo, array('class' => 'navigation')) .195 form::combo('gp_nav', $ws_combo, ['class' => 'navigation']) . 196 196 ' <input type="submit" value="' . __('Ok') . '" id="gp_submit" />' . 197 197 '<input type="hidden" name="p" value="userPref" />' .
Note: See TracChangeset
for help on using the changeset viewer.