Skip to content

Commit

Permalink
Import Magento Release 1.9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drobinson committed Oct 13, 2016
1 parent ac1e3a7 commit b52913a
Show file tree
Hide file tree
Showing 949 changed files with 21,721 additions and 15,437 deletions.
15 changes: 15 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,21 @@
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>

############################################
# X-Content-Type-Options: nosniff disable content-type sniffing on some browsers.
Header set X-Content-Type-Options: nosniff

############################################
# This header forces to enables the Cross-site scripting (XSS) filter in browsers (if disabled)
BrowserMatch \bMSIE\s8 ie8
Header set X-XSS-Protection: "1; mode=block" env=!ie8

</IfModule>
</IfModule>

############################################
## redirect for mobile user agents

Expand Down
15 changes: 15 additions & 0 deletions .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>

############################################
# X-Content-Type-Options: nosniff disable content-type sniffing on some browsers.
Header set X-Content-Type-Options: nosniff

############################################
# This header forces to enables the Cross-site scripting (XSS) filter in browsers (if disabled)
BrowserMatch \bMSIE\s8 ie8
Header set X-XSS-Protection: "1; mode=block" env=!ie8

</IfModule>
</IfModule>

############################################
## always send 404 on missing files in these folders

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

==== 1.9.2.4 ====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -53,7 +63,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
] NOTE: Current Release Notes are maintained at: [
] [
] http://www.magentocommerce.com/knowledge-base/entry/ce-19-later-release-notes [
] http://devdocs.magento.com/guides/m1x/ce18-ee113/ce1.9_release-notes.html [
] [
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
7 changes: 5 additions & 2 deletions api.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@
} else {
/* @var $server Mage_Api_Model_Server */
$server = Mage::getSingleton('api/server');
$adapterCode = $server->getAdapterCodeByAlias($apiAlias);

if (!$apiAlias) {
$adapterCode = 'default';
} else {
$adapterCode = $server->getAdapterCodeByAlias($apiAlias);
}
// if no adapters found in aliases - find it by default, by code
if (null === $adapterCode) {
$adapterCode = $apiAlias;
Expand Down
4 changes: 2 additions & 2 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public static function getVersionInfo()
return array(
'major' => '1',
'minor' => '9',
'revision' => '2',
'patch' => '4',
'revision' => '3',
'patch' => '0',
'stability' => '',
'number' => '',
);
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Admin/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ public function isResetPasswordLinkTokenExpired()
return true;
}

$dayDifference = floor(($currentTimestamp - $tokenTimestamp) / (24 * 60 * 60));
if ($dayDifference >= $tokenExpirationPeriod) {
$hoursDifference = floor(($currentTimestamp - $tokenTimestamp) / (60 * 60));
if ($hoursDifference >= $tokenExpirationPeriod) {
return true;
}

Expand All @@ -665,7 +665,7 @@ public function cleanPasswordsValidationData()
/**
* Simple sql format date
*
* @param string $format
* @param string | boolean $dayOnly
* @return string
*/
protected function _getDateNow($dayOnly = false)
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<emails>
<forgot_email_template>admin_emails_forgot_email_template</forgot_email_template>
<forgot_email_identity>general</forgot_email_identity>
<password_reset_link_expiration_period>1</password_reset_link_expiration_period>
<password_reset_link_expiration_period>2</password_reset_link_expiration_period>
</emails>
</admin>
</default>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,15 @@ protected function _prepareColumns()


$this->addColumn('position', array(
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'width' => 60,
'type' => 'number',
'validate_class' => 'validate-number',
'index' => 'position',
'editable' => !$this->isReadonly(),
'edit_only' => !$this->_getProduct()->getId()
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'width' => 60,
'type' => 'number',
'validate_class' => 'validate-number',
'index' => 'position',
'editable' => !$this->isReadonly(),
'edit_only' => !$this->_getProduct()->getId(),
'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')
));

return parent::_prepareColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,13 @@ protected function _prepareLayout()
return parent::_prepareLayout();
}

/**
* Get is percent flag
*
* @return int
*/
public function getIsPercent() {
return $this->getData('is_percent') ? $this->getData('is_percent') : 0;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,15 @@ protected function _prepareColumns()
));

$this->addColumn('position', array(
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'type' => 'number',
'validate_class' => 'validate-number',
'index' => 'position',
'width' => 60,
'editable' => !$this->_getProduct()->getRelatedReadonly(),
'edit_only' => !$this->_getProduct()->getId()
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'type' => 'number',
'validate_class' => 'validate-number',
'index' => 'position',
'width' => 60,
'editable' => !$this->_getProduct()->getRelatedReadonly(),
'edit_only' => !$this->_getProduct()->getId(),
'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')
));

return parent::_prepareColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ protected function _prepareColumns()
'validate_class' => 'validate-number',
'index' => 'qty',
'width' => '1',
'editable' => true
'editable' => true,
'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')
));

$this->addColumn('position', array(
Expand All @@ -167,7 +168,8 @@ protected function _prepareColumns()
'index' => 'position',
'width' => '1',
'editable' => true,
'edit_only' => !$this->_getProduct()->getId()
'edit_only' => !$this->_getProduct()->getId(),
'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')
));

return parent::_prepareColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,15 @@ protected function _prepareColumns()
));

$this->addColumn('position', array(
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'type' => 'number',
'width' => 60,
'validate_class' => 'validate-number',
'index' => 'position',
'editable' => !$this->_getProduct()->getUpsellReadonly(),
'edit_only' => !$this->_getProduct()->getId()
'header' => Mage::helper('catalog')->__('Position'),
'name' => 'position',
'type' => 'number',
'width' => 60,
'validate_class' => 'validate-number',
'index' => 'position',
'editable' => !$this->_getProduct()->getUpsellReadonly(),
'edit_only' => !$this->_getProduct()->getId(),
'filter_condition_callback' => array($this, '_addLinkModelFilterCallback')
));

return parent::_prepareColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
*/
class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content extends Mage_Adminhtml_Block_Widget
{
/**
* Type of uploader block
*
* @var string
*/
protected $_uploaderType = 'uploader/multiple';

public function __construct()
{
Expand All @@ -44,17 +50,17 @@ public function __construct()
protected function _prepareLayout()
{
$this->setChild('uploader',
$this->getLayout()->createBlock('adminhtml/media_uploader')
$this->getLayout()->createBlock($this->_uploaderType)
);

$this->getUploader()->getConfig()
->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload'))
->setFileField('image')
->setFilters(array(
'images' => array(
'label' => Mage::helper('adminhtml')->__('Images (.gif, .jpg, .png)'),
'files' => array('*.gif', '*.jpg','*.jpeg', '*.png')
)
$this->getUploader()->getUploaderConfig()
->setFileParameterName('image')
->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload'));

$browseConfig = $this->getUploader()->getButtonConfig();
$browseConfig
->setAttributes(array(
'accept' => $browseConfig->getMimeTypesByExtensions('gif, png, jpeg, jpg')
));

Mage::dispatchEvent('catalog_product_gallery_prepare_layout', array('block' => $this));
Expand All @@ -65,7 +71,7 @@ protected function _prepareLayout()
/**
* Retrive uploader block
*
* @return Mage_Adminhtml_Block_Media_Uploader
* @return Mage_Uploader_Block_Multiple
*/
public function getUploader()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,24 @@
* @package Mage_Adminhtml
* @author Magento Core Team <[email protected]>
*/
class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader extends Mage_Adminhtml_Block_Media_Uploader
class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader extends Mage_Uploader_Block_Multiple
{
/**
* Uploader block constructor
*/
public function __construct()
{
parent::__construct();
$params = $this->getConfig()->getParams();
$type = $this->_getMediaType();
$allowed = Mage::getSingleton('cms/wysiwyg_images_storage')->getAllowedExtensions($type);
$labels = array();
$files = array();
foreach ($allowed as $ext) {
$labels[] = '.' . $ext;
$files[] = '*.' . $ext;
}
$this->getConfig()
->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload', array('type' => $type)))
->setParams($params)
->setFileField('image')
->setFilters(array(
'images' => array(
'label' => $this->helper('cms')->__('Images (%s)', implode(', ', $labels)),
'files' => $files
)
$this->getUploaderConfig()
->setFileParameterName('image')
->setTarget(
Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload', array('type' => $type))
);
$this->getButtonConfig()
->setAttributes(array(
'accept' => $this->getButtonConfig()->getMimeTypesByExtensions($allowed)
));
}

Expand Down
Loading

0 comments on commit b52913a

Please sign in to comment.