1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +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');
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');
$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 = '')
{
if(defined('e_DEBUG') && e_DEBUG === true)
{
echo $message;
return;
}
e107_require_once(e_HANDLER.'message_handler.php');
show_emessage($mode, $message, $line, $file);
}
@@ -2489,7 +2495,10 @@ class e_http_header
$this->setHeader("Content-Length: ".strlen($this->content), true);
}
$this->setHeader("X-Powered-By: e107", true); // no less secure than e107-specific html.
if(defset('X-POWERED-BY') !== false)
{
$this->setHeader("X-Powered-By: e107", true); // no less secure than e107-specific html.
}
if($this->compression_server_support == true)
{
@@ -2544,3 +2553,4 @@ function plugInstalled($plugname)
// Could add more checks here later if appropriate
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
// 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";
$e_js->otherCSS('{e_WEB_CSS}e107.css');

View File

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