We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

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,9 +61,10 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -51,9 +61,10 @@ 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,32 +200,41 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict ...@@ -189,32 +200,41 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
*/ */
public function getRewriteForFile($configFilePath, $results) public function getRewriteForFile($configFilePath, $results)
{ {
try {
//load xml //load xml
$xmlcontent = file_get_contents($configFilePath); $xmlcontent = file_get_contents($configFilePath);
$domDocument = new DOMDocument(); $domDocument = new DOMDocument();
$domDocument->loadXML($xmlcontent); $domDocument->loadXML($xmlcontent);
foreach($domDocument->documentElement->getElementsByTagName('rewrite') as $markup) //parse every node types
{ $nodeTypes = array('blocks', 'models', 'helpers');
foreach ($nodeTypes as $nodeType) {
if (!$domDocument->documentElement)
continue;
foreach ($domDocument->documentElement->getElementsByTagName($nodeType) as $nodeTypeMarkup) {
foreach ($nodeTypeMarkup->getElementsByTagName('rewrite') as $markup) {
//parse child nodes //parse child nodes
$moduleName = $markup->parentNode->tagName; $moduleName = $markup->parentNode->tagName;
if ($this->manageModule($moduleName)) if ($this->manageModule($moduleName)) {
{ foreach ($markup->getElementsByTagName('*') as $childNode) {
foreach($markup->getElementsByTagName('*') as $childNode)
{
//get information //get information
$className = $childNode->tagName; $className = $nodeType . '_' . $childNode->tagName;
$rewriteClass = $childNode->nodeValue; $rewriteClass = $childNode->nodeValue;
//add to result //add to result
$key = $moduleName.'/'.$className; $key = $moduleName . '/' . $className;
if (!isset($results[$key])) if (!isset($results[$key]))
$results[$key] = array(); $results[$key] = array();
$results[$key][] = $rewriteClass; $results[$key][] = $rewriteClass;
} }
} }
} }
}
}
} catch (Exception $ex) {
return $results;
}
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