Changeset 902 for trunk/admin/common.php
- Timestamp:
- 2012-05-29T04:25:41+02:00 (12 months ago)
- File:
-
- 1 edited
-
trunk/admin/common.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/common.php
r783 r902 41 41 function get_language_file($name) 42 42 { 43 global $c harset, $lang;44 $s = strtolower($c harset);45 if ( isset($lang)) {46 $l = strtolower($ lang);43 global $config; 44 $s = strtolower($config['charset']); 45 if (!empty($config['lang'])) { 46 $l = strtolower($config['lang']); 47 47 $file = get_language_file_ex($name, $l, $s); 48 48 if (!isset($file)) { … … 56 56 $file = get_language_file_ex($name, $l, $s); 57 57 if (isset($file)) { 58 $ lang= $l;58 $config['lang'] = $l; 59 59 break; 60 60 } … … 63 63 $file = get_language_file_ex($name, $ll, $s); 64 64 if (isset($file)) { 65 $ lang= $l;65 $config['lang'] = $l; 66 66 break; 67 67 } … … 77 77 return $GLOBALS['strings'][$str]; 78 78 } 79 if (!empty($GLOBALS[' show_todo_strings'])) {79 if (!empty($GLOBALS['config']['show_todo_strings'])) { 80 80 return '<span style="color:red">' . htmlspecialchars($str) . '</span>'; 81 81 } … … 96 96 } 97 97 98 function ob_filter_path_nicer_default($list_html) 99 { 100 $sep = DIRECTORY_SEPARATOR; 101 $docRoot = $_SERVER['DOCUMENT_ROOT']; 102 $list_html = str_replace($docRoot, "{DOCROOT}" . (substr($docRoot, -1) == $sep ? $sep : ""), $list_html); 103 $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 104 $list_html = str_replace($xcachedir . $sep, "{XCache}$sep", $list_html); 105 if ($sep == '/') { 106 $list_html = str_replace("/home/", "{H}/", $list_html); 107 } 108 return $list_html; 109 } 110 111 98 112 error_reporting(E_ALL); 99 113 ini_set('display_errors', 'On'); … … 105 119 $_POST = stripaddslashes_array($_POST, $mqs); 106 120 $_REQUEST = stripaddslashes_array($_REQUEST, $mqs); 121 unset($mqs); 107 122 } 108 123 ini_set('magic_quotes_runtime', '0'); 109 124 110 $charset = "UTF-8"; 125 $config = array(); 126 include("./config.default.php"); 111 127 if (file_exists("./config.php")) { 112 128 include("./config.php"); … … 114 130 115 131 include(get_language_file("common")); 116 if ( !isset($lang)) {117 $ lang= 'en-us';132 if (empty($config['lang'])) { 133 $config['lang'] = 'en-us'; 118 134 } 119 if (!isset($usage_graph_width) && !isset($free_graph_width)) {120 $usage_graph_width = 120;121 }122 $graph_width = isset($free_graph_width) ? $free_graph_width : $usage_graph_width;123 135 124 136 ?>
Note: See TracChangeset
for help on using the changeset viewer.

