Skip to content

Commit

Permalink
Magento 1.8.0.0, excluding copyright changes from 2012 to 2013
Browse files Browse the repository at this point in the history
  • Loading branch information
kalenjordan committed Sep 25, 2013
1 parent 6ea22c9 commit d0b97ba
Show file tree
Hide file tree
Showing 1,596 changed files with 44,940 additions and 8,798 deletions.
3 changes: 1 addition & 2 deletions .htaccess.sample
Expand Up @@ -31,8 +31,7 @@
############################################
## adjust memory limit

# php_value memory_limit 64M
php_value memory_limit 128M
php_value memory_limit 512M
php_value max_execution_time 18000

############################################
Expand Down
9 changes: 9 additions & 0 deletions RELEASE_NOTES.txt
@@ -1,3 +1,12 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
] NOTE: Current Release Notes are maintained at: [
] [
] http://www.magentocommerce.com/knowledge-base/entry/ce-18-later-release-notes [
] [
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

==== 1.7.0.2 ====

=== Fixes ===
Expand Down
6 changes: 3 additions & 3 deletions app/Mage.php
Expand Up @@ -168,9 +168,9 @@ public static function getVersionInfo()
{
return array(
'major' => '1',
'minor' => '7',
'minor' => '8',
'revision' => '0',
'patch' => '2',
'patch' => '0',
'stability' => '',
'number' => '',
);
Expand Down Expand Up @@ -695,7 +695,7 @@ public static function run($code = '', $type = 'store', $options = array())
}
try {
self::dispatchEvent('mage_run_exception', array('exception' => $e));
if (!headers_sent()) {
if (!headers_sent() && self::isInstalled()) {
header('Location:' . self::getUrl('install'));
} else {
self::printException($e);
Expand Down
731 changes: 731 additions & 0 deletions app/code/community/Cm/RedisSession/Model/Session.php

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions app/code/community/Cm/RedisSession/etc/config.xml
@@ -0,0 +1,16 @@
<config>
<modules>
<Cm_RedisSession>
<version>0.2</version>
</Cm_RedisSession>
</modules>
<global>
<models>
<core_mysql4>
<rewrite>
<session>Cm_RedisSession_Model_Session</session>
</rewrite>
</core_mysql4>
</models>
</global>
</config>
11 changes: 5 additions & 6 deletions app/code/core/Mage/Admin/Model/Resource/User.php
Expand Up @@ -24,7 +24,6 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


/**
* ACL user resource
*
Expand Down Expand Up @@ -151,7 +150,7 @@ public function hasAssigned2Role($user)
*/
private function _encryptPassword($pwStr)
{
return Mage::helper('core')->getHash($pwStr, 2);
return Mage::helper('core')->getHash($pwStr, Mage_Admin_Model_User::HASH_SALT_LENGTH);
}

/**
Expand Down Expand Up @@ -219,7 +218,7 @@ public function delete(Mage_Core_Model_Abstract $user)
} catch (Mage_Core_Exception $e) {
throw $e;
return false;
} catch (Exception $e){
} catch (Exception $e) {
$adapter->rollBack();
return false;
}
Expand All @@ -238,7 +237,7 @@ public function _saveRelations(Mage_Core_Model_Abstract $user)
{
$rolesIds = $user->getRoleIds();

if( !is_array($rolesIds) || count($rolesIds) == 0 ) {
if (!is_array($rolesIds) || count($rolesIds) == 0) {
return $user;
}

Expand Down Expand Up @@ -275,7 +274,7 @@ public function _saveRelations(Mage_Core_Model_Abstract $user)
$adapter->commit();
} catch (Mage_Core_Exception $e) {
throw $e;
} catch (Exception $e){
} catch (Exception $e) {
$adapter->rollBack();
throw $e;
}
Expand Down Expand Up @@ -331,7 +330,7 @@ public function add(Mage_Core_Model_Abstract $user)

$aRoles = $this->hasAssigned2Role($user);
if ( sizeof($aRoles) > 0 ) {
foreach($aRoles as $idx => $data){
foreach ($aRoles as $idx => $data) {
$conditions = array(
'role_id = ?' => $data['role_id'],
);
Expand Down
26 changes: 21 additions & 5 deletions app/code/core/Mage/Admin/Model/User.php
Expand Up @@ -60,18 +60,24 @@
*/
class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
{
/**
/**#@+
* Configuration paths for email templates and identities
*/
const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'admin/emails/forgot_email_template';
const XML_PATH_FORGOT_EMAIL_IDENTITY = 'admin/emails/forgot_email_identity';
const XML_PATH_STARTUP_PAGE = 'admin/startup/page';
/**#@-*/

/**
* Minimum length of admin password
*/
const MIN_PASSWORD_LENGTH = 7;

/**
* Length of salt
*/
const HASH_SALT_LENGTH = 32;

/**
* Model event prefix
*
Expand Down Expand Up @@ -116,11 +122,11 @@ protected function _beforeSave()
'extra' => serialize($this->getExtra())
);

if($this->getId() > 0) {
if ($this->getId() > 0) {
$data['user_id'] = $this->getId();
}

if( $this->getUsername() ) {
if ($this->getUsername()) {
$data['username'] = $this->getUsername();
}

Expand Down Expand Up @@ -422,7 +428,18 @@ public function hasAssigned2Role($user)
*/
protected function _getEncodedPassword($password)
{
return Mage::helper('core')->getHash($password, 2);
return $this->_getHelper('core')->getHash($password, self::HASH_SALT_LENGTH);
}

/**
* Returns helper instance
*
* @param string $helperName
* @return Mage_Core_Helper_Abstract
*/
protected function _getHelper($helperName)
{
return Mage::helper($helperName);
}

/**
Expand Down Expand Up @@ -596,5 +613,4 @@ public function isResetPasswordLinkTokenExpired()

return false;
}

}
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/etc/config.xml
Expand Up @@ -28,7 +28,7 @@
<config>
<modules>
<Mage_Admin>
<version>1.6.1.0</version>
<version>1.6.1.1</version>
</Mage_Admin>
</modules>
<global>
Expand Down
@@ -0,0 +1,38 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Admin
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/** @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();

//Increase password field length
$installer->getConnection()->changeColumn($installer->getTable('admin/user'), 'password', 'password', array(
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
'length' => 100,
'comment' => 'User Password'
));

$installer->endSetup();
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php
Expand Up @@ -48,7 +48,7 @@ public function __construct()
public function getHeaderText()
{
if (Mage::registry('api_user')->getId()) {
return Mage::helper('adminhtml')->__("Edit User '%s'", $this->htmlEscape(Mage::registry('api_user')->getUsername()));
return Mage::helper('adminhtml')->__("Edit User '%s'", $this->escapeHtml(Mage::registry('api_user')->getUsername()));
}
else {
return Mage::helper('adminhtml')->__('New User');
Expand Down
Expand Up @@ -58,7 +58,7 @@ public function setCategoryIds($ids)
protected function _getNodeJson($node, $level = 1)
{
$item = array();
$item['text']= $this->htmlEscape($node->getName());
$item['text']= $this->escapeHtml($node->getName());

if ($this->_withProductCount) {
$item['text'].= ' ('.$node->getProductCount().')';
Expand Down
Expand Up @@ -34,33 +34,49 @@
*/
class Mage_Adminhtml_Block_Catalog_Category_Helper_Pricestep extends Varien_Data_Form_Element_Text
{
/**
* Returns js code that is used instead of default toggle code for "Use default config" checkbox
*
* @return string
*/
public function getToggleCode()
{
$htmlId = 'use_config_' . $this->getHtmlId();
return "toggleValueElements(this, this.parentNode.parentNode);"
. "if (!this.checked) toggleValueElements($('$htmlId'), $('$htmlId').parentNode);";
}

/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
$elementDisabled = $this->getDisabled() == 'disabled';
$disabled = false;
if (!$this->getValue()) {

if (!$this->getValue() || $elementDisabled) {
$this->setData('disabled', 'disabled');
$disabled = true;
}

parent::addClass('validate-number validate-number-range number-range-0.01-1000000000');
$html = parent::getElementHtml();
$htmlId = 'use_config_' . $this->getHtmlId();
$html .= '<br/><input id="'.$htmlId.'" name="use_config[]" value="' . $this->getId() . '"';
$html .= ($disabled ? ' checked="checked"' : '');
if ($this->getReadonly()) {

if ($this->getReadonly() || $elementDisabled) {
$html .= ' disabled="disabled"';
}

$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';

$html .= ' <label for="'.$htmlId.'" class="normal">'
. Mage::helper('adminhtml')->__('Use Config Settings').'</label>';
$html .= '<script type="text/javascript">'
. 'toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);'
. '</script>';
$html .= ' <label for="' . $htmlId . '" class="normal">'
. Mage::helper('adminhtml')->__('Use Config Settings') .'</label>';
$html .= '<script type="text/javascript">' . 'toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
. '\').parentNode);' . '</script>';

return $html;
}
Expand Down
Expand Up @@ -35,32 +35,47 @@
class Mage_Adminhtml_Block_Catalog_Category_Helper_Sortby_Available
extends Varien_Data_Form_Element_Multiselect
{
/**
/**
* Returns js code that is used instead of default toggle code for "Use default config" checkbox
*
* @return string
*/
public function getToggleCode()
{
$htmlId = 'use_config_' . $this->getHtmlId();
return "toggleValueElements(this, this.parentNode.parentNode);"
. "if (!this.checked) toggleValueElements($('$htmlId'), $('$htmlId').parentNode);";
}

/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
$elementDisabled = $this->getDisabled() == 'disabled';
$disabled = false;
if (!$this->getValue()) {

if (!$this->getValue() || $elementDisabled) {
$this->setData('disabled', 'disabled');
$disabled = true;
}

$html = parent::getElementHtml();
$htmlId = 'use_config_' . $this->getHtmlId();
$html .= '<input id="'.$htmlId.'" name="use_config[]" value="' . $this->getId() . '"';
$html .= '<input id="' . $htmlId . '" name="use_config[]" value="' . $this->getId() . '"';
$html .= ($disabled ? ' checked="checked"' : '');

if ($this->getReadonly()) {
if ($this->getReadonly() || $elementDisabled) {
$html .= ' disabled="disabled"';
}

$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';

$html .= ' <label for="'.$htmlId.'" class="normal">'
. Mage::helper('adminhtml')->__('Use All Available Attributes').'</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);</script>';
$html .= ' <label for="' . $htmlId . '" class="normal">'
. Mage::helper('adminhtml')->__('Use All Available Attributes') . '</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
.'\').parentNode);</script>';

return $html;
}
Expand Down

0 comments on commit d0b97ba

Please sign in to comment.