Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vanilla-thunder committed Mar 22, 2021
1 parent 9ba7bca commit 305ae55
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Application/Controller/Admin/DevMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function getModuleExtensions()
//print $e->getMessage() . "<br/>";
//var_dump(strpos($e->getMessage(), $extension."_parent"));
try { $status = (class_exists($extension) ? 1 : -1); }
catch (\Throwable $e) { $status = (strpos($e->getMessage(), $extension . "_parent") > 0 ? 1 : -1); }
catch (\Throwable $e) { $status = (strpos($e->getMessage(), "_parent") > 0 ? 1 : -1); }
}
else $status = file_exists($sModulesDir.DIRECTORY_SEPARATOR.$extension.".php") && is_readable($sModulesDir.DIRECTORY_SEPARATOR.$extension.".php");

Expand Down
7 changes: 4 additions & 3 deletions Application/Controller/Admin/DevModuleMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ public function getMetadataConfiguration()
if (array_key_exists("settings", $aModule)) {
$settings = [];
foreach ($aModule["settings"] as $var) {
//if(!array_key_exists($var["group"],$settings)) $settings[$var["group"]] = [];
//$settings[$var["group"]][$var["name"]] = $var; //["type"];
$settings[$var["name"]] = $var; //["type"];
}
ksort($settings);
$aModule["settings"] = $settings;
}

Expand Down Expand Up @@ -182,7 +183,7 @@ public function getDbConfiguration()
->from('oxconfig')
->where('oxshopid = :shopId')
->andWhere('oxmodule = :oxmodule')
->orderBy("OXVARNAME")
->orderBy("OXID")
->setParameters([
'configKey' => $oConfig->getConfigParam("sConfigKey"),
'shopId' => Registry::getConfig()->getShopId(),
Expand All @@ -195,7 +196,7 @@ public function getDbConfiguration()
}
$aModule["settings"][$var["OXVARNAME"]] = $var;
}
ksort($aModule["settings"]);
//ksort($aModule["settings"]);

return $aModule;
}
Expand Down
2 changes: 1 addition & 1 deletion Application/views/admin/devutils_metadata.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<h5 ng-bind="_module"></h5>
<table class="striped ml+ mt">
<tr ng-repeat="_block in _blocks | filter:{OXTHEME:search.atplblockstheme}:false | filter:{OXTEMPLATE:search.atplblockstemplate}:false | filter:{OXBLOCKNAME:search.atplblocksblock}:false track by $index" ng-if="(_blocks | filter:{OXTHEME:search.atplblockstheme}:false | filter:{OXTEMPLATE:search.atplblockstemplate}:false | filter:{OXBLOCKNAME:search.atplblocksblock}:false).length > 0">
<td class="center-align">
<td class="center-align" style="width: 100px;">
<span class="pb" ng-if="_block.OXACTIVE">ON</span>
<span class="pb" ng-if="!_block.OXACTIVE">OFF</span>
<div class="switch mt">
Expand Down
42 changes: 22 additions & 20 deletions Application/views/admin/devutils_modulemetadata.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,32 @@
</thead>
<tbody>
<tr>
<th class="p-"><h4 class="p- m-">metadata.php</h4><!---[{$oMetadataConf|@var_dump}]--></th>
<th class="p-"><h4 class="p- m-">metadata.php</h4></th>
<th></th>
<th class="p-"><h4 class="p- m-">yaml</h4><!--[{$oYamlConf|@var_dump}]--></th>
<th class="p-"><h4 class="p- m-">yaml</h4></th>
<th></th>
<th class="p-"><h4 class="p- m-">database</h4><!--[{$oDbConf|@var_dump}]--></th>
<th class="p-"><h4 class="p- m-">database</h4></th>
</tr>
<tr>
<td class="p-">
<div>[{$oMetadataConf.title}]</div><hr/>
<div>version [{$oMetadataConf.version}]</div><hr/>
[{* <div>source/modules/[{$oMetadataConf.path}]</div><hr/> *}]
<div>[{$oMetadataConf.description}]</div>
<div>[{$oMetadataConf.description|@reset}]</div>
</td>
<td class="p-"></td>
<td class="p- [{if $oYamlConf->getTitle()|@reset !== $oMetadataConf.title || $oYamlConf->getVersion() !== $oMetadataConf.version || $oYamlConf->getDescription()|@reset !== $oMetadataConf.description}]red lighten-5[{/if}]">
<td class="p- [{* if $oYamlConf->getTitle()|@reset !== $oMetadataConf.title || $oYamlConf->getVersion() !== $oMetadataConf.version || $oYamlConf->getDescription()|@reset !== $oMetadataConf.description}]red lighten-5[{/if *}]">
<div [{if $oYamlConf->getTitle()|@reset !== $oMetadataConf.title}]class="red-text"[{/if}]>[{$oYamlConf->getTitle()|@reset}]</div><hr/>
<div [{if $oYamlConf->getVersion() !== $oMetadataConf.version}]class="red-text"[{/if}]>version [{$oYamlConf->getVersion()}]</div><hr/>
[{* <div [{if $oYamlConf->getPath() !== $oMetadataConf.path}]class="red-text"[{/if}]>source/modules/[{$oYamlConf->getPath()}]</div><hr/> *}]
<div [{if $oYamlConf->getDescription()|@reset !== $oMetadataConf.description}]class="red-text"[{/if}]>[{$oYamlConf->getDescription()|@reset}]</div>
<div [{if $oYamlConf->getDescription()|@reset !== $oMetadataConf.description|@reset}]class="red-text"[{/if}]>[{$oYamlConf->getDescription()|@reset}]</div>
</td>
<td class="p-"></td>
<td class="p- [{if $oDbConf.version !== $oMetadataConf.version}]red lighten-5[{/if}]">
<div>Title is not cached</div><hr/>
<div><i>Title is not cached</i></div><hr/>
<div [{if $oDbConf.version !== $oMetadataConf.version}]class="red-text"[{/if}]>version [{$oDbConf.version}]</div><hr/>
[{* <div [{if $oDbConf.path !== $oMetadataConf.path}]class="red-text"[{/if}]>source/modules/[{$oDbConf.path}]</div><hr/> *}]
<div>Description is not cached</div>
<div><i>Description is not cached</i></div>
</td>
</tr>
Expand Down Expand Up @@ -177,15 +177,17 @@
<td [{if $oYamlConf->getTemplates()|@count !== $oMetadataConf.templates|@count}]class="red lighten-5"[{/if}]>
[{if !$oYamlConf->getTemplates()|@count}][{oxmultilang ident="DEVUTILS_NO_ENTRIES"}][{/if}]
[{foreach from=$oYamlConf->getTemplates() name="data" item="_item"}]
<b>[{$_item->getTemplateKey()}]</b><div><small>[{$_item->getTemplatePath()}]</small></div>
<b>[{$_item->getTemplateKey()}]</b>
<div><small>[{$_item->getTemplatePath()}]</small></div>
[{if !$smarty.foreach.data.last}]<hr/>[{/if}]
[{/foreach}]
</td>
<td></td>
<td [{if $oDbConf.templates|@count !== $oMetadataConf.templates|@count}]class="red lighten-5"[{/if}]>
[{if !$oDbConf.templates|@count}][{oxmultilang ident="DEVUTILS_NO_ENTRIES"}][{/if}]
[{foreach from=$oDbConf.templates name="data" key="_key" item="_item"}]
<b>[{$_key}]</b><div><small>[{$_item}]</small></div>
<b>[{$_key}]</b>
<div><small>[{$_item}]</small></div>
[{if !$smarty.foreach.data.last}]<hr/>[{/if}]
[{/foreach}]
</td>
Expand All @@ -195,18 +197,18 @@
<tr>
<td>
[{foreach from=$oMetadataConf.blocks name="data" key="_key" item="_item"}]
<div class="[{if !$oDbConf.blocks[$_key]}]green-text[{/if}]">
<b>[{$_key}]</b> [{if $_item.check}][{$tplok}][{else}][{$tplnf}][{/if}]
<div><small>[template] [{$_item.template}]</small></div>
<div><small>[file] [{$_item.file}]</small></div>
</div>
<div class="[{if !$oDbConf.blocks[$_key]}]green-text[{/if}]">
<b>[{$_key}]</b> [{if $_item.check}][{$tplok}][{else}][{$tplnf}][{/if}]
<div><small>[template] [{$_item.template}]</small></div>
<div><small>[file] [{$_item.file}]</small></div>
</div>
[{if !$smarty.foreach.data.last}]<hr/>[{/if}]
[{/foreach}]
</td>
<td></td>
<td [{if $oYamlConf->getTemplateBlocks() && $oYamlConf->getTemplateBlocks()|@count !== $oMetadataConf.blocks|@count}]class="red lighten-5"[{/if}]>
[{if !$oYamlConf->getTemplateBlocks()|@count}][{oxmultilang ident="DEVUTILS_NO_ENTRIES"}][{/if}]
[{foreach from=$oYamlConf->getTemplateBlocks() item="_item"}]
[{foreach from=$oYamlConf->getTemplateBlocks() name="data" item="_item"}]
<b>[{$_item->getBlockName()}]</b> - pos [{$_item->getPosition()}] / theme [{$_item->getTheme()|default:"*"}]
<div><small>[template] [{$_item->getShopTemplatePath()}]</small></div>
<div><small>[file] [{$_item->getModuleTemplatePath()}]</small></div>
Expand All @@ -229,22 +231,22 @@
<tr><th colspan="5" class="divider"><h4>settings</h4></th></tr>
<tr>
<td>
[{foreach from=$oMetadataConf.settings name="data" key="_key" item="_item"}]
<div><b>[{$_item.name}]</b> ([{$_item.type}]): [{$_item.value|@var_export}]</div>
[{foreach from=$oMetadataConf.settings item="_item"}]
<div><b>[{$_item.name}]</b> ([{$_item.type}]) [{* : [{$_item.value|@var_export *}]</div>
[{/foreach}]
</td>
<td></td>
<td [{if $oYamlConf->getModuleSettings() && $oYamlConf->getModuleSettings()|@count !== $oMetadataConf.settings|@count}]class="red lighten-5"[{/if}]>
[{if !$oYamlConf->getModuleSettings()|@count}][{oxmultilang ident="DEVUTILS_NO_ENTRIES"}][{/if}]
[{foreach from=$oYamlConf->getModuleSettings() item="_item"}]
<div><b>[{$_item->getName()}]</b> ([{$_item->getType()}]): [{$_item->getValue()|@var_export}]</div>
<div><b>[{$_item->getName()}]</b> ([{$_item->getType()}])</div>
[{/foreach}]
</td>
<td></td>
<td [{if $oDbConf.settings|@count !== $oMetadataConf.settings|@count}]class="red lighten-5"[{/if}]>
[{foreach from=$oDbConf.settings name="data" key="_key" item="_item"}]
<div class="[{if !$oMetadataConf.settings[$_key]}]red-text[{/if}]">
<b>[{$_item.OXVARNAME}]</b> ([{$_item.OXVARTYPE}]): [{$_item.OXVARVALUE|@var_export}]
<b>[{$_item.OXVARNAME}]</b> ([{$_item.OXVARTYPE}])
</div>
[{/foreach}]
</td>
Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'title' => '[vt] DevUtils',
'description' => 'developent utilities for OXID eShop V6.2',
'thumbnail' => 'devutils.jpg',
'version' => '2.0.0',
'version' => '2.1.0',
'author' => 'Marat Bedoev',
'email' => openssl_decrypt("Az6pE7kPbtnTzjHlPhPCa4ktJLphZ/w9gKgo5vA//p4=", str_rot13("nrf-128-pop"), str_rot13("gvalzpr")),
'url' => 'https://github.com/vanilla-thunder/oxid-module-devutils',
Expand Down

0 comments on commit 305ae55

Please sign in to comment.