Skip to content

Commit 71f6961

Browse files
committed
2.0.0.0-dev33
* Improved Themes functionality to meet the following requirements: * Magento instance doesn’t crash in case there’re no themes at all * Features like selection of themes in system configuration, custom theme selection in Custom Design, CMS pages, Products and Categories can work without themes. They use base view files only. * Virtual themes work in the same way as the non-virtual (which are present in file system) though they additionally have inheritance property. Changes were made in theme switcher, in fallback mechanism, in widgets etc. * Non-virtual themes are being added to DB during installation * Application framework uses theme id as identifier instead of theme code * Refactored a variety of report grids in backend (admin) to make them configurable through layout, rather than hard-coded. * Removed obsolete modules: * `Mage_XmlConnect` * `Mage_Dataflow` * Significantly changed Logging subsystem: * `Mage_Core_Model_Logger` class is responsible for logging * Changes are made to comply with DI paradigm * Custom logger in `Mage_Backend_Menu` subsystem is removed due to usage of regular one * Changes made in autoload process * Fixed autoload to prevent `class_exists()` from causing fatal error * The `Magento_Autoload` library was divided into 2 classes: `Magento_Autoload_IncludePath` is responsible for loading from include path, `Magento_Autoload_ClassMap` from a class map. Stacked "class map" loader on top of "include path" loader in application bootstrap. * Implemented new jQuery form widget. Its responsibility is to prepare form for submission (change form attributes if needed) * Replaced usage of different instances of `varienForm` with a new form widget (`productForm`, `categoryForm`, instances of type "onclick declaration", "as child component", "instantiation only") * Replaced prototype validation with jQuery analog * Additionally implemented form widget in different modules (CMS, Customer, Backend, Sitemap, DesignEditor, Tags, SystemEmail, Newsletters, ImportExport, Connect, Authorize.net) * Minor improvements * Fixed css styles for validation messages in different parts of the system * Removed usage of `jquery-ui-1.8.21.custom.css` * Updated versions of jQuery and jQuery-UI on backend * Updated Magento trademark and copyright labels at the bottom of pages: changed legal entity name to X.Commerce, Inc, made translation engine pick them up * Improvements made in indexers to stabilize tests. Fixed wrong initialization order of indexers that sometimes caused failure of reindexing all at once * Bugfixes: * Set correct order's data change state during voiding the order * Set translator to pick up status labels in drop-down in "Shopping cart price rule" admin grid * Fixed an issue in console installer that initialized application in such a way, that it could not load certain event area. * Fixed incorrect loader image source in backend during new tax rule creation * Fixed JS error in IE with creating products via floating toolbar * Fixed image save url during uploading product's images * Added permission check for editing shipping and billing addresses during viewing the order * Changed saving of order comments from backend. Comment is saved even without status change * Added additional validation into `quickCreateAction` of `Mage_Adminhtml_Catalog_ProductController` to prevent saving new product with any id using firebug * Fixed JS errors in Authorize.net Direct Post submodule * Fixed JS errors in split button on creating product * Fixed errors in poll's list template in backend
1 parent 3916eac commit 71f6961

File tree

7,626 files changed

+17803
-73726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,626 files changed

+17803
-73726
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ atlassian*
88
/index.php
99
/nbproject
1010
/sitemap
11-
/staging
1211
/.htaccess.orig
1312
/.idea
1413
/app/config_sandbox
@@ -29,7 +28,6 @@ atlassian*
2928
/pub/media/*
3029
/pub/media/customer/*
3130
/pub/media/downloadable/*
32-
/pub/media/xmlconnect/*
3331
/var/*
3432
dev/api-tests/config.php
3533
dev/api-tests/integration/tmp/*

CHANGELOG.markdown

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
2.0.0.0-dev33
2+
=============
3+
* Improved Themes functionality to meet the following requirements:
4+
* Magento instance doesn’t crash in case there’re no themes at all
5+
* Features like selection of themes in system configuration, custom theme selection in Custom Design, CMS pages, Products and Categories can work without themes. They use base view files only.
6+
* Virtual themes work in the same way as the non-virtual (which are present in file system) though they additionally have inheritance property. Changes were made in theme switcher, in fallback mechanism, in widgets etc.
7+
* Non-virtual themes are being added to DB during installation
8+
* Application framework uses theme id as identifier instead of theme code
9+
* Refactored a variety of report grids in backend (admin) to make them configurable through layout, rather than hard-coded.
10+
* Removed obsolete modules:
11+
* `Mage_XmlConnect`
12+
* `Mage_Dataflow`
13+
* Significantly changed Logging subsystem:
14+
* `Mage_Core_Model_Logger` class is responsible for logging
15+
* Changes are made to comply with DI paradigm
16+
* Custom logger in `Mage_Backend_Menu` subsystem is removed due to usage of regular one
17+
* Changes made in autoload process
18+
* Fixed autoload to prevent `class_exists()` from causing fatal error
19+
* The `Magento_Autoload` library was divided into 2 classes: `Magento_Autoload_IncludePath` is responsible for loading from include path, `Magento_Autoload_ClassMap` from a class map. Stacked "class map" loader on top of "include path" loader in application bootstrap.
20+
* Implemented new jQuery form widget. Its responsibility is to prepare form for submission (change form attributes if needed)
21+
* Replaced usage of different instances of `varienForm` with a new form widget (`productForm`, `categoryForm`, instances of type "onclick declaration", "as child component", "instantiation only")
22+
* Replaced prototype validation with jQuery analog
23+
* Additionally implemented form widget in different modules (CMS, Customer, Backend, Sitemap, DesignEditor, Tags, SystemEmail, Newsletters, ImportExport, Connect, Authorize.net)
24+
* Minor improvements
25+
* Fixed css styles for validation messages in different parts of the system
26+
* Removed usage of `jquery-ui-1.8.21.custom.css`
27+
* Updated versions of jQuery and jQuery-UI on backend
28+
* Updated Magento trademark and copyright labels at the bottom of pages: changed legal entity name to X.Commerce, Inc, made translation engine pick them up
29+
* Improvements made in indexers to stabilize tests. Fixed wrong initialization order of indexers that sometimes caused failure of reindexing all at once
30+
* Bugfixes:
31+
* Set correct order's data change state during voiding the order
32+
* Set translator to pick up status labels in drop-down in "Shopping cart price rule" admin grid
33+
* Fixed an issue in console installer that initialized application in such a way, that it could not load certain event area.
34+
* Fixed incorrect loader image source in backend during new tax rule creation
35+
* Fixed JS error in IE with creating products via floating toolbar
36+
* Fixed image save url during uploading product's images
37+
* Added permission check for editing shipping and billing addresses during viewing the order
38+
* Changed saving of order comments from backend. Comment is saved even without status change
39+
* Added additional validation into `quickCreateAction` of `Mage_Adminhtml_Catalog_ProductController` to prevent saving new product with any id using firebug
40+
* Fixed JS errors in Authorize.net Direct Post submodule
41+
* Fixed JS errors in split button on creating product
42+
* Fixed errors in poll's list template in backend
43+
144
2.0.0.0-dev32
245
=============
346
* Improved product edit workflow:

app/Mage.php

Lines changed: 20 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_Core
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

@@ -170,7 +170,7 @@ public static function getVersionInfo()
170170
'revision' => '0',
171171
'patch' => '0',
172172
'stability' => 'dev',
173-
'number' => '32',
173+
'number' => '33',
174174
);
175175
}
176176

@@ -681,7 +681,6 @@ public static function app($code = '', $type = 'store', $options = array())
681681
Magento_Profiler::start('self::app::init');
682682
self::$_app->init($code, $type, $options);
683683
Magento_Profiler::stop('self::app::init');
684-
self::$_app->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);
685684
}
686685
return self::$_app;
687686
}
@@ -785,7 +784,7 @@ protected static function _setIsInstalled($options = array())
785784
*/
786785
protected static function _setConfigModel($options = array())
787786
{
788-
if (isset($options['config_model']) && Magento_Autoload::getInstance()->classExists($options['config_model'])) {
787+
if (isset($options['config_model']) && class_exists($options['config_model'])) {
789788
$alternativeConfigModelName = $options['config_model'];
790789
unset($options['config_model']);
791790
$alternativeConfigModel = new $alternativeConfigModelName($options);
@@ -834,103 +833,41 @@ public static function isInstalled($options = array())
834833
}
835834

836835
/**
837-
* log facility (??)
836+
* log a message to system log or arbitrary file
838837
*
839838
* @param string $message
840839
* @param integer $level
841840
* @param string $file
842841
* @param bool $forceLog
843842
*/
844-
public static function log($message, $level = null, $file = '', $forceLog = false)
843+
public static function log($message, $level = null, $file = 'system.log', $forceLog = false)
845844
{
846-
if (!self::getConfig()) {
847-
return;
848-
}
849-
850-
try {
851-
$logActive = self::getStoreConfig('dev/log/active');
852-
if (empty($file)) {
853-
$file = self::getStoreConfig('dev/log/file');
854-
}
855-
}
856-
catch (Exception $e) {
857-
$logActive = true;
858-
}
859-
860-
if (!self::$_isDeveloperMode && !$logActive && !$forceLog) {
861-
return;
862-
}
863-
864-
$level = is_null($level) ? Zend_Log::DEBUG : $level;
865-
$file = empty($file) ? 'system.log' : $file;
866-
867-
try {
868-
if (!isset(self::$_loggers[$file])) {
869-
$logFile = self::_expandLogFileName($file);
870-
871-
$format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL;
872-
$formatter = new Zend_Log_Formatter_Simple($format);
873-
$writerModel = (string)self::getConfig()->getNode('global/log/core/writer_model');
874-
if (!self::$_app || !$writerModel || !is_subclass_of($writerModel, 'Zend_Log_Writer_Stream')) {
875-
$writerModel = 'Zend_Log_Writer_Stream';
876-
}
877-
/** @var $writer Zend_Log_Writer_Stream */
878-
$writer = new $writerModel($logFile);
879-
$writer->setFormatter($formatter);
880-
self::$_loggers[$file] = new Zend_Log($writer);
881-
}
882-
883-
if (is_array($message) || is_object($message)) {
884-
$message = print_r($message, true);
885-
}
886-
887-
self::$_loggers[$file]->log($message, $level);
888-
}
889-
catch (Exception $e) {
890-
}
891-
}
892-
893-
/**
894-
* Expand log file name to absolute path, if necessary
895-
*
896-
* @param string $file
897-
* @return string
898-
*/
899-
protected static function _expandLogFileName($file)
900-
{
901-
/*
902-
* Check whether a file is a wrapper
903-
* @link http://www.php.net/manual/en/wrappers.php
904-
*/
905-
if (preg_match('#^[a-z][a-z0-9+.-]*\://#i', $file)) {
906-
return $file;
907-
}
908-
$dir = self::getBaseDir('var') . DIRECTORY_SEPARATOR . 'log';
909-
$file = $dir . DIRECTORY_SEPARATOR . $file;
910-
if (!is_dir($dir)) {
911-
mkdir($dir);
912-
chmod($dir, 0777);
845+
$level = is_null($level) ? Zend_Log::DEBUG : $level;
846+
if (empty($file) || $file == 'system.log') {
847+
$file = 'system.log';
848+
$key = Mage_Core_Model_Logger::LOGGER_SYSTEM;
849+
} elseif ($file == 'exception.log') {
850+
$key = Mage_Core_Model_Logger::LOGGER_EXCEPTION;
851+
} else {
852+
$forceLog = true;
853+
$key = $file;
913854
}
914-
if (!file_exists($file)) {
915-
file_put_contents($file, '');
916-
chmod($file, 0777);
855+
/** @var $logger Mage_Core_Model_Logger */
856+
$logger = self::$_objectManager->get('Mage_Core_Model_Logger');
857+
if ($forceLog && !$logger->hasLog($key)) {
858+
$logger->addStreamLog($key, $file);
917859
}
918-
return $file;
860+
$logger->log($message, $level, $key);
919861
}
920862

921-
922863
/**
923864
* Write exception to log
924865
*
925866
* @param Exception $e
926867
*/
927868
public static function logException(Exception $e)
928869
{
929-
if (!self::getConfig()) {
930-
return;
931-
}
932-
$file = self::getStoreConfig('dev/log/exception_file');
933-
self::log("\n" . $e->__toString(), Zend_Log::ERR, $file);
870+
self::$_objectManager->get('Mage_Core_Model_Logger')->logException($e);
934871
}
935872

936873
/**
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22
/**
3+
* Register basic autoloader that uses include path
4+
*
35
* Magento
46
*
57
* NOTICE OF LICENSE
@@ -18,16 +20,8 @@
1820
* versions in the future. If you wish to customize Magento for your
1921
* needs please refer to http://www.magentocommerce.com for more information.
2022
*
21-
* @category Mage
22-
* @package Mage_Dataflow
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25-
*/
26-
27-
/**
28-
* Dataflow data helper
29-
*
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
24+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
3025
*/
31-
class Mage_Dataflow_Helper_Data extends Mage_Core_Helper_Abstract
32-
{
33-
}
26+
require_once __DIR__ . '/../lib/Magento/Autoload/IncludePath.php';
27+
spl_autoload_register('Magento_Autoload_IncludePath::load');

app/bootstrap.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* needs please refer to http://www.magentocommerce.com for more information.
2020
*
2121
* @category Magento
22-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
22+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2323
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2424
*/
2525

@@ -69,24 +69,26 @@
6969
/**
7070
* Require necessary files
7171
*/
72-
require_once BP . '/lib/Magento/Autoload.php';
7372
require_once BP . '/app/code/core/Mage/Core/functions.php';
7473
require_once BP . '/app/Mage.php';
7574

7675
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
7776
Mage::setIsDeveloperMode(true);
7877
}
79-
Mage::register('original_include_path', get_include_path());
80-
81-
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
82-
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
83-
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
84-
$paths[] = BP . DS . 'lib';
85-
Magento_Autoload::getInstance()->addIncludePath($paths);
8678

79+
require_once __DIR__ . '/autoload.php';
80+
Magento_Autoload_IncludePath::addIncludePath(array(
81+
BP . DS . 'app' . DS . 'code' . DS . 'local',
82+
BP . DS . 'app' . DS . 'code' . DS . 'community',
83+
BP . DS . 'app' . DS . 'code' . DS . 'core',
84+
BP . DS . 'lib',
85+
));
8786
$classMapPath = BP . DS . 'var/classmap.ser';
8887
if (file_exists($classMapPath)) {
89-
Magento_Autoload::getInstance()->addFilesMap($classMapPath);
88+
require_once BP . '/lib/Magento/Autoload/ClassMap.php';
89+
$classMap = new Magento_Autoload_ClassMap(BP);
90+
$classMap->addMap(unserialize(file_get_contents($classMapPath)));
91+
spl_autoload_register(array($classMap, 'load'));
9092
}
9193

9294
$definitionsFile = BP . DS . 'var/di/definitions.php';

app/code/core/Mage/AdminNotification/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Config/Source/Frequency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Inbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Observer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/Model/Survey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @category Mage
2222
* @package Mage_AdminNotification
23-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2424
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2525
*/
2626

app/code/core/Mage/AdminNotification/etc/adminhtml/acl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @category Mage
2323
* @package Mage_AdminNotification
24-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2525
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
2626
*/
2727
-->

app/code/core/Mage/AdminNotification/etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @category Mage
2323
* @package Mage_AdminNotification
24-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2525
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
2626
*/
2727
-->

app/code/core/Mage/AdminNotification/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @category Mage
2323
* @package Mage_AdminNotification
24-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24+
* @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
2525
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
2626
*/
2727
-->

0 commit comments

Comments
 (0)