Skip to content

Commit

Permalink
Import Magento Release 1.5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSaferite committed Feb 9, 2011
1 parent d7bb289 commit 2352cfb
Show file tree
Hide file tree
Showing 12 changed files with 641 additions and 32 deletions.
593 changes: 593 additions & 0 deletions RELEASE_NOTES.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public static function getVersionInfo()
'minor' => '5',
'revision' => '0',
'patch' => '0',
'stability' => 'rc',
'number' => '2',
'stability' => '',
'number' => '',
);
}

Expand Down
12 changes: 6 additions & 6 deletions app/code/core/Mage/Catalog/Block/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public function getCacheKeyInfo()
Mage::getSingleton('customer/session')->getCustomerGroupId(),
'template' => $this->getTemplate(),
'name' => $this->getNameInLayout(),
$this->getCurrenCategoryPath()
$this->getCurrenCategoryKey()
);
$cacheId = $shortCacheId;

$shortCacheId = array_values($shortCacheId);
$shortCacheId = implode('|', $shortCacheId);
$shortCacheId = md5($shortCacheId);

$cacheId['category_path'] = $this->getCurrenCategoryPath();
$cacheId['category_path'] = $this->getCurrenCategoryKey();
$cacheId['short_cache_id'] = $shortCacheId;

return $cacheId;
Expand All @@ -92,14 +92,14 @@ public function getCacheKeyInfo()
*
* @return mixed
*/
public function getCurrenCategoryPath()
public function getCurrenCategoryKey()
{
if (!$this->_currentCategoryKey) {
if ($category = Mage::registry('current_category')) {
$category = Mage::registry('current_category');
if ($category) {
$this->_currentCategoryKey = $category->getPath();
} else {
$storeId = Mage::app()->getStore()->getId();
$this->_currentCategoryKey = Mage::app()->getStore($storeId)->getRootCategoryId();
$this->_currentCategoryKey = Mage::app()->getStore()->getRootCategoryId();
}
}

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Paygate/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment><![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]></comment>
<fields>
<active translate="label">
<label>Enabled</label>
Expand Down
3 changes: 3 additions & 0 deletions app/code/core/Mage/Sales/Model/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,9 @@ public function addProductAdvanced(Mage_Catalog_Model_Product $product, $request
$errors = array();
$items = array();
foreach ($cartCandidates as $candidate) {
// Child items can be sticked together only within their parent
$stickWithinParent = $candidate->getParentProductId() ? $parentItem : null;
$candidate->setStickWithinParent($stickWithinParent);
$item = $this->_addCatalogProduct($candidate, $candidate->getCartQty());
$items[] = $item;

Expand Down
12 changes: 12 additions & 0 deletions app/code/core/Mage/Sales/Model/Quote/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,18 @@ public function representProduct($product)
return false;
}

/**
* Check maybe product is planned to be a child of some quote item - in this case we limit search
* only within same parent item
*/
$stickWithinParent = $product->getStickWithinParent();
if ($stickWithinParent) {
if ($this->getParentItem() !== $stickWithinParent) {
return false;
}
}

// Check options
$itemOptions = $this->getOptionsByCode();
$productOptions = $product->getCustomOptions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo $this->getSkinUrl($this->__('images/logo.gif')) ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a>
<div class="header-right">
<p class="super">
<?php echo $this->__("Logged in as %s", $this->getUser()->getUsername()) ?><span class="separator">|</span><?php echo $this->formatDate(null, 'full') ?><span class="separator">|</span><a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?></a>
<?php echo $this->__("Logged in as %s", $this->getUser()->getUsername()) ?><span class="separator">|</span><?php echo $this->formatDate(null, 'full') ?><span class="separator">|</span><a href="http://golinks.magento.com/CE15" onclick="this.target='_blank'" class="go-try"><?php echo $this->__('Try Magento Go for Free') ?></a><span class="separator">|</span><a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?></a>
</p>
<?php if ( Mage::getSingleton('admin/session')->isAllowed('admin/global_search') ): ?>
<fieldset>
Expand Down
1 change: 1 addition & 0 deletions app/locale/en_US/Mage_Adminhtml.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@
"Transaction Type","Transaction Type"
"Transactional Emails","Transactional Emails"
"Transactions","Transactions"
"Try Magento Go for Free","Try Magento Go for Free"
"Type","Type"
"Type:","Type:"
"URL Rewrite","URL Rewrite"
Expand Down
1 change: 1 addition & 0 deletions app/locale/en_US/Mage_Api.csv
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"Transaction Details","Transaction Details"
"Transaction ID","Transaction ID"
"Transaction Type","Transaction Type"
"Try Magento Go for Free","Try Magento Go for Free"
"Type","Type"
"Type:","Type:"
"Unable to login.","Unable to login."
Expand Down
32 changes: 16 additions & 16 deletions downloader/Maged/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,19 @@ public function logoutAction()
*/
public function indexAction()
{
$config = $this->config();
if (!$this->isInstalled()) {
if (false&&!$this->isWritable()) {
echo $this->view()->template('install/writable.phtml');
} else {
$config=$this->config();
$this->view()->set('mage_url', dirname(dirname($_SERVER['SCRIPT_NAME'])));
$this->view()->set('use_custom_permissions_mode', $config->__get('use_custom_permissions_mode')?$config->__get('use_custom_permissions_mode'):'0');
$this->view()->set('mkdir_mode', decoct($config->__get('global_dir_mode')));
$this->view()->set('chmod_file_mode', decoct($config->__get('global_file_mode')));
$this->view()->set('protocol', $config->__get('protocol'));
$this->channelConfig()->setInstallView($config,$this->view());

echo $this->view()->template('install/download.phtml');
}
$this->view()->set('mage_url', dirname(dirname($_SERVER['SCRIPT_NAME'])));
$this->view()->set('use_custom_permissions_mode', $config->__get('use_custom_permissions_mode')?$config->__get('use_custom_permissions_mode'):'0');
$this->view()->set('mkdir_mode', decoct($config->__get('global_dir_mode')));
$this->view()->set('chmod_file_mode', decoct($config->__get('global_file_mode')));
$this->view()->set('protocol', $config->__get('protocol'));
$this->channelConfig()->setInstallView($config,$this->view());

echo $this->view()->template('install/download.phtml');
} elseif (!$config->sync_pear) {
$this->model('connect', true)->connect()->run('sync');
$this->forward('connectPackages');
} else {
$this->forward('connectPackages');
}
Expand Down Expand Up @@ -658,7 +657,8 @@ public function setAction($action=null)
$action = !empty($_GET[self::ACTION_KEY]) ? $_GET[self::ACTION_KEY] : 'index';
}
if (empty($action) || !is_string($action) || !method_exists($this, $this->getActionMethod($action))) {
$action = 'noroute';
//$action = 'noroute';
$action = 'index';
}
$this->_action = $action;
return $this;
Expand Down Expand Up @@ -936,8 +936,8 @@ public static function getVersionInfo()
'minor' => '5',
'revision' => '0',
'patch' => '0',
'stability' => 'rc',
'number' => '2',
'stability' => '',
'number' => '',
);
}

Expand Down
10 changes: 4 additions & 6 deletions downloader/lib/Mage/Connect/Command/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,16 @@ public function doSyncPear($command, $options, $params)

}

$config->sync_pear = false;
$config->sync_pear = true;
if($ftp) {
$packager->writeToRemoteCache($cache, $ftpObj);
@unlink($config->getFilename());
}


return true;

} catch (Exception $e) {
$this->doError($command, $e->getMessage());
}

return true;
}

/**
Expand All @@ -360,7 +358,7 @@ public function doSyncPear($command, $options, $params)
*/
protected function _checkPearData($config) {
$pearStorage = $config->magento_root . DS . $config->downloader_path . DS . self::PACKAGE_PEAR_DIR;
return $config->sync_pear && file_exists($pearStorage) && is_dir($pearStorage);
return (!$config->sync_pear) && file_exists($pearStorage) && is_dir($pearStorage);
}

}
2 changes: 1 addition & 1 deletion downloader/lib/Mage/Connect/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function initProperties()
),
'sync_pear' => array(
'type' => 'boolean',
'value' => true,
'value' => false,
'prompt' => '',
'doc' => "",
'possible' => '',
Expand Down

0 comments on commit 2352cfb

Please sign in to comment.