Passed
Push — master ( 48ac06...ddb18f )
by Michael
35:01 queued 28:58
created

public-upload-extended.php (1 issue)

Labels
Severity
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
require_once __DIR__ . '/header.php';
21
//require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php';
22
23
$GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-upload-applet.tpl';
24
require_once XOOPS_ROOT_PATH . '/header.php';
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);
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'));
0 ignored issues
show
The method getLeafSelect() does not exist on XoopsObjectHandler. It seems like you code against a sub-type of XoopsObjectHandler such as XoopsPersistableObjectHandler. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
$xoopsTpl->assign('categorySelect', $catHandler->/** @scrutinizer ignore-call */ getLeafSelect('cat_id', false, 0, '', 'public_upload'));
Loading history...
36
$xoopsTpl->assign('imageQuality', $helper->getConfig('medium_quality') / 100);
37
$xoopsTpl->assign('appletLang', _MD_EXTGALLERY_APPLET_LANG);
38
$xoopsTpl->assign('maxphotosize', $helper->getConfig('max_photosize'));
39
40
if ($helper->getConfig('save_large') || $helper->getConfig('save_original')) {
41
    $xoopsTpl->assign('imageWidth', -1);
42
    $xoopsTpl->assign('imageHeight', -1);
43
} else {
44
    $xoopsTpl->assign('imageWidth', $helper->getConfig('medium_width'));
45
    $xoopsTpl->assign('imageHeight', $helper->getConfig('medium_heigth'));
46
}
47
48
require_once XOOPS_ROOT_PATH . '/footer.php';
49