-
-
Notifications
You must be signed in to change notification settings - Fork 2
update modern theme #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b8fe355
931eb3d
33acbc0
57cbd59
ef19868
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -243,18 +243,21 @@ private function getModuleStats(&$tpl) | |
| { | ||
| /** @var XoopsModuleHandler $module_handler */ | ||
| $module_handler = xoops_getHandler('module'); | ||
|
|
||
| $criteria = new CriteriaCompo(); | ||
| $criteria->add(new Criteria('hasmain', 1)); | ||
| // active modules | ||
| $criteria->add(new Criteria('isactive', 1)); | ||
|
|
||
| $active_modules = $module_handler->getCount($criteria); | ||
|
|
||
| $criteria_all = new Criteria('dirname', '', '!='); | ||
| $total_modules = $module_handler->getCount($criteria_all); | ||
| // active modules for user side | ||
| $criteria->add(new Criteria('hasmain', 1)); | ||
| $active_modules_user = $module_handler->getCount($criteria); | ||
|
|
||
| $tpl->assign('active_modules', $active_modules); | ||
| $tpl->assign('total_modules', $total_modules); | ||
| $tpl->assign('inactive_modules', $total_modules - $active_modules); | ||
| $tpl->assign('active_modules_user', $active_modules_user); | ||
| // Modules without a frontend entry (hasmain=0) are admin-only by XOOPS design. | ||
| // Every active module has at least hasmain=1 or hasadmin=1, so this subtraction | ||
| // equals querying isactive=1 AND hasmain=0 without an extra DB round-trip. | ||
| $tpl->assign('active_modules_admin', $active_modules - $active_modules_user); | ||
|
Comment on lines
247
to
+260
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.