1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Fixes #321 - custom folder names working again. JS/CSS comments shown during Debug mode only.

This commit is contained in:
Cameron
2014-07-03 19:45:50 -07:00
parent 9ccc6dd78b
commit de3cbe913d
3 changed files with 16 additions and 6 deletions

View File

@@ -224,7 +224,7 @@ $tmp = realpath(dirname(__FILE__).'/'.$HANDLERS_DIRECTORY);
e107_require_once($tmp.'/e107_class.php'); e107_require_once($tmp.'/e107_class.php');
unset($tmp); unset($tmp);
$e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY'); $e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY', 'CORE_DIRECTORY', 'WEB_DIRECTORY');
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix'); $sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
$e107 = e107::getInstance()->initCore($e107_paths, realpath(dirname(__FILE__)), $sql_info, varset($E107_CONFIG, array())); $e107 = e107::getInstance()->initCore($e107_paths, realpath(dirname(__FILE__)), $sql_info, varset($E107_CONFIG, array()));
@@ -2051,6 +2051,12 @@ function session_set($name, $value, $expire='', $path = e_HTTP, $domain = '', $s
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------// //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
function message_handler($mode, $message, $line = 0, $file = '') function message_handler($mode, $message, $line = 0, $file = '')
{ {
if(defined('e_DEBUG') && e_DEBUG === true)
{
echo $message;
return;
}
e107_require_once(e_HANDLER.'message_handler.php'); e107_require_once(e_HANDLER.'message_handler.php');
show_emessage($mode, $message, $line, $file); show_emessage($mode, $message, $line, $file);
} }
@@ -2489,7 +2495,10 @@ class e_http_header
$this->setHeader("Content-Length: ".strlen($this->content), true); $this->setHeader("Content-Length: ".strlen($this->content), true);
} }
if(defset('X-POWERED-BY') !== false)
{
$this->setHeader("X-Powered-By: e107", true); // no less secure than e107-specific html. $this->setHeader("X-Powered-By: e107", true); // no less secure than e107-specific html.
}
if($this->compression_server_support == true) if($this->compression_server_support == true)
{ {
@@ -2544,3 +2553,4 @@ function plugInstalled($plugname)
// Could add more checks here later if appropriate // Could add more checks here later if appropriate
return isset($pref['plug_installed'][$plugname]);*/ return isset($pref['plug_installed'][$plugname]);*/
} }

View File

@@ -170,7 +170,7 @@ $e_pref = e107::getConfig('core');
// Register Core CSS first, TODO - convert $no_core_css to constant, awaiting for path changes // Register Core CSS first, TODO - convert $no_core_css to constant, awaiting for path changes
// NOTE: PREVIEWTHEME check commented - It shouldn't break anything as it's overridden by theme CSS now // NOTE: PREVIEWTHEME check commented - It shouldn't break anything as it's overridden by theme CSS now
if (/*!defined("PREVIEWTHEME") && */!isset($no_core_css) || !$no_core_css) if (/*!defined("PREVIEWTHEME") && */! (isset($no_core_css) && $no_core_css !==true) && defset('CORE_CSS') !== false)
{ {
//echo "<link rel='stylesheet' href='".e_FILE_ABS."e107.css' type='text/css' />\n"; //echo "<link rel='stylesheet' href='".e_FILE_ABS."e107.css' type='text/css' />\n";
$e_js->otherCSS('{e_WEB_CSS}e107.css'); $e_js->otherCSS('{e_WEB_CSS}e107.css');

View File

@@ -1113,7 +1113,7 @@ class e_jsmanager
} }
$tp = e107::getParser(); $tp = e107::getParser();
echo "\n"; echo "\n";
if($label) //TODO - print comments only if site debug is on if($label && E107_DEBUG_LEVEL > 0)
{ {
echo $external ? "<!-- [JSManager] ".$label." -->\n" : "/* [JSManager] ".$label." */\n\n"; echo $external ? "<!-- [JSManager] ".$label." -->\n" : "/* [JSManager] ".$label." */\n\n";
} }
@@ -1262,7 +1262,7 @@ class e_jsmanager
switch ($type) switch ($type)
{ {
case 'js': case 'js':
if($label) //TODO - print comments only if site debug is on if($label && E107_DEBUG_LEVEL > 0)
{ {
echo "<!-- [JSManager] ".$label." -->\n"; echo "<!-- [JSManager] ".$label." -->\n";
} }
@@ -1285,7 +1285,7 @@ class e_jsmanager
break; break;
case 'css': case 'css':
if($label) //TODO - print comments only if site debug is on if($label && E107_DEBUG_LEVEL > 0)
{ {
echo "<!-- [CSSManager] ".$label." -->\n"; echo "<!-- [CSSManager] ".$label." -->\n";
} }