1 | <?php |
||||||
2 | /** |
||||||
3 | * ExtGallery User area |
||||||
4 | * |
||||||
5 | * You may not change or alter any portion of this comment or credits |
||||||
6 | * of supporting developers from this source code or any supporting source code |
||||||
7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||||||
8 | * This program is distributed in the hope that it will be useful, |
||||||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||||
11 | * |
||||||
12 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||||||
13 | * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
||||||
14 | * @author Zoullou (http://www.zoullou.net) |
||||||
15 | * @package ExtGallery |
||||||
16 | */ |
||||||
17 | |||||||
18 | use XoopsModules\Extgallery; |
||||||
19 | |||||||
20 | include __DIR__ . '/header.php'; |
||||||
21 | //require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php'; |
||||||
0 ignored issues
–
show
|
|||||||
22 | |||||||
23 | $GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-upload-applet.tpl'; |
||||||
24 | include XOOPS_ROOT_PATH . '/header.php'; |
||||||
0 ignored issues
–
show
|
|||||||
25 | |||||||
26 | $permHandler = Extgallery\PublicPermHandler::getInstance(); |
||||||
27 | if (count($permHandler->getAuthorizedPublicCat($GLOBALS['xoopsUser'], 'public_upload')) < 1) { |
||||||
28 | redirect_header('index.php', 3, _MD_EXTGALLERY_NOPERM); |
||||||
0 ignored issues
–
show
The function
redirect_header was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
29 | } |
||||||
30 | |||||||
31 | //echo "<pre>";print_r($xoopsModuleConfig);echo "</pre>"; |
||||||
32 | $_SESSION['juvar.tmpsize'] = 0; |
||||||
33 | $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory'); |
||||||
34 | |||||||
35 | $xoopsTpl->assign('categorySelect', $catHandler->getLeafSelect('cat_id', false, 0, '', 'public_upload')); |
||||||
36 | $xoopsTpl->assign('imageQuality', $xoopsModuleConfig['medium_quality'] / 100); |
||||||
37 | $xoopsTpl->assign('appletLang', _MD_EXTGALLERY_APPLET_LANG); |
||||||
38 | $xoopsTpl->assign('maxphotosize', $xoopsModuleConfig['max_photosize']); |
||||||
39 | |||||||
40 | if ($xoopsModuleConfig['save_large'] || $xoopsModuleConfig['save_original']) { |
||||||
41 | $xoopsTpl->assign('imageWidth', -1); |
||||||
42 | $xoopsTpl->assign('imageHeight', -1); |
||||||
43 | } else { |
||||||
44 | $xoopsTpl->assign('imageWidth', $xoopsModuleConfig['medium_width']); |
||||||
45 | $xoopsTpl->assign('imageHeight', $xoopsModuleConfig['medium_heigth']); |
||||||
46 | } |
||||||
47 | |||||||
48 | include XOOPS_ROOT_PATH . '/footer.php'; |
||||||
49 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.