Version Notes
Check if you don't have any conflicts in rewrites between installed modules.
Download this release
Release Info
| Developer | Marcin Frymark |
| Extension | modules_conflict_detector |
| Version | 0.1.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.0.0 to 0.1.0.1
app/code/community/Alekseon/ModulesConflictDetector/Model/Resource/Collection.php
CHANGED
|
@@ -7,4 +7,27 @@
|
|
| 7 |
*/
|
| 8 |
class Alekseon_ModulesConflictDetector_Model_Resource_Collection extends Alekseon_ModulesConflictDetector_Model_Resource_NonDbCollection
|
| 9 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 7 |
*/
|
| 8 |
class Alekseon_ModulesConflictDetector_Model_Resource_Collection extends Alekseon_ModulesConflictDetector_Model_Resource_NonDbCollection
|
| 9 |
{
|
| 10 |
+
protected function _getColumnsValue($item, $column)
|
| 11 |
+
{
|
| 12 |
+
if ($column == 'rewrites') {
|
| 13 |
+
$data = $item->getData($column);
|
| 14 |
+
$result = false;
|
| 15 |
+
|
| 16 |
+
if (!isset($data['classes'])) {
|
| 17 |
+
return $result;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
$classes = $data['classes'];
|
| 21 |
+
|
| 22 |
+
foreach($classes as $class) {
|
| 23 |
+
if (!$result || $class['conflict'] == Alekseon_ModulesConflictDetector_Model_Rewrites::NO_CONFLICT_TYPE) {
|
| 24 |
+
$result = $class['class'];
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
return $result;
|
| 29 |
+
} else {
|
| 30 |
+
return parent::_getColumnsValue($item, $column);
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
}
|
app/code/community/Alekseon/ModulesConflictDetector/Model/Resource/NonDbCollection.php
CHANGED
|
@@ -103,18 +103,21 @@ class Alekseon_ModulesConflictDetector_Model_Resource_NonDbCollection extends Va
|
|
| 103 |
return true;
|
| 104 |
}
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
protected function _doCompare($a, $b)
|
| 107 |
{
|
| 108 |
foreach($this->_orders as $column => $order) {
|
| 109 |
-
$valueA = $
|
| 110 |
-
$valueB = $
|
| 111 |
-
|
| 112 |
-
$valueA = implode(',', $valueA);
|
| 113 |
-
}
|
| 114 |
-
if (is_array($valueB)) {
|
| 115 |
-
$valueB = implode(',', $valueB);
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
$result = strcmp($valueA, $valueB);
|
| 119 |
|
| 120 |
if (strtolower($order) == 'asc') {
|
| 103 |
return true;
|
| 104 |
}
|
| 105 |
|
| 106 |
+
protected function _getColumnsValue($item, $column)
|
| 107 |
+
{
|
| 108 |
+
$value = $item->getData($column);
|
| 109 |
+
if (is_array($value)) {
|
| 110 |
+
$value = implode(',', $value);
|
| 111 |
+
}
|
| 112 |
+
return $value;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
protected function _doCompare($a, $b)
|
| 116 |
{
|
| 117 |
foreach($this->_orders as $column => $order) {
|
| 118 |
+
$valueA = $this->_getColumnsValue($a, $column);
|
| 119 |
+
$valueB = $this->_getColumnsValue($b, $column);
|
| 120 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
$result = strcmp($valueA, $valueB);
|
| 122 |
|
| 123 |
if (strtolower($order) == 'asc') {
|
app/code/community/Alekseon/ModulesConflictDetector/Model/Rewrites.php
CHANGED
|
@@ -7,9 +7,9 @@
|
|
| 7 |
*/
|
| 8 |
class Alekseon_ModulesConflictDetector_Model_Rewrites extends Mage_Core_Model_Abstract
|
| 9 |
{
|
| 10 |
-
const
|
| 11 |
-
const
|
| 12 |
-
const
|
| 13 |
|
| 14 |
const CONFLICT_COLOR = 'red';
|
| 15 |
const NO_CONFLICT_COLOR = 'green';
|
|
@@ -81,7 +81,7 @@ class Alekseon_ModulesConflictDetector_Model_Rewrites extends Mage_Core_Model_Ab
|
|
| 81 |
$rewritesArray[] = $rewriteItem;
|
| 82 |
}
|
| 83 |
}
|
| 84 |
-
|
| 85 |
return $rewritesArray;
|
| 86 |
}
|
| 87 |
|
|
@@ -135,9 +135,9 @@ class Alekseon_ModulesConflictDetector_Model_Rewrites extends Mage_Core_Model_Ab
|
|
| 135 |
'conflict' => $conflict,
|
| 136 |
);
|
| 137 |
if (!isset($modelsRewrites[$initialClass]['filter_condition'])) {
|
| 138 |
-
$modelsRewrites[$initialClass]['filter_condition'] = (string)$newClass . '
|
| 139 |
} else {
|
| 140 |
-
$modelsRewrites[$initialClass]['filter_condition'] .= (string)$newClass . '
|
| 141 |
}
|
| 142 |
}
|
| 143 |
}
|
| 7 |
*/
|
| 8 |
class Alekseon_ModulesConflictDetector_Model_Rewrites extends Mage_Core_Model_Abstract
|
| 9 |
{
|
| 10 |
+
const NO_CONFLICT_TYPE = 0;
|
| 11 |
+
const RESOLVED_CONFLICT_TYPE = 1;
|
| 12 |
+
const CONFLICT_TYPE = 2;
|
| 13 |
|
| 14 |
const CONFLICT_COLOR = 'red';
|
| 15 |
const NO_CONFLICT_COLOR = 'green';
|
| 81 |
$rewritesArray[] = $rewriteItem;
|
| 82 |
}
|
| 83 |
}
|
| 84 |
+
|
| 85 |
return $rewritesArray;
|
| 86 |
}
|
| 87 |
|
| 135 |
'conflict' => $conflict,
|
| 136 |
);
|
| 137 |
if (!isset($modelsRewrites[$initialClass]['filter_condition'])) {
|
| 138 |
+
$modelsRewrites[$initialClass]['filter_condition'] = (string)$newClass . ' ';
|
| 139 |
} else {
|
| 140 |
+
$modelsRewrites[$initialClass]['filter_condition'] .= (string)$newClass . ' ';
|
| 141 |
}
|
| 142 |
}
|
| 143 |
}
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>modules_conflict_detector</name>
|
| 4 |
-
<version>0.1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -11,8 +11,8 @@
|
|
| 11 |
<notes>Check if you don't have any conflicts in rewrites between installed modules.</notes>
|
| 12 |
<authors><author><name>Marcin Frymark</name><user>Alekseon</user><email>contact@alekseon.com</email></author></authors>
|
| 13 |
<date>2014-03-23</date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Alekseon"><dir name="ModulesConflictDetector"><dir><dir name="Block"><dir name="Adminhtml"><file name="Explanations.php" hash="0a8cd813571b686b427307494d826fc6"/><dir name="Rewrites"><dir name="Grid"><dir name="Renderer"><file name="DetailsButton.php" hash="753b63ad8085bbd3548de5abde49d7fa"/><file name="Rewrites.php" hash="af21f07ab44dca9154185fd0c67dfd31"/></dir></dir><file name="Grid.php" hash="845bafca998a83cb7a87ee014c8f6955"/></dir><file name="Rewrites.php" hash="8ab82af5797da19d5313940164a4d178"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="AlekseonLogo.php" hash="80da1af8a2e13d2060344b3d3847556e"/><file name="AlekseonNotification.php" hash="e23d75a2055777ac9f22d8f1ffd4114e"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2c25602ee805b609b3d3a46b1c1aa589"/></dir><dir name="Model"><dir name="AlekseonAdminNotification"><file name="Feed.php" hash="6faab757204424af0d927a176ed8bfa1"/><file name="Observer.php" hash="ac86f372eae98573fe3527b09e046e03"/></dir><dir name="Resource"><file name="Collection.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>modules_conflict_detector</name>
|
| 4 |
+
<version>0.1.0.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 11 |
<notes>Check if you don't have any conflicts in rewrites between installed modules.</notes>
|
| 12 |
<authors><author><name>Marcin Frymark</name><user>Alekseon</user><email>contact@alekseon.com</email></author></authors>
|
| 13 |
<date>2014-03-23</date>
|
| 14 |
+
<time>13:09:02</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Alekseon"><dir name="ModulesConflictDetector"><dir><dir name="Block"><dir name="Adminhtml"><file name="Explanations.php" hash="0a8cd813571b686b427307494d826fc6"/><dir name="Rewrites"><dir name="Grid"><dir name="Renderer"><file name="DetailsButton.php" hash="753b63ad8085bbd3548de5abde49d7fa"/><file name="Rewrites.php" hash="af21f07ab44dca9154185fd0c67dfd31"/></dir></dir><file name="Grid.php" hash="845bafca998a83cb7a87ee014c8f6955"/></dir><file name="Rewrites.php" hash="8ab82af5797da19d5313940164a4d178"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="AlekseonLogo.php" hash="80da1af8a2e13d2060344b3d3847556e"/><file name="AlekseonNotification.php" hash="e23d75a2055777ac9f22d8f1ffd4114e"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2c25602ee805b609b3d3a46b1c1aa589"/></dir><dir name="Model"><dir name="AlekseonAdminNotification"><file name="Feed.php" hash="6faab757204424af0d927a176ed8bfa1"/><file name="Observer.php" hash="ac86f372eae98573fe3527b09e046e03"/></dir><dir name="Resource"><file name="Collection.php" hash="7b5a67fcca9a7d6f5961a4a54d4dcfbb"/><file name="NonDbCollection.php" hash="cd0722371feb7187a19fb68b808d78e5"/></dir><file name="Rewrites.php" hash="ef3939ac16eea64a465c420d6376706d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ModulesConflictDetectorController.php" hash="23c14b7da46203a1541691fe236829cf"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6e508d19181289bde12dcff8c72e01dc"/><file name="config.xml" hash="44eeaed1dcf934bc9a6757c4f87f5680"/><file name="system.xml" hash="2e87963d966b5190906bbb282564855b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Alekseon_ModulesConflictDetector.xml" hash="a398b22450033be787cd8e0b990589ed"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="alekseon"><dir name="modulesConflictDetector"><file name="explanations.phtml" hash="5dac6251ba74bce38b92d1b809848bbf"/></dir></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
