| @@ 292-313 (lines=22) @@ | ||
| 289 | return null; |
|
| 290 | } |
|
| 291 | ||
| 292 | foreach ($mods as $mod) { |
|
| 293 | $sadmin = $moduleperm_handler->checkRight('module_admin', $mod->getVar('mid'), $xoopsUser->getGroups()); |
|
| 294 | if ($sadmin) { |
|
| 295 | $rtn = array(); |
|
| 296 | $info = $mod->getInfo(); |
|
| 297 | if (!empty($info ['adminindex'])) { |
|
| 298 | $rtn ['link'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['adminindex']; |
|
| 299 | } else { |
|
| 300 | $rtn ['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar('mid'); |
|
| 301 | } |
|
| 302 | $rtn ['title'] = htmlspecialchars($mod->getVar('name'), ENT_QUOTES); |
|
| 303 | $rtn ['description'] = $mod->getInfo('description'); |
|
| 304 | $rtn ['absolute'] = 1; |
|
| 305 | if (isset($info ['icon_big'])) { |
|
| 306 | $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['icon_big']; |
|
| 307 | } elseif (isset($info ['image'])) { |
|
| 308 | $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['image']; |
|
| 309 | } |
|
| 310 | ||
| 311 | $tpl->append('modules', $rtn); |
|
| 312 | } |
|
| 313 | } |
|
| 314 | } |
|
| 315 | } |
|
| 316 | ||
| @@ 331-352 (lines=22) @@ | ||
| 328 | if (is_object($xoopsModule) || !empty($_GET['xoopsorgnews'])) { |
|
| 329 | return null; |
|
| 330 | } |
|
| 331 | foreach ($mods as $mod) { |
|
| 332 | $rtn = array(); |
|
| 333 | $moduleperm_handler = xoops_getHandler('groupperm'); |
|
| 334 | $sadmin = $moduleperm_handler->checkRight('module_admin', $mod->getVar('mid'), $xoopsUser->getGroups()); |
|
| 335 | if ($sadmin) { |
|
| 336 | $info = $mod->getInfo(); |
|
| 337 | if (!empty($info['adminindex'])) { |
|
| 338 | $rtn['link'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info['adminindex']; |
|
| 339 | } else { |
|
| 340 | $rtn['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar('mid'); |
|
| 341 | } |
|
| 342 | $rtn['title'] = $mod->getVar('name'); |
|
| 343 | $rtn ['description'] = $mod->getInfo('description'); |
|
| 344 | $rtn['absolute'] = 1; |
|
| 345 | if (isset($info['icon_big'])) { |
|
| 346 | $rtn['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info['icon_big']; |
|
| 347 | } elseif (isset($info['image'])) { |
|
| 348 | $rtn['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info['image']; |
|
| 349 | } |
|
| 350 | } |
|
| 351 | $tpl->append('modules', $rtn); |
|
| 352 | } |
|
| 353 | } |
|
| 354 | } |
|
| 355 | ||
| @@ 325-346 (lines=22) @@ | ||
| 322 | return null; |
|
| 323 | } |
|
| 324 | ||
| 325 | foreach ($mods as $mod) { |
|
| 326 | $sadmin = $moduleperm_handler->checkRight('module_admin', $mod->getVar('mid'), $xoopsUser->getGroups()); |
|
| 327 | if ($sadmin) { |
|
| 328 | $rtn = array(); |
|
| 329 | $info = $mod->getInfo(); |
|
| 330 | if (!empty($info ['adminindex'])) { |
|
| 331 | $rtn ['link'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['adminindex']; |
|
| 332 | } else { |
|
| 333 | $rtn ['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar('mid'); |
|
| 334 | } |
|
| 335 | $rtn ['title'] = htmlspecialchars($mod->getVar('name'), ENT_QUOTES); |
|
| 336 | $rtn ['description'] = $mod->getInfo('description'); |
|
| 337 | $rtn ['absolute'] = 1; |
|
| 338 | if (isset($info ['icon_big'])) { |
|
| 339 | $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['icon_big']; |
|
| 340 | } elseif (isset($info ['image'])) { |
|
| 341 | $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['image']; |
|
| 342 | } |
|
| 343 | ||
| 344 | $tpl->append('modules', $rtn); |
|
| 345 | } |
|
| 346 | } |
|
| 347 | } |
|
| 348 | } |
|
| 349 | ||