Index: core/kernel/application.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/application.php (revision 15956)
+++ core/kernel/application.php (revision )
@@ -297,7 +297,8 @@
$this->Factory = new $factory_class();
$this->registerDefaultClasses();
- $vars = kUtil::parseConfig(true);
+ $config = new kSystemConfig('', true);
+ $vars = $config->getData();
$db_class = isset($vars['Databases']) ? 'kDBLoadBalancer' : ($this->isDebugMode() ? 'kDBConnectionDebug' : 'kDBConnection');
$this->Conn = $this->Factory->makeClass($db_class, Array (SQL_TYPE, Array ($this->_logger, 'handleSQLError')));
$this->Conn->setup($vars);
Index: core/kernel/utility/cache.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/cache.php (revision 15956)
+++ core/kernel/utility/cache.php (revision )
@@ -99,7 +99,7 @@
{
parent::__construct();
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
$this->siteKeyName = 'site_serial:' . crc32(SQL_TYPE . '://' . SQL_USER . ':' . SQL_PASS . '@' . SQL_SERVER . ':' . TABLE_PREFIX . ':' . SQL_DB);
// get cache handler class to use
@@ -743,7 +743,7 @@
$this->cachingType = CACHING_TYPE_MEMORY;
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
$memcached_servers = isset($vars['MemcacheServers']) ? $vars['MemcacheServers'] : $default_servers;
if ( $memcached_servers && class_exists('Memcache') ) {
\ No newline at end of file
Index: core/install/step_templates/db_config.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/db_config.tpl (revision 15956)
+++ core/install/step_templates/db_config.tpl (revision )
@@ -7,7 +7,7 @@
$option_tpl = ''."\n";
foreach ($options as $option_key => $option_title) {
- $selected = $option_key == $this->toolkit->getSystemConfig('Database', 'DBType') ? ' selected' : '';
+ $selected = $option_key == $this->toolkit->systemConfig->get('DBType', 'Database') ? ' selected' : '';
echo sprintf($option_tpl, $option_key, $selected, $option_title);
}
?>
@@ -18,28 +18,28 @@
Database Hostname *: |
-
+
|
Database Name *: |
-
+
|
Database User Name *: |
-
+
|
Database User Password: |
-
+
|
@@ -51,7 +51,7 @@
$option_tpl = ''."\n";
$collations = Array ('utf8_general_ci', 'latin1_swedish_ci');
foreach ($collations as $collation) {
- $selected = ($collation == $this->toolkit->getSystemConfig('Database', 'DBCollation')) ? ' selected="selected"' : '';
+ $selected = ($collation == $this->toolkit->systemConfig->get('DBCollation', 'Database')) ? ' selected="selected"' : '';
echo sprintf($option_tpl, $collation, $selected);
}
?>
@@ -62,7 +62,7 @@
Prefix for Table Names: |
-
+
|
\ No newline at end of file
Index: core/kernel/utility/system_config.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/system_config.php (revision )
+++ core/kernel/utility/system_config.php (revision )
@@ -0,0 +1,247 @@
+file = $file ? $file : FULL_PATH . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'config.php';
+ $this->parse_section = $parse_section;
+
+ $this->data = Array (
+ 'AdminDirectory' => '/admin',
+ 'AdminPresetsDirectory' => '/admin',
+ 'ApplicationClass' => 'kApplication',
+ 'ApplicationPath' => '/core/kernel/application.php',
+ 'CacheHandler' => 'Fake',
+ 'CmsMenuRebuildTime' => 10,
+ 'DomainsParsedRebuildTime' => 2,
+ 'EditorPath' => '/core/ckeditor/',
+ 'EnableSystemLog' => '0',
+ 'MemcacheServers' => 'localhost:11211',
+ 'RestrictedPath' => DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . '.restricted',
+ 'SectionsParsedRebuildTime' => 5,
+ 'StructureTreeRebuildTime' => 10,
+ 'SystemLogMaxLevel' => 5,
+ 'TemplateMappingRebuildTime' => 5,
+ 'TrustProxy' => '0',
+ 'UnitCacheRebuildTime' => 10,
+ 'WebsiteCharset' => 'utf-8',
+ 'WebsitePath' => rtrim(preg_replace('/'.preg_quote(rtrim(defined('REL_PATH') ? REL_PATH : '', '/'), '/').'$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'),
+ 'WriteablePath' => DIRECTORY_SEPARATOR . 'system',
+ );
+
+ if ( $parse_section ) {
+ $this->data = Array ('Misc' => $this->data);
+ }
+
+ $this->getData();
+ }
+
+ /**
+ * Returns config value
+ *
+ * @param string $key
+ * @param string $section
+ * @return string
+ * @access public
+ */
+ public function get($key, $section = null)
+ {
+ if ( $this->parse_section ) {
+ return ( isset($this->data[$section]) && isset($this->data[$section][$key]) ) ? $this->data[$section][$key] : false;
+ }
+
+ return isset($this->data[$key]) ? $this->data[$key] : false;
+ }
+
+ /**
+ * Parses "/system/config.php" file and writes the result to the data variable
+ *
+ * @return void
+ * @access public
+ */
+ public function parseConfig()
+ {
+ if ( !file_exists($this->file) ) {
+ return;
+ }
+
+ if ( file_exists($this->file) && !is_readable($this->file) ) {
+ die('Could Not Open Ini File');
+ }
+
+ $contents = file($this->file);
+
+ if ( $contents && $contents[0] == '<' . '?' . 'php die() ?' . ">\n" ) {
+ // format of "config.php" file before 5.1.0 version
+ array_shift($contents);
+ $this->data = array_merge($this->data, parse_ini_string(implode('', $contents), $parse_section));
+
+ return;
+ }
+
+ $_CONFIG = Array ();
+ require($this->file);
+
+ if ( $this->parse_section ) {
+ if ( isset($_CONFIG['Database']['LoadBalancing']) && $_CONFIG['Database']['LoadBalancing'] ) {
+ require FULL_PATH . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'db_servers.php';
+ }
+
+ $this->data = array_merge($this->data, $_CONFIG);
+
+ return;
+ }
+
+ foreach ($_CONFIG as $section_variables) {
+ $this->data = array_merge($this->data, $section_variables);
+ }
+ }
+
+ /**
+ * Returns parsed variables from "config.php" file
+ *
+ * @return Array
+ * @access public
+ */
+ public function getData()
+ {
+ static $is_parsed = false;
+
+ if ( !$is_parsed ) {
+ self::parseConfig();
+ }
+
+ return $this->data;
+ }
+
+ /**
+ * Returns path to "config.php" file
+ *
+ * @return string
+ * @access public
+ */
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ /**
+ * Returns config status - is changed or not changed
+ *
+ * @return bool
+ * @access public
+ */
+ public function isChanged()
+ {
+ return $this->isChanged;
+ }
+
+ /**
+ * Sets value to system config (yet saveConfig must be called to write it to file)
+ *
+ * @param $section
+ * @param $key
+ * @param $value
+ * @access public
+ */
+ public function set($key, $section, $value = null)
+ {
+ $this->isChanged = true;
+
+ if (isset($value)) {
+ if (!array_key_exists($section, $this->data)) {
+ // create section, when missing
+ $this->data[$section] = Array ();
+ }
+
+ // create key in section
+ $this->data[$section][$key] = $value;
+
+ return;
+ }
+
+ unset($this->data[$section][$key]);
+ }
+
+ /**
+ * Saves config data to the file
+ *
+ * @param bool $silent
+ * @throws Exception
+ * @access public
+ */
+ public function save($silent = false)
+ {
+ if (!is_writable($this->file) && !is_writable(dirname($this->file))) {
+ $error_msg = 'Cannot write to "' . $this->file . '" file';
+
+ if ($silent) {
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+ else {
+ throw new Exception($error_msg);
+ }
+
+ return ;
+ }
+
+ $fp = fopen($this->file, 'w');
+ fwrite($fp, '<' . '?' . 'php' . "\n\n");
+
+ foreach ($this->data as $section_name => $section_data) {
+ foreach ($section_data as $key => $value) {
+ fwrite($fp, '$_CONFIG[\'' . $section_name . '\'][\'' . $key . '\'] = \'' . addslashes($value) . '\';' . "\n");
+ }
+
+ fwrite($fp, "\n");
+ }
+
+ fclose($fp);
+
+ $this->isChanged = false;
+ }
+}
\ No newline at end of file
Index: core/install.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install.php (revision 15956)
+++ core/install.php (revision )
@@ -157,36 +157,15 @@
require_once(FULL_PATH . REL_PATH . '/install/install_toolkit.php'); // toolkit required for module installations to installator
$this->toolkit = new kInstallToolkit();
$this->toolkit->setInstallator($this);
-
$this->StepDBFile = FULL_PATH.'/'.REL_PATH.'/install/steps_db.xml';
-
- $base_path = rtrim(preg_replace('/'.preg_quote(rtrim(REL_PATH, '/'), '/').'$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/');
- $this->baseURL = 'http://'.$_SERVER['HTTP_HOST'].$base_path.'/core/install/';
-
+ $this->baseURL = 'http://' . $_SERVER['HTTP_HOST'] . $this->toolkit->systemConfig->get('WebsitePath', 'Misc') . '/core/install/';
set_error_handler( Array(&$this, 'ErrorHandler') );
- if (file_exists($this->toolkit->INIFile)) {
+ if ( $this->toolkit->systemConfigFound() ) {
// if config.php found, then check his write permission too
- $this->writeableFolders[] = $this->toolkit->defaultWritablePath . '/config.php';
+ $this->writeableFolders[] = $this->toolkit->systemConfig->get('WriteablePath', 'Misc') . '/config.php';
}
- if ( !$this->toolkit->getSystemConfig('Misc', 'WriteablePath') ) {
- $this->toolkit->setSystemConfig('Misc', 'WriteablePath', $this->toolkit->defaultWritablePath);
- }
-
- if ( !$this->toolkit->getSystemConfig('Misc', 'RestrictedPath') ) {
- $this->toolkit->setSystemConfig('Misc', 'RestrictedPath', $this->toolkit->getSystemConfig('Misc', 'WriteablePath') . DIRECTORY_SEPARATOR . '.restricted');
- }
-
- if ( !$this->toolkit->getSystemConfig('Misc', 'WebsitePath') ) {
- $this->toolkit->setSystemConfig('Misc', 'WebsitePath', $base_path);
- }
-
- if ( $this->toolkit->systemConfigChanged ) {
- // immediately save, because this paths will be used in kApplication class later
- $this->toolkit->SaveConfig(true);
- }
-
$this->currentStep = $this->GetVar('step');
// can't check login on steps where no application present anyways :)
@@ -310,7 +289,7 @@
break;
case 'check_paths':
- $writeable_base = $this->toolkit->getSystemConfig('Misc', 'WriteablePath');
+ $writeable_base = $this->toolkit->systemConfig->get('WriteablePath', 'Misc');
foreach ($this->writeableFolders as $folder_path) {
$file_path = FULL_PATH . str_replace('$1', $writeable_base, $folder_path);
if (file_exists($file_path) && !is_writable($file_path)) {
@@ -350,11 +329,8 @@
$submit_value = $this->GetVar($field_name);
if ($submit_value !== false) {
- $this->toolkit->setSystemConfig('Database', $field_name, $submit_value);
+ $this->toolkit->systemConfig->set($field_name, 'Database', $submit_value);
}
- /*else {
- $this->toolkit->setSystemConfig('Database', $field_name, '');
- }*/
}
break;
@@ -425,8 +401,8 @@
'login' => md5($username),
'password' => md5($password),
'action' => 'check',
- 'license_code' => base64_encode( $this->toolkit->getSystemConfig('Intechnic', 'LicenseCode') ),
- 'version' => '4.3.0',//$this->toolkit->GetMaxModuleVersion('core/'),
+ 'license_code' => base64_encode( $this->toolkit->systemConfig->get('LicenseCode', 'Intechnic') ),
+ 'version' => '4.3.0',
'domain' => base64_encode($_SERVER['HTTP_HOST']),
);
@@ -472,7 +448,8 @@
}
$write_check = true;
- $check_paths = Array ('/', '/index.php', $this->toolkit->defaultWritablePath . '/config.php', ADMIN_DIRECTORY . '/index.php');
+ $check_paths = Array ('/', '/index.php', $this->toolkit->systemConfig->get('WritablePath', 'Misc') . '/config.php', ADMIN_DIRECTORY . '/index.php');
+
foreach ($check_paths as $check_path) {
$path_check_status = $this->toolkit->checkWritePermissions(FULL_PATH . $check_path);
@@ -542,7 +519,7 @@
$section_name = 'Database';
$required_fields = Array ('DBType', 'DBHost', 'DBName', 'DBUser', 'DBCollation');
foreach ($required_fields as $required_field) {
- if (!$this->toolkit->getSystemConfig($section_name, $required_field)) {
+ if (!$this->toolkit->systemConfig->get($required_field, $section_name)) {
$status = false;
$this->errorMessage = 'Please fill all required fields';
break;
@@ -629,16 +606,16 @@
case 'db_reconfig':
// store db configuration
$sql = 'SHOW COLLATION
- LIKE \''.$this->toolkit->getSystemConfig('Database', 'DBCollation').'\'';
+ LIKE \''.$this->toolkit->systemConfig->get('DBCollation', 'Database').'\'';
$collation_info = $this->Conn->Query($sql);
if ($collation_info) {
- $this->toolkit->setSystemConfig('Database', 'DBCharset', $collation_info[0]['Charset']);
+ $this->toolkit->systemConfig->get('DBCharset', 'Database', $collation_info[0]['Charset']);
// database is already connected, that's why set collation on the fly
- $this->Conn->Query('SET NAMES \''.$this->toolkit->getSystemConfig('Database', 'DBCharset').'\' COLLATE \''.$this->toolkit->getSystemConfig('Database', 'DBCollation').'\'');
+ $this->Conn->Query('SET NAMES \''.$this->toolkit->systemConfig->get('DBCharset', 'Database').'\' COLLATE \''.$this->toolkit->systemConfig->get('DBCollation', 'Database').'\'');
}
- $this->toolkit->SaveConfig();
+ $this->toolkit->systemConfig->save();
if ($this->currentStep == 'db_config') {
if ($this->GetVar('UseExistingSetup')) {
@@ -652,7 +629,7 @@
$this->toolkit->RunSQL('/core/install/install_data.sql');
// create category using sql, because Application is not available here
- $table_name = $this->toolkit->getSystemConfig('Database', 'TablePrefix') . 'IdGenerator';
+ $table_name = $this->toolkit->systemConfig->get('TablePrefix', 'Database') . 'IdGenerator';
$this->Conn->Query('UPDATE ' . $table_name . ' SET lastid = lastid + 1');
$resource_id = $this->Conn->GetOne('SELECT lastid FROM ' . $table_name);
if ($resource_id === false) {
@@ -667,7 +644,7 @@
'ResourceId' => $resource_id - 1, 'l1_Description' => 'Content', 'Status' => 4,
);
- $this->Conn->doInsert($fields_hash, $this->toolkit->getSystemConfig('Database', 'TablePrefix') . 'Categories');
+ $this->Conn->doInsert($fields_hash, $this->toolkit->systemConfig->get('TablePrefix', 'Database') . 'Categories');
$this->toolkit->SetModuleRootCategory('Core', $this->Conn->getInsertID());
@@ -696,9 +673,9 @@
/* @var $modules_helper kModulesHelper */
if ($modules_helper->verifyLicense($file_data[1])) {
- $this->toolkit->setSystemConfig('Intechnic', 'License', $file_data[1]);
- $this->toolkit->setSystemConfig('Intechnic', 'LicenseCode', $file_data[2]);
- $this->toolkit->SaveConfig();
+ $this->toolkit->systemConfig->set('License', 'Intechnic', $file_data[1]);
+ $this->toolkit->systemConfig->set('LicenseCode', 'Intechnic', $file_data[2]);
+ $this->toolkit->save();
}
else {
$this->errorMessage = 'Invalid License File';
@@ -710,7 +687,7 @@
break;
case 3: // Use Existing License
- $license_hash = $this->toolkit->getSystemConfig('Intechnic', 'License');
+ $license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic');
if ($license_hash) {
$modules_helper = $this->Application->recallObject('ModulesHelper');
/* @var $modules_helper kModulesHelper */
@@ -728,9 +705,9 @@
case 4: // Skip License (Local Domain Installation)
if ($this->toolkit->sectionFound('Intechnic')) {
// remove any previous license information
- $this->toolkit->setSystemConfig('Intechnic', 'License');
- $this->toolkit->setSystemConfig('Intechnic', 'LicenseCode');
- $this->toolkit->SaveConfig();
+ $this->toolkit->systemConfig->set('License', 'Intechnic');
+ $this->toolkit->systemConfig->set('LicenseCode', 'Intechnic');
+ $this->toolkit->systemConfig->save();
}
break;
}
@@ -819,7 +796,7 @@
// get domain name as entered by user on the form
$domain = $this->GetVar('domain') == 1 ? $_SERVER['HTTP_HOST'] : str_replace(' ', '', $this->GetVar('other'));
- $license_hash = $this->toolkit->getSystemConfig('Intechnic', 'License');
+ $license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic');
if ($license_hash) {
// when license present, then extract domain from it
$license_hash = base64_decode($license_hash);
@@ -833,8 +810,8 @@
if ($domain != '') {
if (strstr($domain, $license_domain) || $modules_helper->_IsLocalSite($domain)) {
- $this->toolkit->setSystemConfig('Misc', 'Domain', $domain);
- $this->toolkit->SaveConfig();
+ $this->toolkit->systemConfig->set('Domain', 'Misc', $domain);
+ $this->toolkit->systemConfig->save();
}
else {
$this->errorMessage = 'Domain name entered does not match domain name in the license!';
@@ -850,11 +827,11 @@
foreach ($config_data as $section => $section_vars) {
foreach ($section_vars as $var_name => $var_value) {
- $this->toolkit->setSystemConfig($section, $var_name, $var_value);
+ $this->toolkit->systemConfig->set($var_name, $section, $var_value);
}
}
- $this->toolkit->SaveConfig();
+ $this->toolkit->systemConfig->save();
break;
case 'root_password':
@@ -864,8 +841,8 @@
$config_values = Array (
'RootPass' => $password_formatter->hashPassword($this->Application->GetVar('root_password')),
- 'Backup_Path' => FULL_PATH . $this->toolkit->getSystemConfig('Misc', 'WriteablePath') . DIRECTORY_SEPARATOR . 'backupdata',
- 'DefaultEmailSender' => 'portal@' . $this->toolkit->getSystemConfig('Misc', 'Domain')
+ 'Backup_Path' => FULL_PATH . $this->toolkit->systemConfig->get('WriteablePath', 'Misc') . DIRECTORY_SEPARATOR . 'backupdata',
+ 'DefaultEmailSender' => 'portal@' . $this->toolkit->systemConfig->get('Domain', 'Misc')
);
$site_timezone = date_default_timezone_get();
@@ -939,7 +916,7 @@
FROM ' . $theme_table . '
WHERE ' . $theme_id_field . ' = ' . $theme_id;
$theme_name = $this->Conn->GetOne($sql);
- $site_path = $this->toolkit->getSystemConfig('Misc', 'WebsitePath') . '/';
+ $site_path = $this->toolkit->systemConfig->get('WebsitePath','Misc') . '/';
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
@@ -1350,14 +1327,14 @@
$required_keys = Array ('DBType', 'DBUser', 'DBName');
foreach ($required_keys as $required_key) {
- if (!$this->toolkit->getSystemConfig('Database', $required_key)) {
+ if (!$this->toolkit->systemConfig->get($required_key, 'Database')) {
// one of required db connection settings missing -> abort connection
return false;
}
}
- $this->Conn = new kDBConnection($this->toolkit->getSystemConfig('Database', 'DBType'), Array(&$this, 'DBErrorHandler'));
- $this->Conn->setup( $this->toolkit->systemConfig );
+ $this->Conn = new kDBConnection($this->toolkit->systemConfig->get('DBType', 'Database'), Array(&$this, 'DBErrorHandler'));
+ $this->Conn->setup( $this->toolkit->systemConfig->getData() );
// setup toolkit too
$this->toolkit->Conn =& $this->Conn;
@@ -1372,7 +1349,7 @@
*/
function AlreadyInstalled()
{
- $table_prefix = $this->toolkit->getSystemConfig('Database', 'TablePrefix');
+ $table_prefix = $this->toolkit->systemConfig->get('TablePrefix', 'Database');
$settings_table = $this->TableExists('ConfigurationValues') ? 'ConfigurationValues' : 'SystemSettings';
$sql = 'SELECT VariableValue
@@ -1389,7 +1366,7 @@
// 2. user has all types of permissions in database
// 3. database environment settings met minimum requirements
- if (mb_strlen($this->toolkit->getSystemConfig('Database', 'TablePrefix')) > 7) {
+ if (mb_strlen($this->toolkit->systemConfig->get('TablePrefix', 'Database')) > 7) {
$this->errorMessage = 'Table prefix should not be longer than 7 characters';
return false;
}
@@ -1464,7 +1441,7 @@
*/
function TableExists($tables)
{
- $prefix = $this->toolkit->getSystemConfig('Database', 'TablePrefix');
+ $prefix = $this->toolkit->systemConfig->get('TablePrefix', 'Database');
$all_found = true;
$tables = explode(',', $tables);
Index: core/kernel/globals.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/globals.php (revision 15956)
+++ core/kernel/globals.php (revision )
@@ -157,68 +157,20 @@
}
/**
- * Parses "/system/config.php" file and returns the result
+ * Instantiate kSystemConfig class once and store locally
*
- * @param bool $parse_section
- * @return Array
* @access public
*/
- public static function parseConfig($parse_section = false)
+ public static function getSystemConfig()
{
- $file = FULL_PATH . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'config.php';
+ static $systemConfig;
- if ( !file_exists($file) ) {
- return Array ();
+ if ( !isset($systemConfig) ) {
+ include_once(KERNEL_PATH . '/utility/system_config.php'); // kSystemConfig class to access system/config.php data
+ $systemConfig = new kSystemConfig();
}
- if ( file_exists($file) && !is_readable($file) ) {
- die('Could Not Open Ini File');
- }
-
- $contents = file($file);
-
- if ( $contents && $contents[0] == '<' . '?' . 'php die() ?' . ">\n" ) {
- // format of "config.php" file before 5.1.0 version
- array_shift($contents);
-
- return parse_ini_string(implode('', $contents), $parse_section);
- }
-
- $_CONFIG = Array ();
- require($file);
-
- if ( $parse_section ) {
- if ( isset($_CONFIG['Database']['LoadBalancing']) && $_CONFIG['Database']['LoadBalancing'] ) {
- require FULL_PATH . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'db_servers.php';
- }
-
- return $_CONFIG;
- }
-
- $ret = Array ();
-
- foreach ($_CONFIG as $section => $section_variables) {
- $ret = array_merge($ret, $section_variables);
- }
-
- return $ret;
- }
-
- /**
- * Returns parsed variables from "config.php" file
- *
- * @return Array
- * @access public
- */
- public static function getConfigVars()
- {
- static $vars = NULL;
-
- if ( !isset($vars) ) {
- $vars = self::parseConfig();
- }
-
- return $vars;
+ return $systemConfig;
}
/**
\ No newline at end of file
Index: core/kernel/utility/http_query.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/http_query.php (revision 15956)
+++ core/kernel/utility/http_query.php (revision )
@@ -117,7 +117,7 @@
$_GET['ajax'] = 'yes';
}
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
$this->_trustProxy = isset($vars['TrustProxy']) ? (bool)$vars['TrustProxy'] : false;
}
Index: themes/advanced/platform/opensearch.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- themes/advanced/platform/opensearch.tpl (revision )
+++ themes/advanced/platform/opensearch.tpl (revision )
@@ -0,0 +1,15 @@
+
+
+ Search
+
+
+ Search
+ img/globe.gif
+ ()
+ Copyright 1997- .
+ open
+ false
+
+
+
+
\ No newline at end of file
Index: core/install/step_templates/security.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/security.tpl (revision 15956)
+++ core/install/step_templates/security.tpl (revision )
@@ -12,7 +12,7 @@
$output = '';
$write_check = true;
- $check_paths = Array ('/', '/index.php', $this->toolkit->defaultWritablePath . '/config.php', ADMIN_DIRECTORY . '/index.php');
+ $check_paths = Array ('/', '/index.php', $this->toolkit->systemConfig->get('WritablePath', 'Misc') . '/config.php', ADMIN_DIRECTORY . '/index.php');
foreach ($check_paths as $check_path) {
$path_secure = true;
\ No newline at end of file
Index: core/install/step_templates/db_reconfig.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/db_reconfig.tpl (revision 15956)
+++ core/install/step_templates/db_reconfig.tpl (revision )
@@ -7,7 +7,7 @@
$option_tpl = ''."\n";
foreach ($options as $option_key => $option_title) {
- $selected = $option_key == $this->toolkit->getSystemConfig('Database', 'DBType') ? ' selected' : '';
+ $selected = $option_key == $this->toolkit->systemConfig->get('DBType', 'Database') ? ' selected' : '';
echo sprintf($option_tpl, $option_key, $selected, $option_title);
}
?>
@@ -18,28 +18,28 @@
Database Hostname *: |
-
+
|
Database Name *: |
-
+
|
Database User Name *: |
-
+
|
Database User Password: |
-
+
|
@@ -51,7 +51,7 @@
$option_tpl = ''."\n";
$collations = Array ('utf8_general_ci', 'latin1_swedish_ci');
foreach ($collations as $collation) {
- $selected = ($collation == $this->toolkit->getSystemConfig('Database', 'DBCollation')) ? ' selected="selected"' : '';
+ $selected = ($collation == $this->toolkit->systemConfig->get('DBCollation', 'Database')) ? ' selected="selected"' : '';
echo sprintf($option_tpl, $collation, $selected);
}
?>
@@ -62,6 +62,6 @@
Prefix for Table Names: |
-
+
|
\ No newline at end of file
Index: core/units/helpers/modules_helper.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/helpers/modules_helper.php (revision 15956)
+++ core/units/helpers/modules_helper.php (revision )
@@ -182,7 +182,7 @@
}
$modules = Array();
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
$license = array_key_exists('License', $vars) ? base64_decode($vars['License']) : false;
if ($license) {
list ( , , $i_Keys) = $this->_ParseLicense($license);
\ No newline at end of file
Index: core/units/helpers/minifiers/minify_helper.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/helpers/minifiers/minify_helper.php (revision 15956)
+++ core/units/helpers/minifiers/minify_helper.php (revision )
@@ -200,7 +200,7 @@
*/
public function compressString(&$string, $extension)
{
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
if ( !array_key_exists('CompressionEngine', $vars) ) {
// compression method not specified - use none
\ No newline at end of file
Index: core/install/step_templates/check_paths.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/check_paths.tpl (revision 15956)
+++ core/install/step_templates/check_paths.tpl (revision )
@@ -8,7 +8,7 @@
toolkit->getSystemConfig('Misc', 'WriteablePath');
+ $writeable_base = $this->toolkit->systemConfig->get('WriteablePath', 'Misc');
foreach ($this->writeableFolders as $folder_path) {
$file_path = str_replace('$1', $writeable_base, $folder_path);
if (file_exists(FULL_PATH . $file_path)) {
\ No newline at end of file
Index: core/kernel/startup.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/startup.php (revision 15956)
+++ core/kernel/startup.php (revision )
@@ -21,17 +21,12 @@
include_once(KERNEL_PATH . '/utility/multibyte.php'); // emulating multi-byte php extension
$globals_end = microtime(true);
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
- $charset = isset($vars['WebsiteCharset']) ? $vars['WebsiteCharset'] : 'utf-8';
- define('CHARSET', $charset);
+ define('CHARSET', $vars['WebsiteCharset']);
+ define('ADMIN_DIRECTORY', $vars['AdminDirectory']);
+ define('ADMIN_PRESETS_DIRECTORY', $vars['AdminPresetsDirectory']);
- $admin_directory = isset($vars['AdminDirectory']) ? $vars['AdminDirectory'] : '/admin';
- define('ADMIN_DIRECTORY', $admin_directory);
-
- $admin_Presets_directory = isset($vars['AdminPresetsDirectory']) ? $vars['AdminPresetsDirectory'] : ADMIN_DIRECTORY;
- define('ADMIN_PRESETS_DIRECTORY', $admin_Presets_directory);
-
$https_mark = getArrayValue($_SERVER, 'HTTPS');
define('PROTOCOL', ($https_mark == 'on') || ($https_mark == '1') ? 'https://' : 'http://');
@@ -71,8 +66,8 @@
// variable WebsitePath is auto-detected once during installation/upgrade
define('BASE_PATH', $vars['WebsitePath']);
- define('APPLICATION_CLASS', isset($vars['ApplicationClass']) ? $vars['ApplicationClass'] : 'kApplication');
- define('APPLICATION_PATH', isset($vars['ApplicationPath']) ? $vars['ApplicationPath'] : '/core/kernel/application.php');
+ define('APPLICATION_CLASS', $vars['ApplicationClass']);
+ define('APPLICATION_PATH', $vars['ApplicationPath']);
if (isset($vars['WriteablePath'])) {
define('WRITEABLE', FULL_PATH . $vars['WriteablePath']);
@@ -113,7 +108,7 @@
define('IMAGES_PENDING_PATH', IMAGES_PATH . 'pending/');
define('MAX_UPLOAD_SIZE', min(ini_get('upload_max_filesize'), ini_get('post_max_size'))*1024*1024);
- define('EDITOR_PATH', isset($vars['EditorPath']) ? $vars['EditorPath'] : '/core/ckeditor/');
+ define('EDITOR_PATH', $vars['EditorPath']);
// caching types
define('CACHING_TYPE_NONE', 0);
@@ -129,12 +124,12 @@
static public $domainsParsedRebuildTime;
}
- CacheSettings::$unitCacheRebuildTime = isset($vars['UnitCacheRebuildTime']) ? $vars['UnitCacheRebuildTime'] : 10;
- CacheSettings::$structureTreeRebuildTime = isset($vars['StructureTreeRebuildTime']) ? $vars['StructureTreeRebuildTime'] : 10;
- CacheSettings::$cmsMenuRebuildTime = isset($vars['CmsMenuRebuildTime']) ? $vars['CmsMenuRebuildTime'] : 10;
- CacheSettings::$templateMappingRebuildTime = isset($vars['TemplateMappingRebuildTime']) ? $vars['TemplateMappingRebuildTime'] : 5;
- CacheSettings::$sectionsParsedRebuildTime = isset($vars['SectionsParsedRebuildTime']) ? $vars['SectionsParsedRebuildTime'] : 10;
- CacheSettings::$domainsParsedRebuildTime = isset($vars['DomainsParsedRebuildTime']) ? $vars['DomainsParsedRebuildTime'] : 2;
+ CacheSettings::$unitCacheRebuildTime = $vars['UnitCacheRebuildTime'];
+ CacheSettings::$structureTreeRebuildTime = $vars['StructureTreeRebuildTime'];
+ CacheSettings::$cmsMenuRebuildTime = $vars['CmsMenuRebuildTime'];
+ CacheSettings::$templateMappingRebuildTime = $vars['TemplateMappingRebuildTime'];
+ CacheSettings::$sectionsParsedRebuildTime = $vars['SectionsParsedRebuildTime'];
+ CacheSettings::$domainsParsedRebuildTime = $vars['DomainsParsedRebuildTime'];
class MaintenanceMode {
const NONE = 0;
\ No newline at end of file
Index: core/kernel/utility/logger.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/logger.php (revision 15956)
+++ core/kernel/utility/logger.php (revision )
@@ -221,7 +221,7 @@
{
parent::__construct();
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
$this->_debugMode = $this->Application->isDebugMode();
$this->setState(isset($vars['EnableSystemLog']) ? $vars['EnableSystemLog'] : self::STATE_DISABLED);
\ No newline at end of file
Index: core/install/step_templates/sys_config.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/sys_config.tpl (revision 15956)
+++ core/install/step_templates/sys_config.tpl (revision )
@@ -1,19 +1,19 @@
Array ('type' => 'text', 'title' => 'Web Path to Installation', 'section' => 'Misc', 'required' => 1, 'default' => ''),
- 'WriteablePath' => Array ('type' => 'text', 'title' => 'Path to Writable folder', 'section' => 'Misc', 'required' => 1, 'default' => '/system'),
- 'RestrictedPath' => Array ('type' => 'text', 'title' => 'Path to Restricted folder', 'section' => 'Misc', 'required' => 1, 'default' => '/system/.restricted'),
- 'AdminDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin folder', 'section' => 'Misc', 'default' => '/admin'),
- 'AdminPresetsDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin Interface Presets folder', 'section' => 'Misc', 'default' => '/admin'),
- 'ApplicationClass' => Array ('type' => 'text', 'title' => 'Name of Base Application Class', 'section' => 'Misc', 'default' => 'kApplication'),
- 'ApplicationPath' => Array ('type' => 'text', 'title' => 'Path to Base Application Class file', 'section' => 'Misc', 'default' => '/core/kernel/application.php'),
- 'CacheHandler' => Array ('type' => 'select', 'title' => 'Output Caching Engine', 'section' => 'Misc', 'default' => 'Fake'),
- 'MemcacheServers' => Array ('type' => 'text', 'title' => 'Location of Memcache Servers', 'section' => 'Misc', 'default' => 'localhost:11211'),
- 'CompressionEngine' => Array ('type' => 'select', 'title' => 'CSS/JS Compression Engine', 'section' => 'Misc', 'default' => ''),
- 'WebsiteCharset' => Array ('type' => 'text', 'title' => 'Website Charset', 'section' => 'Misc', 'required' => 1, 'default' => 'utf-8'),
- 'EnableSystemLog' => Array ('type' => 'radio', 'title' => 'Enable "System Log"', 'section' => 'Misc', 'required' => 1, 'default' => '0'),
- 'SystemLogMaxLevel' => Array ('type' => 'select', 'title' => 'Highest "Log Level", that will be saved in "System Log"', 'section' => 'Misc', 'required' => 1, 'default' => '5'),
- 'TrustProxy' => Array ('type' => 'radio', 'title' => 'Trust Proxy', 'section' => 'Misc', 'required' => 1, 'default' => '0'),
+ 'WebsitePath' => Array ('type' => 'text', 'title' => 'Web Path to Installation', 'section' => 'Misc', 'required' => 1),
+ 'WriteablePath' => Array ('type' => 'text', 'title' => 'Path to Writable folder', 'section' => 'Misc', 'required' => 1),
+ 'RestrictedPath' => Array ('type' => 'text', 'title' => 'Path to Restricted folder', 'section' => 'Misc', 'required' => 1),
+ 'AdminDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin folder', 'section' => 'Misc'),
+ 'AdminPresetsDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin Interface Presets folder', 'section' => 'Misc'),
+ 'ApplicationClass' => Array ('type' => 'text', 'title' => 'Name of Base Application Class', 'section' => 'Misc'),
+ 'ApplicationPath' => Array ('type' => 'text', 'title' => 'Path to Base Application Class file', 'section' => 'Misc'),
+ 'CacheHandler' => Array ('type' => 'select', 'title' => 'Output Caching Engine', 'section' => 'Misc'),
+ 'MemcacheServers' => Array ('type' => 'text', 'title' => 'Location of Memcache Servers', 'section' => 'Misc'),
+ 'CompressionEngine' => Array ('type' => 'select', 'title' => 'CSS/JS Compression Engine', 'section' => 'Misc'),
+ 'WebsiteCharset' => Array ('type' => 'text', 'title' => 'Website Charset', 'section' => 'Misc', 'required' => 1),
+ 'EnableSystemLog' => Array ('type' => 'radio', 'title' => 'Enable "System Log"', 'section' => 'Misc', 'required' => 1),
+ 'SystemLogMaxLevel' => Array ('type' => 'select', 'title' => 'Highest "Log Level", that will be saved in "System Log"', 'section' => 'Misc', 'required' => 1),
+ 'TrustProxy' => Array ('type' => 'radio', 'title' => 'Trust Proxy', 'section' => 'Misc', 'required' => 1),
);
$settings['CacheHandler']['options'] = $this->toolkit->getWorkingCacheHandlers();
@@ -36,7 +36,7 @@
toolkit->getSystemConfig($output_params['section'], $config_var, $output_params['default']);
+ $config_value = $this->toolkit->systemConfig->get($config_var, $output_params['section']);
switch ( $output_params['type'] ) {
case 'text':
Index: core/install/install_toolkit.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/install_toolkit.php (revision 15956)
+++ core/install/install_toolkit.php (revision )
@@ -61,35 +61,13 @@
var $Conn = null;
/**
- * Path to config.php
+ * System config object to access data from config.php
*
- * @var string
- */
- var $INIFile = '';
-
- /**
- * Parsed data from config.php
- *
* @var Array
*/
- var $systemConfig = Array ();
+ var $systemConfig;
/**
- * Tells, that system config was changed
- *
- * @var bool
- * @access public
- */
- public $systemConfigChanged = false;
-
- /**
- * Path, used by system to store data on filesystem
- *
- * @var string
- */
- var $defaultWritablePath = '';
-
- /**
* Installator instance
*
* @var kInstallator
@@ -98,7 +76,8 @@
function kInstallToolkit()
{
- $this->defaultWritablePath = DIRECTORY_SEPARATOR . 'system';
+ include_once(FULL_PATH . REL_PATH . '/kernel/utility/system_config.php');
+ $this->systemConfig = new kSystemConfig('', true);
if ( class_exists('kApplication') ) {
// auto-setup in case of separate module install
@@ -107,10 +86,6 @@
$this->Conn =& $this->Application->GetADODBConnection();
}
-
- $this->INIFile = FULL_PATH . $this->defaultWritablePath . DIRECTORY_SEPARATOR . 'config.php';
-
- $this->systemConfig = $this->ParseConfig(true);
}
/**
@@ -209,14 +184,14 @@
$file_data = array_map('trim', $file_data);
if ($modules_helper->verifyLicense($file_data[0])) {
- $this->setSystemConfig('Intechnic', 'License', $file_data[0]);
+ $this->systemConfig->set('License', 'Intechnic', $file_data[0]);
if (array_key_exists(1, $file_data)) {
- $this->setSystemConfig('Intechnic', 'LicenseCode', $file_data[1]);
+ $this->systemConfig->set('LicenseCode', 'Intechnic', $file_data[1]);
}
else {
- $this->setSystemConfig('Intechnic', 'LicenseCode');
+ $this->systemConfig->set('LicenseCode', 'Intechnic');
}
- $this->SaveConfig();
+ $this->systemConfig->save();
}
else {
// invalid license received from licensing server
@@ -257,7 +232,7 @@
}
// get table prefix from config, because application may not be available here
- $table_prefix = $this->getSystemConfig('Database', 'TablePrefix');
+ $table_prefix = $this->systemConfig->get('TablePrefix', 'Database');
if ($module_name == 'kernel') {
$module_name = 'in-portal';
@@ -278,7 +253,7 @@
function SetModuleRootCategory($module_name, $category_id = 0)
{
// get table prefix from config, because application may not be available here
- $table_prefix = $this->getSystemConfig('Database', 'TablePrefix');
+ $table_prefix = $this->systemConfig->get('TablePrefix', 'Database');
if ($module_name == 'kernel') {
$module_name = 'in-portal';
@@ -355,11 +330,12 @@
*/
function RunSQLText(&$sqls, $replace_from = null, $replace_to = null, $start_from = 0)
{
- $table_prefix = $this->getSystemConfig('Database', 'TablePrefix');
+ $table_prefix = $this->systemConfig->get('TablePrefix', 'Database');
// add prefix to all tables
if (strlen($table_prefix) > 0) {
$replacements = Array ('INSERT INTO ', 'UPDATE ', 'ALTER TABLE ', 'DELETE FROM ', 'REPLACE INTO ');
+
foreach ($replacements as $replacement) {
$sqls = str_replace($replacement, $replacement . $table_prefix, $sqls);
}
@@ -394,7 +370,7 @@
}
$sql_count = count($sqls);
- $db_collation = $this->getSystemConfig('Database', 'DBCollation');
+ $db_collation = $this->systemConfig->get('DBCollation', 'Database');
for ($i = $start_from; $i < $sql_count; $i++) {
$sql = $sqls[$i];
@@ -502,147 +478,14 @@
return $this->Conn->GetCol($sql, $id_field);
}
- function ParseConfig($parse_section = false)
- {
- if (!file_exists($this->INIFile)) {
- return Array ();
- }
-
- if (file_exists($this->INIFile) && !is_readable($this->INIFile)) {
- die('Could Not Open Ini File');
- }
-
- $contents = file($this->INIFile);
-
- if ($contents && $contents[0] == '<' . '?' . 'php die() ?' . ">\n") {
- // format of "config.php" file before 5.1.0 version
- array_shift($contents);
-
- return $this->parseIniString(implode('', $contents), $parse_section);
- }
-
- $_CONFIG = Array ();
- require($this->INIFile);
-
- if ($parse_section) {
- return $_CONFIG;
- }
-
- $ret = Array ();
-
- foreach ($_CONFIG as $section => $section_variables) {
- $ret = array_merge($ret, $section_variables);
- }
-
- return $ret;
- }
-
/**
- * Equivalent for "parse_ini_string" function available since PHP 5.3.0
- *
- * @param string $ini
- * @param bool $process_sections
- * @param int $scanner_mode
- * @return Array
- */
- function parseIniString($ini, $process_sections = false, $scanner_mode = null)
- {
- # Generate a temporary file.
- $tempname = tempnam('/tmp', 'ini');
- $fp = fopen($tempname, 'w');
- fwrite($fp, $ini);
- $ini = parse_ini_file($tempname, !empty($process_sections));
- fclose($fp);
- @unlink($tempname);
-
- return $ini;
- }
-
- function SaveConfig($silent = false)
- {
- if (!is_writable($this->INIFile) && !is_writable(dirname($this->INIFile))) {
- $error_msg = 'Cannot write to "' . $this->INIFile . '" file';
-
- if ($silent) {
- trigger_error($error_msg, E_USER_WARNING);
- }
- else {
- throw new Exception($error_msg);
- }
-
- return ;
- }
-
- $fp = fopen($this->INIFile, 'w');
- fwrite($fp, '<' . '?' . 'php' . "\n\n");
-
- foreach ($this->systemConfig as $section_name => $section_data) {
- foreach ($section_data as $key => $value) {
- fwrite($fp, '$_CONFIG[\'' . $section_name . '\'][\'' . $key . '\'] = \'' . addslashes($value) . '\';' . "\n");
- }
-
- fwrite($fp, "\n");
- }
-
- fclose($fp);
-
- $this->systemConfigChanged = false;
- }
-
- /**
- * Sets value to system config (yet SaveConfig must be called to write it to file)
- *
- * @param string $section
- * @param string $key
- * @param string $value
- */
- function setSystemConfig($section, $key, $value = null)
- {
- $this->systemConfigChanged = true;
-
- if (isset($value)) {
- if (!array_key_exists($section, $this->systemConfig)) {
- // create section, when missing
- $this->systemConfig[$section] = Array ();
- }
-
- // create key in section
- $this->systemConfig[$section][$key] = $value;
- return ;
- }
-
- unset($this->systemConfig[$section][$key]);
- }
-
- /**
- * Returns information from system config
- *
- * @param string $section
- * @param string $key
- * @param mixed $default
- * @return string|bool
- */
- function getSystemConfig($section, $key, $default = false)
- {
- if ( !array_key_exists($section, $this->systemConfig) ) {
- return $default;
- }
-
- if ( !array_key_exists($key, $this->systemConfig[$section]) ) {
- return $default;
- }
-
- return isset($this->systemConfig[$section][$key]) ? $this->systemConfig[$section][$key] : $default;
- }
-
- /**
* Checks if system config is present and is not empty
*
* @return bool
*/
function systemConfigFound()
{
- return file_exists($this->INIFile) && $this->systemConfig;
+ return file_exists($this->systemConfig->getFile());
}
/**
@@ -653,7 +496,7 @@
*/
function sectionFound($section)
{
- return array_key_exists($section, $this->systemConfig);
+ return array_key_exists($section, $this->systemConfig->getData());
}
/**
@@ -912,7 +755,7 @@
*/
function deleteEditTables()
{
- $table_prefix = $this->getSystemConfig('Database', 'TablePrefix');
+ $table_prefix = $this->systemConfig->get('TablePrefix', 'Database');
$tables = $this->Conn->GetCol('SHOW TABLES');
$mask_edit_table = '/' . $table_prefix . 'ses_(.*)_edit_(.*)/';
@@ -1124,7 +967,7 @@
public function getWorkingCacheHandlers($current = null)
{
if ( !isset($current) ) {
- $current = $this->getSystemConfig('Misc', 'CacheHandler');
+ $current = $this->systemConfig->get('CacheHandler', 'Misc');
}
$cache_handler = $this->Application->makeClass('kCache');
@@ -1166,7 +1009,7 @@
public function getWorkingCompressionEngines($current = null)
{
if ( !isset($current) ) {
- $current = $this->getSystemConfig('Misc', 'CompressionEngine');
+ $current = $this->systemConfig->get('CompressionEngine', 'Misc');
}
$output = shell_exec('java -version 2>&1');
\ No newline at end of file
Index: core/install/step_templates/select_license.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/step_templates/select_license.tpl (revision 15956)
+++ core/install/step_templates/select_license.tpl (revision )
@@ -1,5 +1,5 @@
toolkit->getSystemConfig('Intechnic', 'License');
+ $license_found = $this->toolkit->systemConfig->get('License', 'Intechnic');
$license_source = $this->GetVar('license_source');
if ( ($license_source === false) && $license_found ) {
Index: core/kernel/utility/debugger.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/debugger.php (revision 15956)
+++ core/kernel/utility/debugger.php (revision )
@@ -404,7 +404,7 @@
}
if ( class_exists('kUtil') ) {
- $vars = kUtil::getConfigVars();
+ $vars = kUtil::getSystemConfig()->getData();
DebuggerUtil::$trustProxy = isset($vars['TrustProxy']) ? (bool)$vars['TrustProxy'] : false;
}
|