Commit a57652c7 authored by brokentwill's avatar brokentwill

Update new version

parent 4c1b4b94
...@@ -30,7 +30,8 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -30,7 +30,8 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
public function render(Varien_Data_Form_Element_Abstract $element) public function render(Varien_Data_Form_Element_Abstract $element)
{ {
$html = $this->_getHeaderHtml($element); $html = $this->_getHeaderHtml($element);
$html .= '<table cellpadding="5" cellspacing="5">'; $html .= '<table cellpadding="5" cellspacing="5">
<tr><td width="80">Core Module</td><td>Core Class</td><td>Rewrite Classes</td><td>Conflict</td></tr>';
//retrieve all config.xml //retrieve all config.xml
$tConfigFiles = $this->getConfigFilesList(); $tConfigFiles = $this->getConfigFilesList();
...@@ -44,6 +45,15 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -44,6 +45,15 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
foreach($rewrites as $key => $value) foreach($rewrites as $key => $value)
{ {
$i++; $i++;
$has_onlinebiz = false;
foreach ($value as $class_name) {
if ((substr($class_name, 0, 10) == 'OnlineBiz_')) {
$has_onlinebiz = true;
break;
}
}
$t = explode('/', $key); $t = explode('/', $key);
$moduleName = $t[0]; $moduleName = $t[0];
$className = $t[1]; $className = $t[1];
...@@ -51,8 +61,9 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -51,8 +61,9 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
$conflict = 0; $conflict = 0;
if (count($value) > 1) if (count($value) > 1)
$conflict = 1; $conflict = 1;
if ($has_onlinebiz) {
$html.= $this->_getFieldHtml($element, $moduleName, $className, $rewriteClasses, $conflict); $html.= $this->_getFieldHtml($element, $moduleName, $className, $rewriteClasses, $conflict);
}
} }
$html .= '</table>'; $html .= '</table>';
$html .= $this->_getFooterHtml($element); $html .= $this->_getFooterHtml($element);
...@@ -189,33 +200,42 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -189,33 +200,42 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
*/ */
public function getRewriteForFile($configFilePath, $results) public function getRewriteForFile($configFilePath, $results)
{ {
//load xml try {
$xmlcontent = file_get_contents($configFilePath); //load xml
$domDocument = new DOMDocument(); $xmlcontent = file_get_contents($configFilePath);
$domDocument->loadXML($xmlcontent); $domDocument = new DOMDocument();
$domDocument->loadXML($xmlcontent);
foreach($domDocument->documentElement->getElementsByTagName('rewrite') as $markup)
{ //parse every node types
//parse child nodes $nodeTypes = array('blocks', 'models', 'helpers');
$moduleName = $markup->parentNode->tagName; foreach ($nodeTypes as $nodeType) {
if ($this->manageModule($moduleName)) if (!$domDocument->documentElement)
{ continue;
foreach($markup->getElementsByTagName('*') as $childNode)
{ foreach ($domDocument->documentElement->getElementsByTagName($nodeType) as $nodeTypeMarkup) {
//get information foreach ($nodeTypeMarkup->getElementsByTagName('rewrite') as $markup) {
$className = $childNode->tagName; //parse child nodes
$rewriteClass = $childNode->nodeValue; $moduleName = $markup->parentNode->tagName;
if ($this->manageModule($moduleName)) {
//add to result foreach ($markup->getElementsByTagName('*') as $childNode) {
$key = $moduleName.'/'.$className; //get information
if (!isset($results[$key])) $className = $nodeType . '_' . $childNode->tagName;
$results[$key] = array(); $rewriteClass = $childNode->nodeValue;
$results[$key][] = $rewriteClass;
//add to result
} $key = $moduleName . '/' . $className;
} if (!isset($results[$key]))
} $results[$key] = array();
$results[$key][] = $rewriteClass;
return $results; }
}
}
}
}
} catch (Exception $ex) {
return $results;
}
return $results;
} }
} }
...@@ -38,9 +38,6 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions ...@@ -38,9 +38,6 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions
continue; continue;
} }
if($moduleName == 'OnlineBiz_Core' || $moduleName == 'OnlineBiz_ObBase'){
continue;
}
$html.= $this->_getFieldHtml($element, $moduleName); $html.= $this->_getFieldHtml($element, $moduleName);
} }
...@@ -110,7 +107,7 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions ...@@ -110,7 +107,7 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions
array( array(
'name' => 'ssssss', 'name' => 'ssssss',
'label' => $moduleName, 'label' => $moduleName,
'value' => $ver, 'value' => $ver . '<a href="">Document</a>',
))->setRenderer($this->_getFieldRenderer()); ))->setRenderer($this->_getFieldRenderer());
return $field->toHtml(); return $field->toHtml();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<config> <config>
<tabs> <tabs>
<obbase translate="label" module="obbase"> <obbase translate="label" module="obbase">
<label>OnlineBizSoft</label> <label>STORE.ONLINEBIZSOFT.COM</label>
<sort_order>300</sort_order> <sort_order>300</sort_order>
</obbase> </obbase>
</tabs> </tabs>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</groups> </groups>
</managekey> </managekey>
<obbase translate="label" module="obbase"> <obbase translate="label" module="obbase">
<label>Extensions Info</label> <label>Installed Ext. Information</label>
<tab>obbase</tab> <tab>obbase</tab>
<frontend_type>text</frontend_type> <frontend_type>text</frontend_type>
<sort_order>9999</sort_order> <sort_order>9999</sort_order>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<show_in_store>1</show_in_store> <show_in_store>1</show_in_store>
<groups> <groups>
<installed_extensions translate="label"> <installed_extensions translate="label">
<label>Installed OnlineBiz Extensions</label> <label>Installed Extensions Version</label>
<frontend_type>text</frontend_type> <frontend_type>text</frontend_type>
<frontend_model>obbase/system_config_form_fieldset_extensions</frontend_model> <frontend_model>obbase/system_config_form_fieldset_extensions</frontend_model>
<sort_order>2</sort_order> <sort_order>2</sort_order>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<show_in_store>1</show_in_store> <show_in_store>1</show_in_store>
</installed_extensions> </installed_extensions>
<extensions_conflict translate="label"> <extensions_conflict translate="label">
<label>Extensions Conflict</label> <label>Rewrites</label>
<frontend_type>text</frontend_type> <frontend_type>text</frontend_type>
<frontend_model>obbase/system_config_form_fieldset_conflict</frontend_model> <frontend_model>obbase/system_config_form_fieldset_conflict</frontend_model>
<sort_order>3</sort_order> <sort_order>3</sort_order>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</extensions_conflict> </extensions_conflict>
</groups> </groups>
</obbase> </obbase>
<storeview translate="label" module="obbase"> <!--<storeview translate="label" module="obbase">
<label>Hot Plugins Today</label> <label>Hot Plugins Today</label>
<tab>obbase</tab> <tab>obbase</tab>
<frontend_type>text</frontend_type> <frontend_type>text</frontend_type>
...@@ -84,6 +84,6 @@ ...@@ -84,6 +84,6 @@
<show_in_store>1</show_in_store> <show_in_store>1</show_in_store>
</extensions> </extensions>
</groups> </groups>
</storeview> </storeview>-->
</sections> </sections>
</config> </config>
/app/code/local/OnlineBiz/ObBase /app/code/local/OnlineBiz/ObBase
/app/design/adminhtml/default/default/layout/onlinebizsoft/obbase.xml /app/design/adminhtml/default/default/layout/onlinebizsoft/obbase.xml
/app/design/adminhtml/default/default/template/onlinebizsoft/obbase/notification/window.phtml /app/design/adminhtml/default/default/template/onlinebizsoft/obbase/notification/window.phtml
/app/design/adminhtml/default/default/template/onlinebizsoft/obbase/store.phtml /app/design/adminhtml/default/default/template/onlinebizsoft/obbase/store.phtml
/app/etc/modules/OnlineBiz_ObBase.xml /app/etc/modules/OnlineBiz_ObBase.xml
/js/onlinebizsoft/obbase/base.js /js/onlinebizsoft/obbase/base.js
/skin/adminhtml/default/default/onlinebizsoft/obbase/css/base.css /skin/adminhtml/default/default/onlinebizsoft/obbase/css/base.css
/skin/adminhtml/default/default/onlinebizsoft/obbase/images/ok.gif /skin/adminhtml/default/default/onlinebizsoft/obbase/images/ok.gif
/skin/adminhtml/default/default/onlinebizsoft/obbase/images/update.gif /skin/adminhtml/default/default/onlinebizsoft/obbase/images/update.gif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment