Fixes for Windows and Webservers

This commit is contained in:
Diego Najar 2015-06-21 21:19:41 -03:00
parent 1baace092e
commit c2477901ff
2 changed files with 4 additions and 8 deletions

View File

@ -15,7 +15,8 @@ define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS); define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS);
define('DOMAIN', getenv('HTTP_HOST')); define('DOMAIN', getenv('HTTP_HOST'));
$base = (dirname(getenv('SCRIPT_NAME'))==DS)?DS:dirname(getenv('SCRIPT_NAME')).DS; // HTML PATHs
$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
define('HTML_PATH_ROOT', $base); define('HTML_PATH_ROOT', $base);
if(!defined('JSON_PRETTY_PRINT')) { if(!defined('JSON_PRETTY_PRINT')) {

View File

@ -108,13 +108,8 @@ $Url = new Url();
$Parsedown = new Parsedown(); $Parsedown = new Parsedown();
// HTML PATHs // HTML PATHs
$tmp = dirname(getenv('SCRIPT_NAME')); $base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
if($tmp!='/') { define('HTML_PATH_ROOT', $base);
define('HTML_PATH_ROOT', $tmp.'/');
}
else {
define('HTML_PATH_ROOT', $tmp);
}
define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/'); define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/');
define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/'); define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/');