Passed
Pull Request — master (#8)
by Michael
11:33
created
blocks/myiframe_iframe.php 1 patch
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -14,36 +14,36 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function b_myiframe_iframe_show($options)
16 16
 {
17
-    $block         = [];
18
-    $tblalign      = [
19
-        'top',
20
-        'middle',
21
-        'bottom',
22
-        'left',
23
-        'rigth',
24
-    ];
25
-    $tblscrolling  = [
26
-        'yes',
27
-        'no',
28
-        'auto',
29
-    ];
30
-    $iframeHandler = $helper->getHandler('MyiframeBase');
31
-    $frame         = null;
32
-    $frame         = $iframeHandler->get($options[0]);
17
+	$block         = [];
18
+	$tblalign      = [
19
+		'top',
20
+		'middle',
21
+		'bottom',
22
+		'left',
23
+		'rigth',
24
+	];
25
+	$tblscrolling  = [
26
+		'yes',
27
+		'no',
28
+		'auto',
29
+	];
30
+	$iframeHandler = $helper->getHandler('MyiframeBase');
31
+	$frame         = null;
32
+	$frame         = $iframeHandler->get($options[0]);
33 33
 
34
-    if (is_object($frame)) {
35
-        $block['longdesc']     = $frame->getVar('frame_description');
36
-        $block['width']        = $frame->getVar('frame_width');
37
-        $block['height']       = $frame->getVar('frame_height');
38
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
39
-        $block['frameborder']  = $frame->getVar('frame_frameborder');
40
-        $block['marginwidth']  = $frame->getVar('frame_marginwidth');
41
-        $block['marginheight'] = $frame->getVar('frame_marginheight');
42
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
43
-        $block['url']          = $frame->getVar('frame_url');
44
-    }
34
+	if (is_object($frame)) {
35
+		$block['longdesc']     = $frame->getVar('frame_description');
36
+		$block['width']        = $frame->getVar('frame_width');
37
+		$block['height']       = $frame->getVar('frame_height');
38
+		$block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
39
+		$block['frameborder']  = $frame->getVar('frame_frameborder');
40
+		$block['marginwidth']  = $frame->getVar('frame_marginwidth');
41
+		$block['marginheight'] = $frame->getVar('frame_marginheight');
42
+		$block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
43
+		$block['url']          = $frame->getVar('frame_url');
44
+	}
45 45
 
46
-    return $block;
46
+	return $block;
47 47
 }
48 48
 
49 49
 /**
@@ -52,25 +52,25 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function b_myiframe_iframe_edit($options)
54 54
 {
55
-    /** @var \MyiframeBaseHandler $iframeHandler */
56
-    $iframeHandler = $helper->getHandler('MyiframeBase');
57
-    $frarray       = [];
58
-    $critere       = new \Criteria('1', '1', '=');
59
-    $critere->setSort('frame_description');
60
-    $frarray = $iframeHandler->getObjects($critere);
55
+	/** @var \MyiframeBaseHandler $iframeHandler */
56
+	$iframeHandler = $helper->getHandler('MyiframeBase');
57
+	$frarray       = [];
58
+	$critere       = new \Criteria('1', '1', '=');
59
+	$critere->setSort('frame_description');
60
+	$frarray = $iframeHandler->getObjects($critere);
61 61
 
62
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
63
-    /** @var Myiframe $oneframe */
64
-    foreach ($frarray as $oneframe) {
65
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
66
-        if ($options[0] == $oneframe->getVar('frame_frameid')) {
67
-            $form .= " selected='selected'";
68
-        }
69
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
70
-    }
71
-    $form .= "</select>\n";
62
+	$form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
63
+	/** @var Myiframe $oneframe */
64
+	foreach ($frarray as $oneframe) {
65
+		$form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
66
+		if ($options[0] == $oneframe->getVar('frame_frameid')) {
67
+			$form .= " selected='selected'";
68
+		}
69
+		$form .= '>' . $oneframe->getVar('frame_description') . '</option>';
70
+	}
71
+	$form .= "</select>\n";
72 72
 
73
-    return $form;
73
+	return $form;
74 74
 }
75 75
 
76 76
 /**
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
  */
79 79
 function b_myiframe_iframe_onthefly($options): void
80 80
 {
81
-    $options = explode('|', $options);
82
-    $block   = b_myiframe_iframe_show($options);
81
+	$options = explode('|', $options);
82
+	$block   = b_myiframe_iframe_show($options);
83 83
 
84
-    $tpl = new \XoopsTpl();
85
-    $tpl->assign('block', $block);
86
-    $tpl->display('db:myiframe_block_show.tpl');
84
+	$tpl = new \XoopsTpl();
85
+	$tpl->assign('block', $block);
86
+	$tpl->display('db:myiframe_block_show.tpl');
87 87
 }
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -16,81 +16,81 @@
 block discarded – undo
16 16
 
17 17
 $suplparam = '';
18 18
 if (isset($_GET)) {
19
-    foreach ($_GET as $k => $v) {
20
-        if ('IFRAMEID' !== \mb_strtoupper(trim($k))) {
21
-            $suplparam .= $k . '=' . $v . '&';
22
-        }
23
-    }
19
+	foreach ($_GET as $k => $v) {
20
+		if ('IFRAMEID' !== \mb_strtoupper(trim($k))) {
21
+			$suplparam .= $k . '=' . $v . '&';
22
+		}
23
+	}
24 24
 }
25 25
 
26 26
 if (mb_strlen(xoops_trim($suplparam)) > 0) {
27
-    $suplparam = mb_substr($suplparam, 0, -1);
27
+	$suplparam = mb_substr($suplparam, 0, -1);
28 28
 }
29 29
 
30 30
 /** @var \MyiframeBaseHandler $iframeHandler */
31 31
 $iframeHandler = $helper->getHandler('MyiframeBase');
32 32
 
33 33
 if (Request::hasVar('iframeid', 'GET')) {
34
-    $tblalign     = [
35
-        'top',
36
-        'middle',
37
-        'bottom',
38
-        'left',
39
-        'rigth',
40
-    ];
41
-    $tblscrolling = [
42
-        'yes',
43
-        'no',
44
-        'auto',
45
-    ];
46
-    $frameid      = Request::getInt('iframeid', 0, 'GET');
34
+	$tblalign     = [
35
+		'top',
36
+		'middle',
37
+		'bottom',
38
+		'left',
39
+		'rigth',
40
+	];
41
+	$tblscrolling = [
42
+		'yes',
43
+		'no',
44
+		'auto',
45
+	];
46
+	$frameid      = Request::getInt('iframeid', 0, 'GET');
47 47
 
48
-    $frame = $iframeHandler->get($frameid);
48
+	$frame = $iframeHandler->get($frameid);
49 49
 
50
-    if (is_object($frame)) {
51
-        $iframeHandler->updatehits($frameid);
52
-        $xoopsTpl->assign('frameok', true);
53
-        $xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
54
-        $xoopsTpl->assign('width', $frame->getVar('frame_width'));
55
-        $xoopsTpl->assign('height', $frame->getVar('frame_height'));
56
-        $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]);
57
-        $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder'));
58
-        $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
59
-        $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
60
-        $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]);
61
-        if ('' !== xoops_trim($suplparam)) {
62
-            $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
63
-        } else {
64
-            $xoopsTpl->assign('url', $frame->getVar('frame_url'));
65
-        }
66
-        $title = $frame->getVar('frame_description');
67
-        myiframe_set_metas($title, $title);
68
-    } else {
69
-        $xoopsTpl->assign('frameok', false);
70
-        $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
71
-    }
50
+	if (is_object($frame)) {
51
+		$iframeHandler->updatehits($frameid);
52
+		$xoopsTpl->assign('frameok', true);
53
+		$xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
54
+		$xoopsTpl->assign('width', $frame->getVar('frame_width'));
55
+		$xoopsTpl->assign('height', $frame->getVar('frame_height'));
56
+		$xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]);
57
+		$xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder'));
58
+		$xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
59
+		$xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
60
+		$xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]);
61
+		if ('' !== xoops_trim($suplparam)) {
62
+			$xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
63
+		} else {
64
+			$xoopsTpl->assign('url', $frame->getVar('frame_url'));
65
+		}
66
+		$title = $frame->getVar('frame_description');
67
+		myiframe_set_metas($title, $title);
68
+	} else {
69
+		$xoopsTpl->assign('frameok', false);
70
+		$xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
71
+	}
72 72
 } else {
73
-    if (myiframe_getmoduleoption('showlist')) {
74
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php';
75
-        $frarray = [];
76
-        $critere = new \Criteria('1', '1', '=');
77
-        $critere->setSort('frame_description');
78
-        $frarray = $iframeHandler->getObjects($critere);
79
-        if (count($frarray) > 0) {
80
-            foreach ($frarray as $frame) {
81
-                /** @var Myiframe $frame */
82
-                if ('' === xoops_trim($frame->getVar('frame_description'))) {
83
-                    $liendesc = $frame->getVar('frame_url');
84
-                } else {
85
-                    $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
86
-                }
87
-                $iframe['list'] = $liendesc;
88
-                $xoopsTpl->append('iframes', $iframe);
89
-            }
90
-        }
91
-    } else {
92
-        $xoopsTpl->assign('frameok', false);
93
-        $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
94
-    }
73
+	if (myiframe_getmoduleoption('showlist')) {
74
+		$baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php';
75
+		$frarray = [];
76
+		$critere = new \Criteria('1', '1', '=');
77
+		$critere->setSort('frame_description');
78
+		$frarray = $iframeHandler->getObjects($critere);
79
+		if (count($frarray) > 0) {
80
+			foreach ($frarray as $frame) {
81
+				/** @var Myiframe $frame */
82
+				if ('' === xoops_trim($frame->getVar('frame_description'))) {
83
+					$liendesc = $frame->getVar('frame_url');
84
+				} else {
85
+					$liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
86
+				}
87
+				$iframe['list'] = $liendesc;
88
+				$xoopsTpl->append('iframes', $iframe);
89
+			}
90
+		}
91
+	} else {
92
+		$xoopsTpl->assign('frameok', false);
93
+		$xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
94
+	}
95 95
 }
96 96
 require_once XOOPS_ROOT_PATH . '/footer.php';
Please login to merge, or discard this patch.
class/Utility.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,5 +30,5 @@
 block discarded – undo
30 30
  */
31 31
 class Utility extends Common\SysUtility
32 32
 {
33
-    //--------------- Custom module methods -----------------------------
33
+	//--------------- Custom module methods -----------------------------
34 34
 }
Please login to merge, or discard this patch.
class/Constants.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -27,28 +27,28 @@
 block discarded – undo
27 27
  */
28 28
 final class Constants
29 29
 {
30
-    /**#@+
30
+	/**#@+
31 31
      * Constant definition
32 32
      */
33 33
 
34
-    const DISALLOW = 0;
35
-
36
-    /**
37
-     * no delay XOOPS redirect delay (in seconds)
38
-     */
39
-    const REDIRECT_DELAY_NONE = 0;
40
-    /**
41
-     * short XOOPS redirect delay (in seconds)
42
-     */
43
-    const REDIRECT_DELAY_SHORT = 1;
44
-    /**
45
-     * medium XOOPS redirect delay (in seconds)
46
-     */
47
-    const REDIRECT_DELAY_MEDIUM = 3;
48
-    /**
49
-     * long XOOPS redirect delay (in seconds)
50
-     */
51
-    const REDIRECT_DELAY_LONG = 7;
52
-
53
-    /**#@-*/
34
+	const DISALLOW = 0;
35
+
36
+	/**
37
+	 * no delay XOOPS redirect delay (in seconds)
38
+	 */
39
+	const REDIRECT_DELAY_NONE = 0;
40
+	/**
41
+	 * short XOOPS redirect delay (in seconds)
42
+	 */
43
+	const REDIRECT_DELAY_SHORT = 1;
44
+	/**
45
+	 * medium XOOPS redirect delay (in seconds)
46
+	 */
47
+	const REDIRECT_DELAY_MEDIUM = 3;
48
+	/**
49
+	 * long XOOPS redirect delay (in seconds)
50
+	 */
51
+	const REDIRECT_DELAY_LONG = 7;
52
+
53
+	/**#@-*/
54 54
 }
Please login to merge, or discard this patch.
class/Helper.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -23,60 +23,60 @@
 block discarded – undo
23 23
  */
24 24
 class Helper extends \Xmf\Module\Helper
25 25
 {
26
-    public $debug;
26
+	public $debug;
27 27
 
28
-    /**
29
-     * @param bool $debug
30
-     */
31
-    public function __construct($debug = false)
32
-    {
33
-        $this->debug   = $debug;
34
-        $moduleDirName = \basename(\dirname(__DIR__));
35
-        parent::__construct($moduleDirName);
36
-    }
28
+	/**
29
+	 * @param bool $debug
30
+	 */
31
+	public function __construct($debug = false)
32
+	{
33
+		$this->debug   = $debug;
34
+		$moduleDirName = \basename(\dirname(__DIR__));
35
+		parent::__construct($moduleDirName);
36
+	}
37 37
 
38
-    /**
39
-     * @return \XoopsModules\Myiframe\Helper
40
-     */
41
-    public static function getInstance(bool $debug = false): self
42
-    {
43
-        static $instance;
44
-        if (null === $instance) {
45
-            $instance = new static($debug);
46
-        }
38
+	/**
39
+	 * @return \XoopsModules\Myiframe\Helper
40
+	 */
41
+	public static function getInstance(bool $debug = false): self
42
+	{
43
+		static $instance;
44
+		if (null === $instance) {
45
+			$instance = new static($debug);
46
+		}
47 47
 
48
-        return $instance;
49
-    }
48
+		return $instance;
49
+	}
50 50
 
51
-    /**
52
-     * @return string
53
-     */
54
-    public function getDirname()
55
-    {
56
-        return $this->dirname;
57
-    }
51
+	/**
52
+	 * @return string
53
+	 */
54
+	public function getDirname()
55
+	{
56
+		return $this->dirname;
57
+	}
58 58
 
59
-    /**
60
-     * Get an Object Handler
61
-     *
62
-     * @param string $name name of handler to load
63
-     *
64
-     * @return bool|\XoopsObjectHandler|\XoopsPersistableObjectHandler
65
-     */
66
-    public function getHandler($name)
67
-    {
68
-        $ret = false;
59
+	/**
60
+	 * Get an Object Handler
61
+	 *
62
+	 * @param string $name name of handler to load
63
+	 *
64
+	 * @return bool|\XoopsObjectHandler|\XoopsPersistableObjectHandler
65
+	 */
66
+	public function getHandler($name)
67
+	{
68
+		$ret = false;
69 69
 
70
-        $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler';
71
-        if (!\class_exists($class)) {
72
-            throw new \RuntimeException("Class '$class' not found");
73
-        }
74
-        /** @var \XoopsMySQLDatabase $db */
75
-        $db     = \XoopsDatabaseFactory::getDatabaseConnection();
76
-        $helper = self::getInstance();
77
-        $ret    = new $class($db, $helper);
78
-        $this->addLog("Getting handler '{$name}'");
70
+		$class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler';
71
+		if (!\class_exists($class)) {
72
+			throw new \RuntimeException("Class '$class' not found");
73
+		}
74
+		/** @var \XoopsMySQLDatabase $db */
75
+		$db     = \XoopsDatabaseFactory::getDatabaseConnection();
76
+		$helper = self::getInstance();
77
+		$ret    = new $class($db, $helper);
78
+		$this->addLog("Getting handler '{$name}'");
79 79
 
80
-        return $ret;
81
-    }
80
+		return $ret;
81
+	}
82 82
 }
Please login to merge, or discard this patch.
class/Common/Breadcrumb.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -25,39 +25,39 @@  discard block
 block discarded – undo
25 25
  */
26 26
 class Breadcrumb
27 27
 {
28
-    public  $dirname;
29
-    private $bread = [];
28
+	public  $dirname;
29
+	private $bread = [];
30 30
 
31
-    public function __construct()
32
-    {
33
-        $this->dirname = \basename(\dirname(__DIR__, 2));
34
-    }
31
+	public function __construct()
32
+	{
33
+		$this->dirname = \basename(\dirname(__DIR__, 2));
34
+	}
35 35
 
36
-    /**
37
-     * Add link to breadcrumb
38
-     *
39
-     * @param string $title
40
-     * @param string $link
41
-     */
42
-    public function addLink($title = '', $link = ''): void
43
-    {
44
-        $this->bread[] = [
45
-            'link'  => $link,
46
-            'title' => $title,
47
-        ];
48
-    }
36
+	/**
37
+	 * Add link to breadcrumb
38
+	 *
39
+	 * @param string $title
40
+	 * @param string $link
41
+	 */
42
+	public function addLink($title = '', $link = ''): void
43
+	{
44
+		$this->bread[] = [
45
+			'link'  => $link,
46
+			'title' => $title,
47
+		];
48
+	}
49 49
 
50
-    /**
51
-     * Render BreadCrumb
52
-     */
53
-    public function render(): void
54
-    {
55
-        /*
50
+	/**
51
+	 * Render BreadCrumb
52
+	 */
53
+	public function render(): void
54
+	{
55
+		/*
56 56
         TODO if you want to use the render code below,
57 57
         1) create ./templates/chess_common_breadcrumb.tpl)
58 58
         2) add declaration to  xoops_version.php
59 59
         */
60
-        /*
60
+		/*
61 61
         if (!isset($GLOBALS['xoTheme']) || !\is_object($GLOBALS['xoTheme'])) {
62 62
             require $GLOBALS['xoops']->path('class/theme.php');
63 63
 
@@ -76,5 +76,5 @@  discard block
 block discarded – undo
76 76
 
77 77
         return $html;
78 78
         */
79
-    }
79
+	}
80 80
 }
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -19,127 +19,127 @@
 block discarded – undo
19 19
  */
20 20
 trait VersionChecks
21 21
 {
22
-    /**
23
-     * Verifies XOOPS version meets minimum requirements for this module
24
-     * @static
25
-     * @param \XoopsModule $module
26
-     *
27
-     * @param null|string  $requiredVer
28
-     * @return bool true if meets requirements, false if not
29
-     */
30
-    public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = null)
31
-    {
32
-        $moduleDirName      = \basename(\dirname(__DIR__, 2));
33
-        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
34
-        if (null === $module) {
35
-            $module = \XoopsModule::getByDirname($moduleDirName);
36
-        }
37
-        \xoops_loadLanguage('admin', $moduleDirName);
38
-        \xoops_loadLanguage('common', $moduleDirName);
22
+	/**
23
+	 * Verifies XOOPS version meets minimum requirements for this module
24
+	 * @static
25
+	 * @param \XoopsModule $module
26
+	 *
27
+	 * @param null|string  $requiredVer
28
+	 * @return bool true if meets requirements, false if not
29
+	 */
30
+	public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = null)
31
+	{
32
+		$moduleDirName      = \basename(\dirname(__DIR__, 2));
33
+		$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
34
+		if (null === $module) {
35
+			$module = \XoopsModule::getByDirname($moduleDirName);
36
+		}
37
+		\xoops_loadLanguage('admin', $moduleDirName);
38
+		\xoops_loadLanguage('common', $moduleDirName);
39 39
 
40
-        //check for minimum XOOPS version
41
-        $currentVer = mb_substr(\XOOPS_VERSION, 6); // get the numeric part of string
42
-        if (null === $requiredVer) {
43
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
44
-        }
45
-        $success = true;
40
+		//check for minimum XOOPS version
41
+		$currentVer = mb_substr(\XOOPS_VERSION, 6); // get the numeric part of string
42
+		if (null === $requiredVer) {
43
+			$requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
44
+		}
45
+		$success = true;
46 46
 
47
-        if (\version_compare($currentVer, $requiredVer, '<')) {
48
-            $success = false;
49
-            $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
50
-        }
47
+		if (\version_compare($currentVer, $requiredVer, '<')) {
48
+			$success = false;
49
+			$module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
50
+		}
51 51
 
52
-        return $success;
53
-    }
52
+		return $success;
53
+	}
54 54
 
55
-    /**
56
-     * Verifies PHP version meets minimum requirements for this module
57
-     * @static
58
-     * @param \XoopsModule|bool|null $module
59
-     *
60
-     * @return bool true if meets requirements, false if not
61
-     */
62
-    public static function checkVerPhp(\XoopsModule $module = null)
63
-    {
64
-        $moduleDirName      = \basename(\dirname(__DIR__, 2));
65
-        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
66
-        if (null === $module) {
67
-            $module = \XoopsModule::getByDirname($moduleDirName);
68
-        }
69
-        \xoops_loadLanguage('admin', $moduleDirName);
70
-        \xoops_loadLanguage('common', $moduleDirName);
55
+	/**
56
+	 * Verifies PHP version meets minimum requirements for this module
57
+	 * @static
58
+	 * @param \XoopsModule|bool|null $module
59
+	 *
60
+	 * @return bool true if meets requirements, false if not
61
+	 */
62
+	public static function checkVerPhp(\XoopsModule $module = null)
63
+	{
64
+		$moduleDirName      = \basename(\dirname(__DIR__, 2));
65
+		$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
66
+		if (null === $module) {
67
+			$module = \XoopsModule::getByDirname($moduleDirName);
68
+		}
69
+		\xoops_loadLanguage('admin', $moduleDirName);
70
+		\xoops_loadLanguage('common', $moduleDirName);
71 71
 
72
-        // check for minimum PHP version
73
-        $success = true;
72
+		// check for minimum PHP version
73
+		$success = true;
74 74
 
75
-        $verNum = \PHP_VERSION;
76
-        $reqVer = &$module->getInfo('min_php');
75
+		$verNum = \PHP_VERSION;
76
+		$reqVer = &$module->getInfo('min_php');
77 77
 
78
-        if (false !== $reqVer && '' !== $reqVer) {
79
-            if (\version_compare($verNum, $reqVer, '<')) {
80
-                $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
81
-                $success = false;
82
-            }
83
-        }
78
+		if (false !== $reqVer && '' !== $reqVer) {
79
+			if (\version_compare($verNum, $reqVer, '<')) {
80
+				$module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
81
+				$success = false;
82
+			}
83
+		}
84 84
 
85
-        return $success;
86
-    }
85
+		return $success;
86
+	}
87 87
 
88
-    /**
89
-     * compares current module version with the latest GitHub release
90
-     * @static
91
-     *
92
-     * @return string|array info about the latest module version, if newer
93
-     */
94
-    public static function checkVerModule(\Xmf\Module\Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
95
-    {
96
-        $moduleDirName      = \basename(\dirname(__DIR__, 2));
97
-        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
98
-        $update             = '';
99
-        $repository         = 'XoopsModules25x/' . $moduleDirName;
100
-        //        $repository         = 'XoopsModules25x/publisher'; //for testing only
101
-        $ret             = null;
102
-        $infoReleasesUrl = "https://api.github.com/repos/$repository/releases";
103
-        if ('github' === $source) {
104
-            if (\function_exists('curl_init') && false !== ($curlHandle = \curl_init())) {
105
-                \curl_setopt($curlHandle, \CURLOPT_URL, $infoReleasesUrl);
106
-                \curl_setopt($curlHandle, \CURLOPT_RETURNTRANSFER, true);
107
-                \curl_setopt($curlHandle, \CURLOPT_SSL_VERIFYPEER, true); //TODO: how to avoid an error when 'Peer's Certificate issuer is not recognized'
108
-                \curl_setopt($curlHandle, \CURLOPT_HTTPHEADER, ["User-Agent:Publisher\r\n"]);
109
-                $curlReturn = \curl_exec($curlHandle);
110
-                if (false === $curlReturn) {
111
-                    \trigger_error(\curl_error($curlHandle));
112
-                } elseif (false !== \mb_strpos($curlReturn, 'Not Found')) {
113
-                    \trigger_error('Repository Not Found: ' . $infoReleasesUrl);
114
-                } else {
115
-                    $file              = json_decode($curlReturn, false);
116
-                    $latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? \reset($file)->tag_name : $default);
117
-                    $latestVersion     = $file[0]->tag_name;
118
-                    $prerelease        = $file[0]->prerelease;
119
-                    if ('master' !== $latestVersionLink) {
120
-                        $update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion;
121
-                    }
122
-                    //"PHP-standardized" version
123
-                    $latestVersion = \mb_strtolower($latestVersion);
124
-                    if (false !== mb_strpos($latestVersion, 'final')) {
125
-                        $latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion));
126
-                        $latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion));
127
-                    }
128
-                    $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status'));
129
-                    //"PHP-standardized" version
130
-                    $moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion));
131
-                    //                    $moduleVersion = '1.0'; //for testing only
132
-                    //                    $moduleDirName = 'publisher'; //for testing only
133
-                    if (!$prerelease && \version_compare($moduleVersion, $latestVersion, '<')) {
134
-                        $ret   = [];
135
-                        $ret[] = $update;
136
-                        $ret[] = $latestVersionLink;
137
-                    }
138
-                }
139
-                \curl_close($curlHandle);
140
-            }
141
-        }
88
+	/**
89
+	 * compares current module version with the latest GitHub release
90
+	 * @static
91
+	 *
92
+	 * @return string|array info about the latest module version, if newer
93
+	 */
94
+	public static function checkVerModule(\Xmf\Module\Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
95
+	{
96
+		$moduleDirName      = \basename(\dirname(__DIR__, 2));
97
+		$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
98
+		$update             = '';
99
+		$repository         = 'XoopsModules25x/' . $moduleDirName;
100
+		//        $repository         = 'XoopsModules25x/publisher'; //for testing only
101
+		$ret             = null;
102
+		$infoReleasesUrl = "https://api.github.com/repos/$repository/releases";
103
+		if ('github' === $source) {
104
+			if (\function_exists('curl_init') && false !== ($curlHandle = \curl_init())) {
105
+				\curl_setopt($curlHandle, \CURLOPT_URL, $infoReleasesUrl);
106
+				\curl_setopt($curlHandle, \CURLOPT_RETURNTRANSFER, true);
107
+				\curl_setopt($curlHandle, \CURLOPT_SSL_VERIFYPEER, true); //TODO: how to avoid an error when 'Peer's Certificate issuer is not recognized'
108
+				\curl_setopt($curlHandle, \CURLOPT_HTTPHEADER, ["User-Agent:Publisher\r\n"]);
109
+				$curlReturn = \curl_exec($curlHandle);
110
+				if (false === $curlReturn) {
111
+					\trigger_error(\curl_error($curlHandle));
112
+				} elseif (false !== \mb_strpos($curlReturn, 'Not Found')) {
113
+					\trigger_error('Repository Not Found: ' . $infoReleasesUrl);
114
+				} else {
115
+					$file              = json_decode($curlReturn, false);
116
+					$latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? \reset($file)->tag_name : $default);
117
+					$latestVersion     = $file[0]->tag_name;
118
+					$prerelease        = $file[0]->prerelease;
119
+					if ('master' !== $latestVersionLink) {
120
+						$update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion;
121
+					}
122
+					//"PHP-standardized" version
123
+					$latestVersion = \mb_strtolower($latestVersion);
124
+					if (false !== mb_strpos($latestVersion, 'final')) {
125
+						$latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion));
126
+						$latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion));
127
+					}
128
+					$moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status'));
129
+					//"PHP-standardized" version
130
+					$moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion));
131
+					//                    $moduleVersion = '1.0'; //for testing only
132
+					//                    $moduleDirName = 'publisher'; //for testing only
133
+					if (!$prerelease && \version_compare($moduleVersion, $latestVersion, '<')) {
134
+						$ret   = [];
135
+						$ret[] = $update;
136
+						$ret[] = $latestVersionLink;
137
+					}
138
+				}
139
+				\curl_close($curlHandle);
140
+			}
141
+		}
142 142
 
143
-        return $ret;
144
-    }
143
+		return $ret;
144
+	}
145 145
 }
Please login to merge, or discard this patch.
class/Common/TestdataButtons.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 use Xmf\{
26
-    Module\Admin,
27
-    Request,
28
-    Yaml
26
+	Module\Admin,
27
+	Request,
28
+	Yaml
29 29
 };
30 30
 use XoopsModules\Myiframe\{
31
-    Helper
31
+	Helper
32 32
 };
33 33
 
34 34
 /** @var Helper $helper */
@@ -40,64 +40,64 @@  discard block
 block discarded – undo
40 40
  */
41 41
 class TestdataButtons
42 42
 {
43
-    /** Button status constants */
44
-    private const SHOW_BUTTONS = 1;
45
-    private const HIDE_BUTTONS = 0;
43
+	/** Button status constants */
44
+	private const SHOW_BUTTONS = 1;
45
+	private const HIDE_BUTTONS = 0;
46 46
 
47
-    /**
48
-     * Load the test button configuration
49
-     *
50
-     * @param \Xmf\Module\Admin $adminObject
51
-     *
52
-     * @return void
53
-     */
54
-    public static function loadButtonConfig(Admin $adminObject): void
55
-    {
56
-        $moduleDirName      = \basename(\dirname(__DIR__, 2));
57
-        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
58
-        $helper              = Helper::getInstance();
59
-        $yamlFile            = $helper->path('/config/admin.yml');
60
-        $config             = Yaml::readWrapped($yamlFile); // work with phpmyadmin YAML dumps
61
-        $displaySampleButton = $config['displaySampleButton'];
47
+	/**
48
+	 * Load the test button configuration
49
+	 *
50
+	 * @param \Xmf\Module\Admin $adminObject
51
+	 *
52
+	 * @return void
53
+	 */
54
+	public static function loadButtonConfig(Admin $adminObject): void
55
+	{
56
+		$moduleDirName      = \basename(\dirname(__DIR__, 2));
57
+		$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
58
+		$helper              = Helper::getInstance();
59
+		$yamlFile            = $helper->path('/config/admin.yml');
60
+		$config             = Yaml::readWrapped($yamlFile); // work with phpmyadmin YAML dumps
61
+		$displaySampleButton = $config['displaySampleButton'];
62 62
 
63
-        if (self::SHOW_BUTTONS == $displaySampleButton) {
64
-            \xoops_loadLanguage('admin/modulesadmin', 'system');
65
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA'), $helper->url('testdata/index.php?op=load'), 'add');
66
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), $helper->url('testdata/index.php?op=save'), 'add');
67
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA'), $helper->url('testdata/index.php?op=clear'), 'alert');
68
-            //    $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), $helper->url( 'testdata/index.php?op=exportschema'), 'add');
69
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
70
-        } else {
71
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
72
-            // $displaySampleButton = $config['displaySampleButton'];
73
-        }
74
-    }
63
+		if (self::SHOW_BUTTONS == $displaySampleButton) {
64
+			\xoops_loadLanguage('admin/modulesadmin', 'system');
65
+			$adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA'), $helper->url('testdata/index.php?op=load'), 'add');
66
+			$adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), $helper->url('testdata/index.php?op=save'), 'add');
67
+			$adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA'), $helper->url('testdata/index.php?op=clear'), 'alert');
68
+			//    $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), $helper->url( 'testdata/index.php?op=exportschema'), 'add');
69
+			$adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
70
+		} else {
71
+			$adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
72
+			// $displaySampleButton = $config['displaySampleButton'];
73
+		}
74
+	}
75 75
 
76
-    /**
77
-     * Hide the test buttons
78
-     *
79
-     * @return void
80
-     */
81
-    public static function hideButtons(): void
82
-    {
83
-        $yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
84
-        $app                        = [];
85
-        $app['displaySampleButton'] = 0;
86
-        Yaml::save($app, $yamlFile);
87
-        \redirect_header('index.php', 0, '');
88
-    }
76
+	/**
77
+	 * Hide the test buttons
78
+	 *
79
+	 * @return void
80
+	 */
81
+	public static function hideButtons(): void
82
+	{
83
+		$yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
84
+		$app                        = [];
85
+		$app['displaySampleButton'] = 0;
86
+		Yaml::save($app, $yamlFile);
87
+		\redirect_header('index.php', 0, '');
88
+	}
89 89
 
90
-    /**
91
-     * Show the test buttons
92
-     *
93
-     * @return void
94
-     */
95
-    public static function showButtons(): void
96
-    {
97
-        $yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
98
-        $app                        = [];
99
-        $app['displaySampleButton'] = 1;
100
-        Yaml::save($app, $yamlFile);
101
-        \redirect_header('index.php', 0, '');
102
-    }
90
+	/**
91
+	 * Show the test buttons
92
+	 *
93
+	 * @return void
94
+	 */
95
+	public static function showButtons(): void
96
+	{
97
+		$yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
98
+		$app                        = [];
99
+		$app['displaySampleButton'] = 1;
100
+		Yaml::save($app, $yamlFile);
101
+		\redirect_header('index.php', 0, '');
102
+	}
103 103
 }
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -19,60 +19,60 @@
 block discarded – undo
19 19
  */
20 20
 trait ServerStats
21 21
 {
22
-    /**
23
-     * serverStats()
24
-     *
25
-     * @return string
26
-     */
27
-    public static function getServerStats()
28
-    {
29
-        //mb    $wfdownloads = WfdownloadsWfdownloads::getInstance();
30
-        $moduleDirName      = \basename(\dirname(__DIR__, 2));
31
-        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
32
-        \xoops_loadLanguage('common', $moduleDirName);
33
-        $html = '';
34
-        //        $sql   = 'SELECT metavalue';
35
-        //        $sql   .= ' FROM ' . $GLOBALS['xoopsDB']->prefix('wfdownloads_meta');
36
-        //        $sql   .= " WHERE metakey='version' LIMIT 1";
37
-        //        $query = $GLOBALS['xoopsDB']->query($sql);
38
-        //        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
39
-        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n";
40
-        $html .= "<div style='padding: 8px;'>\n";
41
-        //        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n";
42
-        //        $html .= "<br>\n";
43
-        //        $html .= "<br>\n";
44
-        $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n";
45
-        $html .= "<ul>\n";
22
+	/**
23
+	 * serverStats()
24
+	 *
25
+	 * @return string
26
+	 */
27
+	public static function getServerStats()
28
+	{
29
+		//mb    $wfdownloads = WfdownloadsWfdownloads::getInstance();
30
+		$moduleDirName      = \basename(\dirname(__DIR__, 2));
31
+		$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
32
+		\xoops_loadLanguage('common', $moduleDirName);
33
+		$html = '';
34
+		//        $sql   = 'SELECT metavalue';
35
+		//        $sql   .= ' FROM ' . $GLOBALS['xoopsDB']->prefix('wfdownloads_meta');
36
+		//        $sql   .= " WHERE metakey='version' LIMIT 1";
37
+		//        $query = $GLOBALS['xoopsDB']->query($sql);
38
+		//        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
39
+		$html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n";
40
+		$html .= "<div style='padding: 8px;'>\n";
41
+		//        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n";
42
+		//        $html .= "<br>\n";
43
+		//        $html .= "<br>\n";
44
+		$html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n";
45
+		$html .= "<ul>\n";
46 46
 
47
-        $gdlib = \function_exists('gd_info') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
-        $html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
49
-        if (\function_exists('gd_info')) {
50
-            if (true === ($gdlib = gd_info())) {
51
-                $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
52
-            }
53
-        }
54
-        //
55
-        //    $safemode = ini_get('safe_mode') ? constant('CO_' . $moduleDirNameUpper . '_ON') . constant('CO_' . $moduleDirNameUpper . '_SAFEMODEPROBLEMS : constant('CO_' . $moduleDirNameUpper . '_OFF');
56
-        //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SAFEMODESTATUS . $safemode;
57
-        //
58
-        //    $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
59
-        //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60
-        //
61
-        $downloads = \ini_get('file_uploads') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
-        $html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
47
+		$gdlib = \function_exists('gd_info') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
+		$html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
49
+		if (\function_exists('gd_info')) {
50
+			if (true === ($gdlib = gd_info())) {
51
+				$html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
52
+			}
53
+		}
54
+		//
55
+		//    $safemode = ini_get('safe_mode') ? constant('CO_' . $moduleDirNameUpper . '_ON') . constant('CO_' . $moduleDirNameUpper . '_SAFEMODEPROBLEMS : constant('CO_' . $moduleDirNameUpper . '_OFF');
56
+		//    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SAFEMODESTATUS . $safemode;
57
+		//
58
+		//    $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
59
+		//    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60
+		//
61
+		$downloads = \ini_get('file_uploads') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
+		$html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
63 63
 
64
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . \ini_get('upload_max_filesize') . "</span></b>\n";
65
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . \ini_get('post_max_size') . "</span></b>\n";
66
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . \ini_get('memory_limit') . "</span></b>\n";
67
-        $html .= "</ul>\n";
68
-        $html .= "<ul>\n";
69
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n";
70
-        $html .= "</ul>\n";
71
-        $html .= "<br>\n";
72
-        $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n";
73
-        $html .= '</div>';
74
-        $html .= '</fieldset><br>';
64
+		$html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . \ini_get('upload_max_filesize') . "</span></b>\n";
65
+		$html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . \ini_get('post_max_size') . "</span></b>\n";
66
+		$html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . \ini_get('memory_limit') . "</span></b>\n";
67
+		$html .= "</ul>\n";
68
+		$html .= "<ul>\n";
69
+		$html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n";
70
+		$html .= "</ul>\n";
71
+		$html .= "<br>\n";
72
+		$html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n";
73
+		$html .= '</div>';
74
+		$html .= '</fieldset><br>';
75 75
 
76
-        return $html;
77
-    }
76
+		return $html;
77
+	}
78 78
 }
Please login to merge, or discard this patch.