Skip to content

Commit 36b58f5

Browse files
committed
Add setup script and bump Mage_Core from 1.6.0.10 to 1.6.0.11
1 parent c58d65e commit 36b58f5

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

app/code/core/Mage/Core/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<config>
1818
<modules>
1919
<Mage_Core>
20-
<version>1.6.0.10</version>
20+
<version>1.6.0.11</version>
2121
</Mage_Core>
2222
</modules>
2323
<global>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* OpenMage
4+
*
5+
* This source file is subject to the Open Software License (OSL 3.0)
6+
* that is bundled with this package in the file LICENSE.txt.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
8+
*
9+
* @category Mage
10+
* @package Mage_Core
11+
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
12+
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
13+
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14+
*/
15+
16+
/** @var Mage_Core_Model_Resource_Setup $installer */
17+
$installer = $this;
18+
$installer->startSetup();
19+
20+
$table = $installer->getTable('core/config_data');
21+
22+
if ($installer->getConnection()->isTableExists($table)) {
23+
$oldPath = 'admin/security/crate_admin_user_notification';
24+
$newPath = 'admin/security/create_admin_user_notification';
25+
26+
$select = $installer->getConnection()->select()
27+
->from($table, ['config_id', 'path'])
28+
->where('path = ?', $oldPath);
29+
30+
$rows = $installer->getConnection()->fetchAll($select);
31+
32+
foreach ($rows as $row) {
33+
$installer->getConnection()->update(
34+
$table,
35+
['path' => $newPath],
36+
['config_id = ?' => $row['config_id']]
37+
);
38+
}
39+
}
40+
41+
$installer->endSetup();

0 commit comments

Comments
 (0)