diff -rupbB magento/app/code/core/Mage/Core/Model/Config/Options.php magento-1.3.2.4/app/code/core/Mage/Core/Model/Config/Options.php
--- magento/app/code/core/Mage/Core/Model/Config/Options.php 2009-09-23 14:52:55.000000000 -0400
+++ magento-1.3.2.4/app/code/core/Mage/Core/Model/Config/Options.php 2010-01-18 19:55:02.000000000 -0500
@@ -68,7 +68,7 @@ class Mage_Core_Model_Config_Options ext
public function getDir($type)
{
- $this->_construct();
+ #$this->_construct();
$method = 'get'.ucwords($type).'Dir';
$dir = $this->$method();
if (!$dir) {
diff -rupbB magento/app/code/core/Mage/Core/Model/Config.php magento-1.3.2.4/app/code/core/Mage/Core/Model/Config.php
--- magento/app/code/core/Mage/Core/Model/Config.php 2009-09-23 14:52:57.000000000 -0400
+++ magento-1.3.2.4/app/code/core/Mage/Core/Model/Config.php 2009-11-15 22:54:56.000000000 -0500
@@ -213,7 +213,7 @@ class Mage_Core_Model_Config extends Mag
$localConfigLoaded = $this->loadFile($etcDir.DS.'local.xml');
- if (Mage::isInstalled()) {
+ if (Mage::isInstalled($options)) {
if ($this->_canUseCacheForInit()) {
Varien_Profiler::start('mage::app::init::config::load_cache');
$loaded = $this->loadCache();
@@ -286,6 +286,9 @@ class Mage_Core_Model_Config extends Mag
{
$this->_allowCacheForInit = false;
$this->_useCache = false;
+ if (!$options) {
+ $options = Mage::registry('user_options');
+ }
return $this->init($options);
}
diff -rupbB magento/app/code/core/Mage/Install/etc/install.xml magento-1.3.2.4/app/code/core/Mage/Install/etc/install.xml
--- magento/app/code/core/Mage/Install/etc/install.xml 2009-09-23 14:51:54.000000000 -0400
+++ magento-1.3.2.4/app/code/core/Mage/Install/etc/install.xml 2009-11-15 22:31:06.000000000 -0500
@@ -62,16 +62,19 @@
/app/etc
1
0
+ etc
/var
1
1
+ var
/media
1
1
+ media
diff -rupbB magento/app/code/core/Mage/Install/Model/Installer/Filesystem.php magento-1.3.2.4/app/code/core/Mage/Install/Model/Installer/Filesystem.php
--- magento/app/code/core/Mage/Install/Model/Installer/Filesystem.php 2009-09-23 14:51:54.000000000 -0400
+++ magento-1.3.2.4/app/code/core/Mage/Install/Model/Installer/Filesystem.php 2009-11-15 22:51:44.000000000 -0500
@@ -66,7 +66,8 @@ class Mage_Install_Model_Installer_Files
foreach ($config['writeable'] as $item) {
$recursive = isset($item['recursive']) ? $item['recursive'] : false;
$existence = isset($item['existence']) ? $item['existence'] : false;
- $checkRes = $this->_checkPath($item['path'], $recursive, $existence, 'write');
+ $path = isset($item['option_dir']) ? Mage::getConfig()->getOptions()->getDir($item['option_dir']) : $item['path'];
+ $checkRes = $this->_checkPath($path, $recursive, $existence, 'write');
$res = $res && $checkRes;
}
}
@@ -85,7 +86,11 @@ class Mage_Install_Model_Installer_Files
protected function _checkPath($path, $recursive, $existence, $mode)
{
$res = true;
+ if ($path[0]=='/' || $path[0]=='\\' || $path[1]==':') {
+ $fullPath = $path;
+ } else {
$fullPath = dirname(Mage::getRoot()).$path;
+ }
if ($mode == self::MODE_WRITE) {
$setError = false;
if ($existence) {
diff -rupbB magento/app/Mage.php magento-1.3.2.4/app/Mage.php
--- magento/app/Mage.php 2009-09-23 14:53:39.000000000 -0400
+++ magento-1.3.2.4/app/Mage.php 2010-01-18 19:55:28.000000000 -0500
@@ -452,6 +452,8 @@ final class Mage {
Varien_Profiler::start('mage');
Varien_Profiler::start('mage::app');
+
+ self::register('user_options', is_string($options) ? array('etc_dir'=>$options) : (array)$options);
self::app($code, $type, $options);
Varien_Profiler::stop('mage::app');
@@ -518,10 +518,13 @@ final class Mage {
if (!empty($options['etc_dir'])) {
$etcDir = $options['etc_dir'];
}
+ if ($etcDir[0]=='/' || $etcDir[0]=='\\' || $etcDir[1]==':') {
+ $localConfigFile = $etcDir . DS . 'local.xml';
+ } else {
$localConfigFile = self::getRoot() . DS . $etcDir . DS . 'local.xml';
+ }
$isInstalled = false;
-
if (is_readable($localConfigFile)) {
$localConfig = simplexml_load_file($localConfigFile);
date_default_timezone_set('UTC');