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
public function render(Varien_Data_Form_Element_Abstract $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
$tConfigFiles = $this->getConfigFilesList();
......@@ -44,6 +45,15 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
foreach($rewrites as $key => $value)
{
$i++;
$has_onlinebiz = false;
foreach ($value as $class_name) {
if ((substr($class_name, 0, 10) == 'OnlineBiz_')) {
$has_onlinebiz = true;
break;
}
}
$t = explode('/', $key);
$moduleName = $t[0];
$className = $t[1];
......@@ -51,8 +61,9 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
$conflict = 0;
if (count($value) > 1)
$conflict = 1;
$html.= $this->_getFieldHtml($element, $moduleName, $className, $rewriteClasses, $conflict);
if ($has_onlinebiz) {
$html.= $this->_getFieldHtml($element, $moduleName, $className, $rewriteClasses, $conflict);
}
}
$html .= '</table>';
$html .= $this->_getFooterHtml($element);
......@@ -189,33 +200,42 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Conflict
*/
public function getRewriteForFile($configFilePath, $results)
{
//load xml
$xmlcontent = file_get_contents($configFilePath);
$domDocument = new DOMDocument();
$domDocument->loadXML($xmlcontent);
foreach($domDocument->documentElement->getElementsByTagName('rewrite') as $markup)
{
//parse child nodes
$moduleName = $markup->parentNode->tagName;
if ($this->manageModule($moduleName))
{
foreach($markup->getElementsByTagName('*') as $childNode)
{
//get information
$className = $childNode->tagName;
$rewriteClass = $childNode->nodeValue;
//add to result
$key = $moduleName.'/'.$className;
if (!isset($results[$key]))
$results[$key] = array();
$results[$key][] = $rewriteClass;
}
}
}
return $results;
try {
//load xml
$xmlcontent = file_get_contents($configFilePath);
$domDocument = new DOMDocument();
$domDocument->loadXML($xmlcontent);
//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
$moduleName = $markup->parentNode->tagName;
if ($this->manageModule($moduleName)) {
foreach ($markup->getElementsByTagName('*') as $childNode) {
//get information
$className = $nodeType . '_' . $childNode->tagName;
$rewriteClass = $childNode->nodeValue;
//add to result
$key = $moduleName . '/' . $className;
if (!isset($results[$key]))
$results[$key] = array();
$results[$key][] = $rewriteClass;
}
}
}
}
}
} catch (Exception $ex) {
return $results;
}
return $results;
}
}
......@@ -38,9 +38,6 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions
continue;
}
if($moduleName == 'OnlineBiz_Core' || $moduleName == 'OnlineBiz_ObBase'){
continue;
}
$html.= $this->_getFieldHtml($element, $moduleName);
}
......@@ -110,7 +107,7 @@ class OnlineBiz_ObBase_Block_System_Config_Form_Fieldset_Extensions
array(
'name' => 'ssssss',
'label' => $moduleName,
'value' => $ver,
'value' => $ver . '<a href="">Document</a>',
))->setRenderer($this->_getFieldRenderer());
return $field->toHtml();
......
......@@ -2,7 +2,7 @@
<config>
<tabs>
<obbase translate="label" module="obbase">
<label>OnlineBizSoft</label>
<label>STORE.ONLINEBIZSOFT.COM</label>
<sort_order>300</sort_order>
</obbase>
</tabs>
......@@ -37,7 +37,7 @@
</groups>
</managekey>
<obbase translate="label" module="obbase">
<label>Extensions Info</label>
<label>Installed Ext. Information</label>
<tab>obbase</tab>
<frontend_type>text</frontend_type>
<sort_order>9999</sort_order>
......@@ -46,7 +46,7 @@
<show_in_store>1</show_in_store>
<groups>
<installed_extensions translate="label">
<label>Installed OnlineBiz Extensions</label>
<label>Installed Extensions Version</label>
<frontend_type>text</frontend_type>
<frontend_model>obbase/system_config_form_fieldset_extensions</frontend_model>
<sort_order>2</sort_order>
......@@ -55,7 +55,7 @@
<show_in_store>1</show_in_store>
</installed_extensions>
<extensions_conflict translate="label">
<label>Extensions Conflict</label>
<label>Rewrites</label>
<frontend_type>text</frontend_type>
<frontend_model>obbase/system_config_form_fieldset_conflict</frontend_model>
<sort_order>3</sort_order>
......@@ -65,7 +65,7 @@
</extensions_conflict>
</groups>
</obbase>
<storeview translate="label" module="obbase">
<!--<storeview translate="label" module="obbase">
<label>Hot Plugins Today</label>
<tab>obbase</tab>
<frontend_type>text</frontend_type>
......@@ -84,6 +84,6 @@
<show_in_store>1</show_in_store>
</extensions>
</groups>
</storeview>
</storeview>-->
</sections>
</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