Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

10 changes: 10 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
==== 1.9.3.1 ====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
] NOTE: Current Release Notes are maintained at: [
] [
] http://merch.docs.magento.com/ce/user_guide/magento/release-notes-ce-1.9.3.1.html [
] [
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

==== 1.9.3.0 ====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static function getVersionInfo()
'major' => '1',
'minor' => '9',
'revision' => '3',
'patch' => '0',
'patch' => '1',
'stability' => '',
'number' => '',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,13 @@ protected function _filterPostData($data)
}

if (!empty($data['option']) && !empty($data['option']['value']) && is_array($data['option']['value'])) {
$allowableTags = isset($data['is_html_allowed_on_front']) && $data['is_html_allowed_on_front']
? sprintf('<%s>', implode('><', $this->_getAllowedTags())) : null;
foreach ($data['option']['value'] as $key => $values) {
$isHtmlAllowedOnFrontend = isset($data['is_html_allowed_on_front'])
&& $data['is_html_allowed_on_front'];
$data['option']['value'][$key] = array_map(
array($helperCatalog, 'stripTags'),
$values,
array_fill(
0,
count($values),
$isHtmlAllowedOnFrontend ? sprintf('<%s>', implode('><', $this->_getAllowedTags())): null
)
);
foreach ($values as $storeId => $storeLabel) {
$data['option']['value'][$key][$storeId]
= $helperCatalog->stripTags($storeLabel, $allowableTags);
}
}
}
}
Expand Down
15 changes: 10 additions & 5 deletions app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,16 +553,21 @@ public function globalFaults($sessionId)
* See allowed characters in XML:
* @link http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
*
* @param array $result
* @param mixed $result
* @return mixed
*/
public function processingMethodResult(array $result)
public function processingMethodResult($result)
{
foreach ($result as &$row) {
if (!is_null($row) && !is_bool($row) && !is_numeric($row)) {
$row = $this->processingRow($row);
if (is_null($result) || is_bool($result) || is_numeric($result) || is_object($result)) {
return $result;
} elseif (is_array($result)) {
foreach ($result as $key => $value) {
$result[$key] = $this->processingMethodResult($value);
}
} else {
$result = $this->processingRow($result);
}

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function prepareJsonGeneralConfig()
'includeTax' => Mage::helper('tax')->priceIncludesTax() ? 'true' : 'false',
'showIncludeTax' => Mage::helper('tax')->displayPriceIncludingTax(),
'showBothPrices' => Mage::helper('tax')->displayBothPrices(),
'idSuffix' => '',
'idSuffix' => '_clone',
'oldPlusDisposition' => 0,
'plusDisposition' => 0,
'plusDispositionTax' => 0,
Expand Down
3 changes: 2 additions & 1 deletion app/code/core/Mage/CatalogRule/Model/Resource/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ public function getRulesFromProduct($date, $websiteId, $customerGroupId, $produc
->where('customer_group_id = ?', $customerGroupId)
->where('product_id = ?', $productId)
->where('from_time = 0 or from_time < ?', $date)
->where('to_time = 0 or to_time > ?', $date);
->where('to_time = 0 or to_time > ?', $date)
->order('sort_order');

return $adapter->fetchAll($select);
}
Expand Down
56 changes: 28 additions & 28 deletions app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,39 +350,39 @@ public function prepareResult($object, $queryText, $query)
if ($like) {
$likeCond = '(' . join(' OR ', $like) . ')';
}
}

$mainTableAlias = 's';
$fields = array('product_id');

$select = $adapter->select()
->from(array($mainTableAlias => $this->getMainTable()), $fields)
->joinInner(array('e' => $this->getTable('catalog/product')),
'e.entity_id = s.product_id',
array())
->where($mainTableAlias . '.store_id = ?', (int)$query->getStoreId());

$where = "";
if ($searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_FULLTEXT
|| $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE
) {
$bind[':query'] = implode(' ', $preparedTerms[0]);
$where = Mage::getResourceHelper('catalogsearch')
->chooseFulltext($this->getMainTable(), $mainTableAlias, $select);
}
if ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE) {
$where .= ($where ? ' OR ' : '') . $likeCond;
} elseif ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE) {
$select->columns(array('relevance' => new Zend_Db_Expr(0)));
$where = $likeCond;
}
$mainTableAlias = 's';
$fields = array('product_id');

if ($where != '') {
$select->where($where);
}
$select = $adapter->select()
->from(array($mainTableAlias => $this->getMainTable()), $fields)
->joinInner(array('e' => $this->getTable('catalog/product')),
'e.entity_id = s.product_id',
array())
->where($mainTableAlias . '.store_id = ?', (int)$query->getStoreId());

$where = "";
if ($searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_FULLTEXT
|| $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE
) {
$bind[':query'] = implode(' ', $preparedTerms[0]);
$where = Mage::getResourceHelper('catalogsearch')
->chooseFulltext($this->getMainTable(), $mainTableAlias, $select);
}
if ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE) {
$where .= ($where ? ' OR ' : '') . $likeCond;
} elseif ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE) {
$select->columns(array('relevance' => new Zend_Db_Expr(0)));
$where = $likeCond;
}

$this->_foundData = $adapter->fetchPairs($select, $bind);
if ($where != '') {
$select->where($where);
}

$this->_foundData = $adapter->fetchPairs($select, $bind);

return $this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function _applySearchFilters()
if (!empty($foundIds)) {
$this->addIdFilter($foundIds);
} else {
$this->getSelect()->orWhere('FALSE');
$this->getSelect()->where('FALSE');
}
$this->_isSearchFiltersApplied = true;

Expand Down
16 changes: 8 additions & 8 deletions app/code/core/Mage/Cms/Block/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ protected function _prepareLayout()
'title' => $page->getTitle()
)
);
$breadcrumbsObject = new Varien_Object();
$breadcrumbsObject->setCrumbs($breadcrumbsArray);

Mage::dispatchEvent('cms_generate_breadcrumbs', array('breadcrumbs' => $breadcrumbsObject));

foreach ($breadcrumbsObject->getCrumbs() as $breadcrumbsItem) {
$breadcrumbs->addCrumb($breadcrumbsItem['crumbName'], $breadcrumbsItem['crumbInfo']);
}
}

$root = $this->getLayout()->getBlock('root');
Expand All @@ -99,14 +107,6 @@ protected function _prepareLayout()
$head->setDescription($page->getMetaDescription());
}

$breadcrumbsObject = new Varien_Object();
$breadcrumbsObject->setCrumbs($breadcrumbsArray);

Mage::dispatchEvent('cms_generate_breadcrumbs', array('breadcrumbs' => $breadcrumbsObject));

foreach ($breadcrumbsObject->getCrumbs() as $breadcrumbsItem) {
$breadcrumbs->addCrumb($breadcrumbsItem['crumbName'], $breadcrumbsItem['crumbInfo']);
}
return parent::_prepareLayout();
}

Expand Down
3 changes: 2 additions & 1 deletion app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function useValidateHttpUserAgent()
*/
public function useValidateSessionExpire()
{
return true;
return $this->getCookie()->getLifetime() > 0;
}

/**
Expand Down Expand Up @@ -458,6 +458,7 @@ protected function _validate()
}

if ($this->useValidateSessionExpire()
&& isset($sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP])
&& $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] < time() ) {
return false;
} else {
Expand Down
7 changes: 5 additions & 2 deletions app/code/core/Mage/Customer/Model/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public function isAddressPrimary(Mage_Customer_Model_Address $address)
* @throws Mage_Core_Exception
* @return Mage_Customer_Model_Customer
*/
public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0', $password = '')
public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0', $password = null)
{
$types = array(
'registered' => self::XML_PATH_REGISTER_EMAIL_TEMPLATE, // welcome email, when confirmation is disabled
Expand All @@ -611,7 +611,10 @@ public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeI
$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}

$this->setPassword($password);
if (!is_null($password)) {
$this->setPassword($password);
}

$this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
array('customer' => $this, 'back_url' => $backUrl), $storeId);
$this->cleanPasswordsValidationData();
Expand Down
2 changes: 2 additions & 0 deletions app/code/core/Mage/Customer/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public function setCustomerAsLoggedIn($customer)
{
$this->setCustomer($customer);
$this->renewSession();
Mage::getSingleton('core/session')->renewFormKey();
Mage::dispatchEvent('customer_login', array('customer'=>$customer));
return $this;
}
Expand Down Expand Up @@ -307,6 +308,7 @@ protected function _logout()
$this->setId(null);
$this->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
$this->getCookie()->delete($this->getSessionName());
Mage::getSingleton('core/session')->renewFormKey();
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Customer/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ T: {{var telephone}}
<cron_expr>0 0 1 * *</cron_expr>
</schedule>
<run>
<model>mage_customer/observer::deleteCustomerFlowPassword</model>
<model>customer/observer::deleteCustomerFlowPassword</model>
</run>
</customer_flowpassword>
</jobs>
Expand Down
10 changes: 5 additions & 5 deletions app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1436,11 +1436,11 @@ protected function _saveProducts()
}
if (!empty($rowData['_media_image'])) {
$mediaGallery[$rowSku][] = array(
'attribute_id' => $rowData['_media_attribute_id'],
'label' => $rowData['_media_lable'],
'position' => $rowData['_media_position'],
'disabled' => $rowData['_media_is_disabled'],
'value' => $rowData['_media_image']
'attribute_id' => isset($rowData['_media_attribute_id']) ? $rowData['_media_attribute_id'] : '',
'label' => isset($rowData['_media_lable']) ? $rowData['_media_lable'] : '',
'position' => isset($rowData['_media_position']) ? $rowData['_media_position'] : '',
'disabled' => isset($rowData['_media_is_disabled']) ? $rowData['_media_is_disabled'] : '',
'value' => $rowData['_media_image']
);
}
// 6. Attributes phase
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Sales/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,6 @@
</grand_total>
<msrp>
<class>sales/quote_address_total_msrp</class>
<before>weee,freeshipping</before>
</msrp>
</totals>
<nominal_totals>
Expand Down
Loading