Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 9e443cc

Browse files
committed
Magento 1.9.4.4 code changes
1 parent 76ca350 commit 9e443cc

File tree

18 files changed

+96
-27
lines changed

18 files changed

+96
-27
lines changed

app/Mage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static function getVersionInfo()
174174
'major' => '1',
175175
'minor' => '9',
176176
'revision' => '4',
177-
'patch' => '3',
177+
'patch' => '4',
178178
'stability' => '',
179179
'number' => '',
180180
);

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ protected function _prepareLayout()
5555

5656
$this->getUploader()->getUploaderConfig()
5757
->setFileParameterName('image')
58-
->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload'));
58+
->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl(
59+
'*/catalog_product_gallery/upload',
60+
array('_query' => false)
61+
));
5962

6063
$browseConfig = $this->getUploader()->getButtonConfig();
6164
$browseConfig

app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function __construct()
4444
$this->getUploaderConfig()
4545
->setFileParameterName('image')
4646
->setTarget(
47-
Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload', array('type' => $type))
47+
Mage::getModel('adminhtml/url')->addSessionParam()->getUrl(
48+
'*/*/upload',
49+
array('type' => $type, '_query' => false)
50+
)
4851
);
4952
$this->getButtonConfig()
5053
->setAttributes(array(

app/code/core/Mage/Compiler/Block/Process.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,24 @@ protected function _prepareLayout()
6666
$this->getLayout()->createBlock('adminhtml/widget_button')
6767
->setData(array(
6868
'label' => Mage::helper('compiler')->__('Run Compilation Process'),
69-
'onclick' => 'compilationForm.submit();',
69+
'onclick' => 'buttonDisabler(event); compilationForm.submit();',
7070
'class' => 'save'
7171
)));
7272

73-
if (defined('COMPILER_INCLUDE_PATH')) {
73+
if (!$this->_process->isConstNotDefineInFile()) {
7474
$this->setChild('change_status_button',
7575
$this->getLayout()->createBlock('adminhtml/widget_button')
7676
->setData(array(
7777
'label' => Mage::helper('compiler')->__('Disable'),
78-
'onclick' => 'setLocation(\'' . $this->getUrl('*/compiler_process/disable') . '\')',
78+
'onclick' => 'buttonDisabler(event); setLocation(\'' . $this->getUrl('*/compiler_process/disable') . '\')',
7979
'class' => 'save'
8080
)));
8181
} else {
8282
$this->setChild('change_status_button',
8383
$this->getLayout()->createBlock('adminhtml/widget_button')
8484
->setData(array(
8585
'label' => Mage::helper('compiler')->__('Enable'),
86-
'onclick' => 'setLocation(\'' . $this->getUrl('*/compiler_process/enable') . '\')',
86+
'onclick' => 'buttonDisabler(event); setLocation(\'' . $this->getUrl('*/compiler_process/enable') . '\')',
8787
'class' => 'save'
8888
)));
8989
}
@@ -174,7 +174,7 @@ public function getCompilerState()
174174

175175
public function getCompilerStatus()
176176
{
177-
if (defined('COMPILER_INCLUDE_PATH')) {
177+
if (!$this->_process->isConstNotDefineInFile()) {
178178
return $this->__('Enabled');
179179
} else {
180180
return $this->__('Disabled');

app/code/core/Mage/Compiler/Model/Process.php

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ protected function _getClassesSourceCode($classes, $scope)
394394

395395
public function clear()
396396
{
397-
$this->registerIncludePath(false);
398397
if (is_dir($this->_includeDir)) {
399398
mageDelTree($this->_includeDir);
400399
}
@@ -410,7 +409,6 @@ public function run()
410409
{
411410
$this->_collectFiles();
412411
$this->_compileFiles();
413-
$this->registerIncludePath();
414412
return $this;
415413

416414
}
@@ -423,7 +421,7 @@ public function run()
423421
*/
424422
public function registerIncludePath($flag = true)
425423
{
426-
$file = $this->_compileDir.DS.'config.php';
424+
$file = $this->getConfigFilePath();
427425
if (is_writeable($file)) {
428426
$content = file_get_contents($file);
429427
$content = explode("\n", $content);
@@ -452,11 +450,38 @@ public function validate()
452450
if (!is_writeable($this->_compileDir)) {
453451
$result[] = Mage::helper('compiler')->__('Directory "%s" must be writeable', $this->_compileDir);
454452
}
455-
$file = $this->_compileDir.DS.'config.php';
453+
$file = $this->getConfigFilePath();
456454
if (!is_writeable($file)) {
457455
$result[] = Mage::helper('compiler')->__('File "%s" must be writeable', $file);
458456
}
459457
return $result;
460458
}
461459

460+
/**
461+
* Check if constant has been defined in file
462+
*
463+
* @return bool
464+
*/
465+
public function isConstNotDefineInFile()
466+
{
467+
$file = $this->getConfigFilePath();
468+
if (is_writeable($file)) {
469+
foreach (file($file) as $line) {
470+
if (stristr($line, 'COMPILER_INCLUDE_PATH')) {
471+
return (bool) stristr($line, '#');
472+
}
473+
}
474+
}
475+
return false;
476+
}
477+
478+
/**
479+
* Return config file path
480+
*
481+
* @return string
482+
*/
483+
public function getConfigFilePath()
484+
{
485+
return $this->_compileDir . DS . 'config.php';
486+
}
462487
}

app/code/core/Mage/Compiler/controllers/Adminhtml/Compiler/ProcessController.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,23 @@ public function recompileAction()
8383
/**
8484
* Add redirect heades before clear compiled sources
8585
*/
86-
if (defined('COMPILER_INCLUDE_PATH')) {
86+
if ($this->_getCompiler()->isConstNotDefineInFile()) {
87+
if (defined('COMPILER_INCLUDE_PATH') !== false) {
88+
Mage::getSingleton('adminhtml/session')->addError(
89+
Mage::helper('compiler')->__('Operation in progress. Please try later')
90+
);
91+
$this->_redirect('*/*/');
92+
} else {
93+
$this->_getCompiler()->clear();
94+
$this->_redirect('*/*/run');
95+
$this->getResponse()->sendHeaders();
96+
exit;
97+
}
98+
} else {
8799
Mage::getSingleton('adminhtml/session')->addError(
88100
Mage::helper('compiler')->__('Please, press disable button before run compilation process')
89101
);
90102
$this->_redirect('*/*/');
91-
} else {
92-
$this->_redirect('*/*/run');
93-
$this->_getCompiler()->clear();
94-
$this->getResponse()->sendHeaders();
95-
exit;
96103
}
97104
}
98105

app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ class Mage_Core_Model_Input_Filter_MaliciousCode implements Zend_Filter_Interfac
5050
//js in the style attribute
5151
'/style=[^<]*((expression\s*?\([^<]*?\))|(behavior\s*:))[^<]*(?=\>)/Uis',
5252
//js attributes
53-
'/(ondblclick|onclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onload|onunload|onerror|onanimationstart)\s*=[^>]*(?=\>)/Uis',
53+
'/(ondblclick|onclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onload|onunload|onerror|onanimationstart|onfocus|onloadstart|ontoggle)\s*=[^>]*(?=\>)/Uis',
5454
//tags
55-
'/<\/?(script|meta|link|frame|iframe).*>/Uis',
55+
'/<\/?(script|meta|link|frame|iframe|object).*>/Uis',
5656
//base64 usage
5757
'/src\s*=[^<]*base64[^<]*(?=\>)/Uis',
5858
//data attribute

app/design/adminhtml/default/default/template/forgotpassword.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<html lang="en">
2929
<head>
3030
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
31+
<meta name="robots" content="noindex, nofollow" />
3132
<title><?php echo Mage::helper('adminhtml')->__('Log into Magento Admin Page'); ?></title>
3233
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" />
3334
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" />

app/design/adminhtml/default/default/template/login.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
2929
<head>
3030
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
31+
<meta name="robots" content="noindex, nofollow" />
3132
<title><?php echo Mage::helper('adminhtml')->__('Log into Magento Admin Page') ?></title>
3233
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css') ?>" media="all" />
3334
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css') ?>" media="all" />

app/design/adminhtml/default/default/template/resetforgottenpassword.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<html lang="en">
2929
<head>
3030
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
31+
<meta name="robots" content="noindex, nofollow" />
3132
<title><?php echo Mage::helper('adminhtml')->__('Reset a Password'); ?></title>
3233
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" />
3334
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" />

0 commit comments

Comments
 (0)