Skip to content

Commit

Permalink
list up only visible modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Feb 8, 2013
1 parent 280496f commit bbdc910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions html/modules/legacy/admin/actions/BlockListAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ function executeViewIndex(&$controller, &$xoopsUser, &$render)
// naao added
$root =& XCube_Root::getSingleton();
$render->setAttribute('selectedMid', $root->mContext->mRequest->getRequest('selmid'));
$module_handler =& xoops_gethandler('module');
$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
$criteria->add(new Criteria('isactive', 1));
$criteria->add(new Criteria('weight', 0, '>'));
$view_modules = $module_handler->getObjects($criteria);
$render->setAttribute('view_modules', $view_modules);

//
// Load cache-time pattern objects and set.
Expand Down
2 changes: 1 addition & 1 deletion html/modules/legacy/admin/templates/block_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h3 class="admintitle"><{$smarty.const._MI_LEGACY_MENU_BLOCKLIST}></h3>
<select name="selmid">
<option value="0"><{$smarty.const._AD_LEGACY_LANG_ALL_MODULES}></option>
<option value="-1" <{if $selectedMid == -1}>selected="selected"<{/if}>><{$smarty.const._AD_LEGACY_LANG_TOPPAGE}></option>
<{foreach from=$modules item=module}>
<{foreach from=$view_modules item=module}>
<option value="<{$module->getVar('mid')}>" <{if $module->getVar('mid') == $selectedMid}>selected="selected"<{/if}>>
<{$module->getVar('name')}></option>
<{/foreach}>
Expand Down

0 comments on commit bbdc910

Please sign in to comment.