Skip to content

Commit

Permalink
Update as of 4/13/2012
Browse files Browse the repository at this point in the history
* Implemented a tool for migrating factory table names from 1.x to 2.x. The tool replaces table names by list of names associations
* Changed Unit tests suite running from usage AllTests.php in each directory to configuration in phpunit.xml.dist. Now all tests in {{testsuite}} directory are launched, there is no necessity to add new tests to the config
* Implemented in Visual Desig Editor:
  * Containers highlighting
  * Dropping of elements
* Fixed some issues:
  * Fixed sorting of elements in Layout in if element is added before its sibling
  * Fixed broken Customer Registration page on Front-End and Back-End
  * Fixed broken Order Create page on Back-End
  * Replaced usages of deprecated Mage_Customer_Model_Address_Abstract::getFormated() to Mage_Customer_Model_Address_Abstract::format()
  * Fixed elements' duplication on pages (downloadable, bundle product view)
* Fetched updates from Magento 1 up to April 6 2012. Refer to [Magento 1 release notes](http://www.magentocommerce.com/download/release_notes) for details
  • Loading branch information
magento-team committed Apr 13, 2012
1 parent 6194a7a commit 9ddf88f
Show file tree
Hide file tree
Showing 1,337 changed files with 97,035 additions and 57,473 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -30,3 +30,6 @@
/pub/media/downloadable/*
/pub/media/xmlconnect/*
/var/*
dev/api-tests/config.php
dev/api-tests/integration/tmp/*
dev/api-tests/integration/framework/local-mysql.xml
17 changes: 17 additions & 0 deletions .htaccess
Expand Up @@ -122,6 +122,16 @@

#RewriteBase /magento/

############################################
## uncomment next line to enable light API calls processing

# RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

RewriteRule ^api/rest api.php?type=rest [QSA,L]

############################################
## workaround for HTTP authorization
## in CGI environment
Expand All @@ -134,6 +144,13 @@
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]

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

#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

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

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.markdown
@@ -1,3 +1,19 @@
Update as of 4/13/2012
======================

* Implemented a tool for migrating factory table names from 1.x to 2.x. The tool replaces table names by list of names associations
* Changed Unit tests suite running from usage AllTests.php in each directory to configuration in phpunit.xml.dist. Now all tests in {{testsuite}} directory are launched, there is no necessity to add new tests to the config
* Implemented in Visual Desig Editor:
* Containers highlighting
* Dropping of elements
* Fixed some issues:
* Fixed sorting of elements in Layout in if element is added before its sibling
* Fixed broken Customer Registration page on Front-End and Back-End
* Fixed broken Order Create page on Back-End
* Replaced usages of deprecated Mage_Customer_Model_Address_Abstract::getFormated() to Mage_Customer_Model_Address_Abstract::format()
* Fixed elements' duplication on pages (downloadable, bundle product view)
* Fetched updates from Magento 1 up to April 6 2012. Refer to [Magento 1 release notes](http://www.magentocommerce.com/download/release_notes) for details

Update as of 3/26/2012
======================

Expand Down
11 changes: 6 additions & 5 deletions app/Mage.php
Expand Up @@ -343,6 +343,7 @@ public static function getStoreConfigFlag($path, $store = null)
* Get base URL path by type
*
* @param string $type
* @param null|bool $secure
* @return string
*/
public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK, $secure = null)
Expand Down Expand Up @@ -404,18 +405,17 @@ public static function addObserver($eventName, $callback, $data = array(), $obse
* Dispatch event
*
* Calls all observer callbacks registered for this event
* and multiobservers matching event name pattern
* and multiple observers matching event name pattern
*
* @param string $name
* @param array $args
* @param array $data
* @return Mage_Core_Model_App
*/
public static function dispatchEvent($name, array $data = array())
{
Magento_Profiler::start('EVENT:' . $name);
$result = self::app()->dispatchEvent($name, $data);
#$result = self::registry('events')->dispatch($name, $data);
Magento_Profiler::stop('EVENT:' . $name);
Magento_Profiler::stop('DISPATCH EVENT:'.$name);
return $result;
}

Expand All @@ -425,7 +425,7 @@ public static function dispatchEvent($name, array $data = array())
* @link Mage_Core_Model_Config::getModelInstance
* @param string $modelClass
* @param array|object $arguments
* @return Mage_Core_Model_Abstract
* @return Mage_Core_Model_Abstract|false
*/
public static function getModel($modelClass = '', $arguments = array())
{
Expand Down Expand Up @@ -559,6 +559,7 @@ public static function exception($module = 'Mage_Core', $message = '', $code = 0
*
* @param string $message
* @param string $messageStorage
* @throws Mage_Core_Exception
*/
public static function throwException($message, $messageStorage = null)
{
Expand Down
Expand Up @@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
?>
<?php echo $this->getMethod()->getTitle() ?>
<?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>
{{pdf_row_separator}}
<?php echo Mage::helper('Phoenix_Moneybookers_Helper_Data')->__('Moneybookers Transaction ID: %s', $this->escapeHtml($this->getInfo()->getLastTransId())) ?>
{{pdf_row_separator}}
90 changes: 90 additions & 0 deletions app/code/core/Mage/AdminNotification/Model/Inbox.php
Expand Up @@ -116,4 +116,94 @@ public function parse(array $data)
{
return $this->getResource()->parse($this, $data);
}

/**
* Add new message
*
* @param int $severity
* @param string $title
* @param string|array $description
* @param string $url
* @param bool $isInternal
* @return Mage_AdminNotification_Model_Inbox
*/
public function add($severity, $title, $description, $url = '', $isInternal = true)
{
if (!$this->getSeverities($severity)) {
Mage::throwException($this->__('Wrong message type'));
}
if (is_array($description)) {
$description = '<ul><li>' . implode('</li><li>', $description) . '</li></ul>';
}
$date = date('Y-m-d H:i:s');
$this->parse(array(array(
'severity' => $severity,
'date_added' => $date,
'title' => $title,
'description' => $description,
'url' => $url,
'internal' => $isInternal
)));
return $this;
}

/**
* Add critical severity message
*
* @param string $title
* @param string|array $description
* @param string $url
* @param bool $isInternal
* @return Mage_AdminNotification_Model_Inbox
*/
public function addCritical($title, $description, $url = '', $isInternal = true)
{
$this->add(self::SEVERITY_CRITICAL, $title, $description, $url, $isInternal);
return $this;
}

/**
* Add major severity message
*
* @param string $title
* @param string|array $description
* @param string $url
* @param bool $isInternal
* @return Mage_AdminNotification_Model_Inbox
*/
public function addMajor($title, $description, $url = '', $isInternal = true)
{
$this->add(self::SEVERITY_MAJOR, $title, $description, $url, $isInternal);
return $this;
}

/**
* Add minor severity message
*
* @param string $title
* @param string|array $description
* @param string $url
* @param bool $isInternal
* @return Mage_AdminNotification_Model_Inbox
*/
public function addMinor($title, $description, $url = '', $isInternal = true)
{
$this->add(self::SEVERITY_MINOR, $title, $description, $url, $isInternal);
return $this;
}

/**
* Add notice
*
* @param string $title
* @param string|array $description
* @param string $url
* @param bool $isInternal
* @return Mage_AdminNotification_Model_Inbox
*/
public function addNotice($title, $description, $url = '', $isInternal = true)
{
$this->add(self::SEVERITY_NOTICE, $title, $description, $url, $isInternal);
return $this;
}
}
Expand Up @@ -101,7 +101,13 @@ public function parse(Mage_AdminNotification_Model_Inbox $object, array $data)
foreach ($data as $item) {
$select = $adapter->select()
->from($this->getMainTable())
->where('url=?', $item['url']);
->where('title = ?', $item['title']);

if (empty($item['url'])) {
$select->where('url IS NULL');
} else {
$select->where('url = ?', $item['url']);
}

if (isset($item['internal'])) {
$row = false;
Expand Down
6 changes: 0 additions & 6 deletions app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php
Expand Up @@ -51,10 +51,4 @@ protected function _getGridHtml()
{
return $this->getChildHtml('userGrid');
}

protected function _getJsObjectName()
{
return $this->getChildBlock('userGrid')->getJsObjectName();
}

}
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('Mage_Adminhtml_Helper_Data')->__('Use Config Settings').'</label>';
$html .= '<script type="text/javascript">'
. 'toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);'
. '</script>';
$html .= ' <label for="' . $htmlId . '" class="normal">'
. Mage::helper('Mage_Adminhtml_Helper_Data')->__('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('Mage_Adminhtml_Helper_Data')->__('Use All Available Attributes').'</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);</script>';
$html .= ' <label for="' . $htmlId . '" class="normal">'
. Mage::helper('Mage_Adminhtml_Helper_Data')->__('Use All Available Attributes') . '</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
.'\').parentNode);</script>';

return $html;
}
Expand Down

0 comments on commit 9ddf88f

Please sign in to comment.