/**\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
* @copyright Copyright (C) 2002-2012 The Nucleus Group\r
- * @version $Id: index.php 1705 2012-03-23 15:46:55Z sakamocchi $\r
+ * @version $Id$\r
*/\r
\r
/* global values initialize */\r
$manager = new Manager();\r
}\r
\r
+ include_once($DIR_LIBS . 'skinie.php');\r
+ \r
$aSkinErrors = installCustomSkins();\r
if ( count($aSkinErrors) > 0 )\r
{\r
$query = sprintf($query, tableName('nucleus_config'), $defSkinID);\r
sql_query($query);\r
\r
- $aPlugErrors = installCustomPlugs($manager);\r
+ $aPlugErrors = installCustomPlugs();\r
if ( count($aPlugErrors) > 0 )\r
{\r
array_merge($errors, $aPlugErrors);\r
if ( $result != FALSE && sql_num_rows($result) > 0 )\r
{\r
$row = sql_fetch_array($result);\r
- $match = preg_split('#\.#', $row['version']);\r
+ $match = i18n::explode('.', $row['version']);\r
}\r
else\r
{\r
if ( $result != FALSE && @sql_num_rows($result) > 0 )\r
{\r
$row = sql_fetch_row($result);\r
- $match = preg_split('#\.#', $row[1]);\r
+ $match = i18n::explode('.', $row[1]);\r
}\r
else\r
{\r
//$output = shell_exec('mysql -V');\r
$output = ( function_exists('shell_exec') ) ? @shell_exec('mysql -V') : '0.0.0';\r
preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version);\r
- $match = preg_split('#\.#', $version[0]);\r
+ $match = i18n::explode('.', $version[0]);\r
\r
if ( $match[0] == '' )\r
{\r
\r
/**\r
* Install custom plugins\r
- *\r
- * @param object $manager MANAGER class instance\r
*/\r
-function installCustomPlugs($manager)\r
+function installCustomPlugs()\r
{\r
- global $aConfPlugsToInstall, $DIR_LIBS;\r
+ global $aConfPlugsToInstall, $DIR_LIBS, $manager;\r
\r
$aErrors = array();\r
if ( count($aConfPlugsToInstall) == 0 )\r
return $aErrors;\r
}\r
\r
- include_once($DIR_LIBS . 'skinie.php');\r
$importer = new SkinImport();\r
\r
foreach ( $aConfSkinsToImport as $skinName )\r
$this->blog_shortname = 'mynucleuscms';\r
\r
/* root path */\r
- $this->root_path = realpath(dirname(__FILE__) . '/..');\r
+// $this->root_path = realpath(dirname(__FILE__) . '/..');\r
+ $this->root_path = implode('/', i18n::explode(DIRECTORY_SEPARATOR, realpath(dirname(__FILE__) . '/..')));\r
if ( substr($this->root_path, -1, 1) !== '/' )\r
{\r
$this->root_path .= '/';\r
}\r
- $base_path_pcre = preg_quote($this->root_path, '#');\r
+ $base_path_pcre = preg_quote($this->root_path, '|');\r
\r
/* current directry name */\r
- $directory_name = preg_replace("#$base_path_pcre#", '', dirname(__FILE__));\r
- $directory_name_pcre = preg_quote($directory_name, '#');\r
+ $directory_name = preg_replace("|$base_path_pcre|", '', implode('/', i18n::explode(DIRECTORY_SEPARATOR, realpath(dirname(__FILE__)))));\r
+ $directory_name_pcre = preg_quote($directory_name, '|');\r
\r
/* root uri */\r
$root_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];\r
- $this->root_url = preg_replace("#$directory_name_pcre(.*)$#", '', $root_url);\r
+ $this->root_url = preg_replace("|$directory_name_pcre(.*)$|", '', $root_url);\r
\r
- $this->AdminPath = $this->root_path . 'nucleus' . DIRECTORY_SEPARATOR;\r
- $this->MediaPath = $this->root_path . 'media' . DIRECTORY_SEPARATOR;\r
- $this->SkinsPath = $this->root_path . 'skins' . DIRECTORY_SEPARATOR;\r
+ $this->AdminPath = $this->root_path . 'nucleus/';\r
+ $this->MediaPath = $this->root_path . 'media/';\r
+ $this->SkinsPath = $this->root_path . 'skins/';\r
\r
$this->IndexURL = $this->root_url;\r
$this->AdminURL = $this->root_url . 'nucleus/';\r
$errors[] = sprintf(_VALID_ERROR2, _DB_FIELD2);\r
}\r
\r
- if ( $this->mysql_password == '' )\r
- {\r
- $errors[] = sprintf(_VALID_ERROR1, _DB_FIELD3);\r
- }\r
+// if ( $this->mysql_password == '' )\r
+// {\r
+// $errors[] = sprintf(_VALID_ERROR1, _DB_FIELD3);\r
+// }\r
\r
if ( $this->mysql_database == '' )\r
{\r