+ getDefaultCss() and getSysURL().
This commit is contained in:
@@ -206,4 +206,24 @@ EOT;
|
||||
ksort($diff);
|
||||
return implode("\n", $diff);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳURL<52><4C>ַ<EFBFBD><D6B7>*/
|
||||
public function getSysURL()
|
||||
{
|
||||
global $config;
|
||||
$httpType = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? 'https' : 'http';
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
return "$httpType://$httpHost";
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳĬ<CDB3>ϵ<EFBFBD><CFB5><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>*/
|
||||
public function getDefaultCss()
|
||||
{
|
||||
global $app;
|
||||
$pathFix = $app->getPathFix();
|
||||
$cssFile = $app->getAppRoot() . "www{$pathFix}theme{$pathFix}default{$pathFix}style.css";
|
||||
$cssContent = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','', file_get_contents($cssFile));
|
||||
$cssContent = str_replace(array(" {", "} ", ' ', "\r\n", "\r", "\n", "\t"), array("{", '}', ' ', ''), $cssContent);
|
||||
return $cssContent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user