Changeset 10307 for trunk/plugins/LocalFilesEditor/admin.php
- Timestamp:
- Apr 12, 2011, 1:12:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/LocalFilesEditor/admin.php
r9359 r10307 75 75 $newfile_page = isset($_GET['newfile']) ? true : false; 76 76 77 // Editarea options78 $editarea_options = array(79 'language' => substr($user['language'], 0, 2),80 'start_highlight' => true,81 'allow_toggle' => false,82 'toolbar' => 'search,fullscreen, |,select_font, |, undo, redo, change_smooth_selection, highlight, reset_highlight, |, help');83 84 77 // Edit selected file for CSS, template and language 85 78 if ((isset($_POST['edit'])) and !is_numeric($_POST['file_to_edit'])) … … 139 132 . 'show_default.php?file=include/config_default.inc.php', 140 133 'FILE' => 'config_default.inc.php'))); 141 $ editarea_options['syntax'] = 'php';134 $codemirror_mode = 'application/x-httpd-php'; 142 135 break; 143 136 … … 160 153 'OPTIONS' => $options, 161 154 'SELECTED' => $selected)); 162 $ editarea_options['syntax'] = 'css';155 $codemirror_mode = 'text/css'; 163 156 break; 164 157 … … 239 232 'NEW_FILE_CLASS' => empty($edited_file) ? '' : 'top_right')); 240 233 241 $ editarea_options['syntax'] = 'html';234 $codemirror_mode = 'text/html'; 242 235 break; 243 236 … … 267 260 'OPTIONS' => $options, 268 261 'SELECTED' => $selected)); 269 $ editarea_options['syntax'] = 'php';262 $codemirror_mode = 'application/x-httpd-php'; 270 263 break; 271 264 … … 274 267 $content_file = file_exists($edited_file) ? 275 268 file_get_contents($edited_file) : $new_file['plug']; 276 $ editarea_options['syntax'] = 'php';269 $codemirror_mode = 'application/x-httpd-php'; 277 270 break; 278 271 } … … 368 361 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin-LocalFilesEditor-'.$page['tab'], 369 362 'LOCALEDIT_PATH' => LOCALEDIT_PATH, 370 'LOAD_EDITAREA' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off', 371 'EDITAREA_OPTIONS' => $editarea_options)); 363 'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off', 364 'CODEMIRROR_MODE' => @$codemirror_mode 365 ) 366 ); 372 367 373 368 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
Note: See TracChangeset
for help on using the changeset viewer.