This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /* |
||
3 | You may not change or alter any portion of this comment or credits |
||
4 | of supporting developers from this source code or any supporting source code |
||
5 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
6 | |||
7 | This program is distributed in the hope that it will be useful, |
||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
10 | */ |
||
11 | |||
12 | /** |
||
13 | * page module |
||
14 | * |
||
15 | * @copyright XOOPS Project https://xoops.org/ |
||
16 | * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
||
17 | * @package page |
||
18 | * @since 2.6.0 |
||
19 | * @author DuGris (aka Laurent JEN) |
||
20 | * @author John Mordo (jlm69) |
||
21 | * @version $Id$ |
||
22 | */ |
||
23 | |||
24 | use Xoops\Core\Kernel\Handlers\XoopsGroupPermHandler; |
||
25 | |||
26 | defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
||
27 | |||
28 | /** |
||
29 | * Class AlumniGroupPermHandler |
||
30 | */ |
||
31 | class AlumniGroupPermHandler extends XoopsGroupPermHandler |
||
32 | { |
||
33 | /** |
||
34 | * Check permission |
||
35 | * |
||
36 | * @param string $gperm_name |
||
37 | * @param int $gperm_itemid |
||
38 | * @param array|int $gperm_groupid |
||
39 | * @param int $gperm_modid |
||
40 | * @param bool $trueifadmin |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function checkRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1, $trueifadmin = true) |
||
0 ignored issues
–
show
$gperm_name does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
45 | { |
||
46 | return parent::checkRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid, $trueifadmin); |
||
0 ignored issues
–
show
$gperm_name does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param $cid |
||
51 | * @param array $groups |
||
52 | */ |
||
53 | public function updatePerms($cid, $groups = []) |
||
54 | { |
||
55 | $module_id = Alumni::getInstance()->getModule()->getVar('mid'); |
||
0 ignored issues
–
show
$module_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
56 | |||
57 | $groups_exists = parent::getGroupIds('alumni_view', $cid, $module_id); |
||
0 ignored issues
–
show
$groups_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
58 | $groups_exists = array_values($groups_exists); |
||
0 ignored issues
–
show
$groups_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
59 | $groups_delete = array_diff(array_values($groups_exists), $groups); |
||
0 ignored issues
–
show
$groups_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
60 | $groups_add = array_diff($groups, array_values($groups_exists)); |
||
0 ignored issues
–
show
$groups_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
61 | |||
62 | $groups1_exists = parent::getGroupIds('alumni_submit', $cid, $module_id); |
||
0 ignored issues
–
show
$groups1_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
63 | $groups1_exists = array_values($groups1_exists); |
||
0 ignored issues
–
show
$groups1_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
64 | $groups1_delete = array_diff(array_values($groups1_exists), $groups); |
||
0 ignored issues
–
show
$groups1_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
65 | $groups1_add = array_diff($groups, array_values($groups1_exists)); |
||
0 ignored issues
–
show
$groups1_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
66 | |||
67 | $groups2_exists = parent::getGroupIds('alumni_premium', $cid, $module_id); |
||
0 ignored issues
–
show
$groups2_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
68 | $groups2_exists = array_values($groups2_exists); |
||
0 ignored issues
–
show
$groups2_exists does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
69 | $groups2_delete = array_diff(array_values($groups2_exists), $groups); |
||
0 ignored issues
–
show
$groups2_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
70 | $groups2_add = array_diff($groups, array_values($groups2_exists)); |
||
0 ignored issues
–
show
$groups2_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
71 | |||
72 | // delete alumni_view |
||
73 | View Code Duplication | if (0 != count($groups_delete)) { |
|
0 ignored issues
–
show
$groups_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
74 | $criteria = $criteria = new CriteriaCompo(); |
||
75 | $criteria->add(new Criteria('gperm_itemid', $cid)); |
||
76 | $criteria->add(new Criteria('gperm_modid', $module_id)); |
||
0 ignored issues
–
show
$module_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
77 | $criteria->add(new Criteria('gperm_name', 'alumni_view', '=')); |
||
78 | $criteria->add(new Criteria('gperm_groupid', '(' . implode(', ', $groups_delete) . ')', 'IN')); |
||
0 ignored issues
–
show
$groups_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
79 | if (parent::deleteAll($criteria)) { |
||
80 | } |
||
81 | } |
||
82 | |||
83 | // delete alumni_view |
||
84 | View Code Duplication | if (0 != count($groups1_delete)) { |
|
0 ignored issues
–
show
$groups1_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
85 | $criteria = $criteria = new CriteriaCompo(); |
||
86 | $criteria->add(new Criteria('gperm_itemid', $cid)); |
||
87 | $criteria->add(new Criteria('gperm_modid', $module_id)); |
||
0 ignored issues
–
show
$module_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
88 | $criteria->add(new Criteria('gperm_name', 'alumni_submit', '=')); |
||
89 | $criteria->add(new Criteria('gperm_groupid', '(' . implode(', ', $groups1_delete) . ')', 'IN')); |
||
0 ignored issues
–
show
$groups1_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
90 | if (parent::deleteAll($criteria)) { |
||
91 | } |
||
92 | } |
||
93 | |||
94 | // delete alumni_view |
||
95 | View Code Duplication | if (0 != count($groups2_delete)) { |
|
0 ignored issues
–
show
$groups2_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
96 | $criteria = $criteria = new CriteriaCompo(); |
||
97 | $criteria->add(new Criteria('gperm_itemid', $cid)); |
||
98 | $criteria->add(new Criteria('gperm_modid', $module_id)); |
||
0 ignored issues
–
show
$module_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
99 | $criteria->add(new Criteria('gperm_name', 'alumni_premium', '=')); |
||
100 | $criteria->add(new Criteria('gperm_groupid', '(' . implode(', ', $groups2_delete) . ')', 'IN')); |
||
0 ignored issues
–
show
$groups2_delete does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
101 | if (parent::deleteAll($criteria)) { |
||
102 | } |
||
103 | } |
||
104 | |||
105 | // Add alumni_view |
||
106 | if (0 != count($groups_add)) { |
||
0 ignored issues
–
show
$groups_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
107 | foreach ($groups_add as $group_id) { |
||
0 ignored issues
–
show
$groups_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
108 | parent::addRight('alumni_view', $cid, $group_id, $module_id); |
||
0 ignored issues
–
show
$group_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
109 | } |
||
110 | } |
||
111 | |||
112 | // Add alumni_submit |
||
113 | if (0 != count($groups1_add)) { |
||
0 ignored issues
–
show
$groups1_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
114 | foreach ($groups1_add as $group_id) { |
||
0 ignored issues
–
show
$groups1_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
115 | parent::addRight('alumni_submit', $cid, $group_id, $module_id); |
||
0 ignored issues
–
show
$group_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
116 | } |
||
117 | } |
||
118 | |||
119 | // Add alumni_submit |
||
120 | if (0 != count($groups2_add)) { |
||
0 ignored issues
–
show
$groups2_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
121 | foreach ($groups2_add as $group_id) { |
||
0 ignored issues
–
show
$groups2_add does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
122 | parent::addRight('alumni_premium', $cid, $group_id, $module_id); |
||
0 ignored issues
–
show
$group_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
123 | } |
||
124 | } |
||
125 | } |
||
126 | } |
||
127 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.