+#17862 - 5.3.0 \82Å parse_ini_file() \82Ì\8eÀ\91\95\82ª\95Ï\82í\82Á\82Ä Fatal \82É\82È\82Á\82Ä\82¢\82½\82Ì\82ð\8fC\90³
#17846 - \8aÇ\97\9d\89æ\96Ê\82Ì\82ä\81[\82´\95Ò\8fW\82ª Fatal \82É\82È\82Á\82Ä\82½\82Ì\82Å\8fC\90³
#17680 - \95Ï\8dX\97\9a\97ð(\82±\82Ì\82Ó\82\9f\82¢\82é)\82ð\92Ç\89Á
#17619 - \82®\82é\81[\82Õ\8c \8cÀ\82ð\95Ï\8dX\82·\82é\82Æ Fatal \82É\82È\82Á\82Ä\82½\82Ì\82Å\8fC\90³
require_once XCUBE_CORE_PATH . '/XCube_HttpContext.class.php';
-function XC_CLASS_EXISTS($className)
+if(version_compare(PHP_VERSION, '5.0', '>='))
{
- if (version_compare(PHP_VERSION, "5.0", ">=")) {
- return class_exists($className, false);
- }
- else {
- return class_exists($className);
- }
+ function XC_CLASS_EXISTS($className)
+ {
+ return class_exists($className, false);
+ }
+}
+else
+{
+ function XC_CLASS_EXISTS($className)
+ {
+ return class_exists($className);
+ }
+}
+
+if(version_compare(PHP_VERSION, '5.3', '>='))
+{
+ function XC_PARSE_INI_FILE($file)
+ {
+ return parse_ini_string(preg_replace(array('|^<\?php\s*/\*+|','|\*+/(?:\s*\?>)?\s*$|'),'',file_get_contents($file)), true);
+ }
+}
+else
+{
+ function XC_PARSE_INI_FILE($file)
+ {
+ return parse_ini_file($file, true);
+ }
}
/**
die("FETAL: open error: site setting config.");
}
- $this->setSiteConfig(parse_ini_file($file, true));
+ $this->setSiteConfig(XC_PARSE_INI_FILE($file));
//
// Override setting.
$overrideFile = func_get_arg($i);
if (file_exists($overrideFile)) {
- $this->overrideSiteConfig(parse_ini_file($overrideFile, true));
+ $this->overrideSiteConfig(XC_PARSE_INI_FILE($overrideFile));
}
}
}
function loadManifesto($file)
{
if (file_exists($file)) {
- $this->_mManifesto = parse_ini_file($file, true);
+ $this->_mManifesto = XCUBE_PARSE_INI_FILE($file);
$this->mName = isset($this->_mManifesto['Manifesto']['Name']) ? $this->_mManifesto['Manifesto']['Name'] : "";
$this->mDepends = isset($this->_mManifesto['Manifesto']['Depends']) ? $this->_mManifesto['Manifesto']['Depends'] : "";
$this->mVersion = isset($this->_mManifesto['Manifesto']['Version']) ? $this->_mManifesto['Manifesto']['Version'] : "";
$themeDir = XOOPS_THEME_PATH . "/" . $this->get('name');
if (file_exists($mnfFile = $themeDir . "/manifesto.ini.php")) {
- $this->mPackage = parse_ini_file($mnfFile, true);
+ $this->mPackage = XCUBE_PARSE_INI_FILE($mnfFile);
}
if (isset($this->mPackage['Manifesto'])) {
if(is_dir($themeDir)) {
$manifesto = array();
if (file_exists($mnfFile = $themeDir . "/manifesto.ini.php")) {
- $manifesto = parse_ini_file($mnfFile, true);
+ $manifesto = XCUBE_PARSE_INI_FILE($mnfFile);
}
if(count($manifesto) > 0) {