mambax7 /
smartfaq
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Module: SmartFAQ |
||
| 5 | * Author: The SmartFactory <www.smartfactory.ca> |
||
| 6 | * Licence: GNU |
||
| 7 | */ |
||
| 8 | |||
| 9 | use XoopsModules\Smartfaq; |
||
| 10 | |||
| 11 | require_once __DIR__ . '/admin_header.php'; |
||
| 12 | |||
| 13 | if (!Smartfaq\Utility::userIsAdmin()) { |
||
| 14 | redirect_header('<script>javascript:history.go(-1)</script>', 1, _NOPERM); |
||
| 15 | } |
||
| 16 | |||
| 17 | $op = ''; |
||
| 18 | |||
| 19 | foreach ($_POST as $k => $v) { |
||
| 20 | ${$k} = $v; |
||
| 21 | } |
||
| 22 | |||
| 23 | foreach ($_GET as $k => $v) { |
||
| 24 | ${$k} = $v; |
||
| 25 | } |
||
| 26 | |||
| 27 | switch ($op) { |
||
| 28 | case 'default': |
||
| 29 | default: |
||
| 30 | global $xoopsDB, $xoopsModule; |
||
| 31 | |||
| 32 | $adminObject = \Xmf\Module\Admin::getInstance(); |
||
| 33 | xoops_cp_header(); |
||
| 34 | $adminObject->displayNavigation(basename(__FILE__)); |
||
| 35 | // View Categories permissions |
||
| 36 | $item_list_view = []; |
||
| 37 | $block_view = []; |
||
| 38 | // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
||
| 39 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
||
| 40 | |||
| 41 | $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
||
| 42 | if ($xoopsDB->getRowsNum($result_view)) { |
||
| 43 | while (false !== ($myrow_view = $xoopsDB->fetchArray($result_view))) { |
||
| 44 | $item_list_view['cid'] = $myrow_view['categoryid']; |
||
| 45 | $item_list_view['title'] = $myrow_view['name']; |
||
| 46 | $form_view = new Smartfaq\GroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src=" |
||
| 47 | . XOOPS_URL |
||
| 48 | . '/modules/' |
||
| 49 | . $xoopsModule->dirname() |
||
| 50 | . "/assets/images/icon/close12.gif alt=''></a> " |
||
| 51 | . _AM_SF_PERMISSIONSVIEWMAN |
||
| 52 | . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
||
| 53 | . _AM_SF_VIEW_CATS |
||
| 54 | . '</span>', 'admin/permissions.php'); |
||
|
0 ignored issues
–
show
|
|||
| 55 | $block_view[] = $item_list_view; |
||
| 56 | foreach ($block_view as $itemlists) { |
||
| 57 | $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
||
| 58 | } |
||
| 59 | } |
||
| 60 | echo $form_view->render(); |
||
| 61 | } else { |
||
| 62 | echo "<img id='toptableicon' src=" |
||
| 63 | . XOOPS_URL |
||
| 64 | . '/modules/' |
||
| 65 | . $xoopsModule->dirname() |
||
| 66 | . "/assets/images/icon/close12.gif alt=''></a> " |
||
| 67 | . _AM_SF_PERMISSIONSVIEWMAN |
||
| 68 | . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
||
| 69 | . _AM_SF_NOPERMSSET |
||
| 70 | . '</span>'; |
||
| 71 | } |
||
| 72 | echo '</div>'; |
||
| 73 | |||
| 74 | echo "<br>\n"; |
||
| 75 | } |
||
| 76 | |||
| 77 | require_once __DIR__ . '/admin_footer.php'; |
||
| 78 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.