Passed
Push — master ( 757841...94ec22 )
by Goffy
06:13 queued 02:50
created
class/Common/FilesManagement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
33 33
                 }
34 34
 
35
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
35
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
36 36
             }
37 37
         } catch (\Throwable $e) {
38 38
             echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
         $dir = \opendir($src);
58 58
         //        @mkdir($dst);
59 59
         if (!@\mkdir($dst) && !\is_dir($dst)) {
60
-            throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
60
+            throw new \RuntimeException('The directory '.$dst.' could not be created.');
61 61
         }
62 62
         while (false !== ($file = \readdir($dir))) {
63 63
             if (('.' !== $file) && ('..' !== $file)) {
64
-                if (\is_dir($src . '/' . $file)) {
65
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
64
+                if (\is_dir($src.'/'.$file)) {
65
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
66 66
                 } else {
67
-                    \copy($src . '/' . $file, $dst . '/' . $file);
67
+                    \copy($src.'/'.$file, $dst.'/'.$file);
68 68
                 }
69 69
             }
70 70
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 self::rrmdir($fObj->getPathname());
155 155
             }
156 156
         }
157
-        $iterator = null;   // clear iterator Obj to close file/directory
157
+        $iterator = null; // clear iterator Obj to close file/directory
158 158
 
159 159
         return \rmdir($src); // remove the directory & return results
160 160
     }
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
         $iterator = new \DirectoryIterator($src);
189 189
         foreach ($iterator as $fObj) {
190 190
             if ($fObj->isFile()) {
191
-                \rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
191
+                \rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
192 192
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
193 193
                 // Try recursively on directory
194
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
194
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
195 195
                 //                rmdir($fObj->getPath()); // now delete the directory
196 196
             }
197 197
         }
198
-        $iterator = null;   // clear iterator Obj to close file/directory
198
+        $iterator = null; // clear iterator Obj to close file/directory
199 199
 
200 200
         return \rmdir($src); // remove the directory & return results
201 201
     }
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
         $iterator = new \DirectoryIterator($src);
233 233
         foreach ($iterator as $fObj) {
234 234
             if ($fObj->isFile()) {
235
-                \copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
235
+                \copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
236 236
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
237
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
237
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
238 238
             }
239 239
         }
240 240
 
Please login to merge, or discard this patch.
class/Common/Configurator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function __construct()
45 45
     {
46
-        $config = require \dirname(__DIR__, 2) . '/config/config.php';
46
+        $config = require \dirname(__DIR__, 2).'/config/config.php';
47 47
 
48 48
         $this->name            = $config->name;
49 49
         $this->paths           = $config->paths;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->moduleStats     = $config->moduleStats;
59 59
         $this->modCopyright    = $config->modCopyright;
60 60
 
61
-        $this->icons = require \dirname(__DIR__, 2) . '/config/icons.php';
62
-        $this->paths = require \dirname(__DIR__, 2) . '/config/paths.php';
61
+        $this->icons = require \dirname(__DIR__, 2).'/config/icons.php';
62
+        $this->paths = require \dirname(__DIR__, 2).'/config/paths.php';
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
class/MyiframeBase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * Copyright (c) Hervé Thouzard of Instant Zero (https://www.instant-zero.com)
9 9
  * ****************************************************************************
10 10
  */
11
-require_once XOOPS_ROOT_PATH . '/kernel/object.php';
11
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
12 12
 
13 13
 /**
14 14
  * Class Myiframe
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             if (\is_array($id)) {
43 43
                 $this->assignVars($id);
44 44
             } else {
45
-                $this->load((int)$id);
45
+                $this->load((int) $id);
46 46
             }
47 47
         } else {
48 48
             $this->setNew();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function load($id): void
56 56
     {
57
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe') . ' WHERE frame_frameid=' . (int)$id;
57
+        $sql   = 'SELECT * FROM '.$this->db->prefix('myiframe').' WHERE frame_frameid='.(int) $id;
58 58
         $myrow = $this->db->fetchArray($this->db->query($sql));
59 59
         $this->assignVars($myrow);
60 60
         if (!$myrow) {
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 /** @var Helper $helper */
12 12
 
13 13
 $GLOBALS['xoopsOption']['template_main'] = 'myiframe.tpl';
14
-require __DIR__ . '/header.php';
15
-require_once XOOPS_ROOT_PATH . '/header.php';
14
+require __DIR__.'/header.php';
15
+require_once XOOPS_ROOT_PATH.'/header.php';
16 16
 
17 17
 $tblalign = [];
18 18
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 if (isset($_GET)) {
21 21
     foreach ($_GET as $k => $v) {
22 22
         if ('IFRAMEID' !== \mb_strtoupper(trim($k))) {
23
-            $suplparam .= $k . '=' . $v . '&';
23
+            $suplparam .= $k.'='.$v.'&';
24 24
         }
25 25
     }
26 26
 }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 $iframeHandler = $helper->getHandler('MyiframeBase');
34 34
 
35 35
 if (Request::hasVar('iframeid', 'GET')) {
36
-    $tblalign     = [
36
+    $tblalign = [
37 37
         'top',
38 38
         'middle',
39 39
         'bottom',
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         'no',
46 46
         'auto',
47 47
     ];
48
-    $frameid      = Request::getInt('iframeid', 0, 'GET');
48
+    $frameid = Request::getInt('iframeid', 0, 'GET');
49 49
 
50 50
     $frame = $iframeHandler->get($frameid);
51 51
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         $xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
56 56
         $xoopsTpl->assign('width', $frame->getVar('frame_width'));
57 57
         $xoopsTpl->assign('height', $frame->getVar('frame_height'));
58
-        $xoopsTpl->assign('align', $tblalign[(string)($frame->getVar('frame_align') - 1)]);
58
+        $xoopsTpl->assign('align', $tblalign[(string) ($frame->getVar('frame_align')-1)]);
59 59
         $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder'));
60 60
         $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
61 61
         $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
62
-        $xoopsTpl->assign('scrolling', $tblscrolling[(string)($frame->getVar('frame_scrolling') - 1)]);
62
+        $xoopsTpl->assign('scrolling', $tblscrolling[(string) ($frame->getVar('frame_scrolling')-1)]);
63 63
         if ('' !== xoops_trim($suplparam)) {
64
-            $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
64
+            $xoopsTpl->assign('url', $frame->getVar('frame_url').'?'.$suplparam);
65 65
         } else {
66 66
             $xoopsTpl->assign('url', $frame->getVar('frame_url'));
67 67
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 } else {
75 75
     if (myiframe_getmoduleoption('showlist')) {
76
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php';
76
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php';
77 77
         $frarray = [];
78 78
         $critere = new \Criteria('1', '1', '=');
79 79
         $critere->setSort('frame_description');
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 if ('' === xoops_trim($frame->getVar('frame_description'))) {
85 85
                     $liendesc = $frame->getVar('frame_url');
86 86
                 } else {
87
-                    $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
87
+                    $liendesc = "<a href='".$baseurl.'?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
88 88
                 }
89 89
                 $iframe['list'] = $liendesc;
90 90
                 $xoopsTpl->append('iframes', $iframe);
@@ -95,4 +95,4 @@  discard block
 block discarded – undo
95 95
         $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
96 96
     }
97 97
 }
98
-require_once XOOPS_ROOT_PATH . '/footer.php';
98
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined.');
10 10
 
11
-require_once __DIR__ . '/preloads/autoloader.php';
11
+require_once __DIR__.'/preloads/autoloader.php';
12 12
 
13 13
 $moduleDirName      = \basename(__DIR__);
14 14
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
@@ -72,15 +72,15 @@  discard block
 block discarded – undo
72 72
 
73 73
 if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
74 74
     $i = 0;
75
-    require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
75
+    require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
76 76
     $myts = \MyTextSanitizer::getInstance();
77 77
     if (myiframe_getmoduleoption('showinmenu')) {
78
-        $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' ORDER BY frame_description';
78
+        $sql    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('myiframe').' ORDER BY frame_description';
79 79
         $result = $GLOBALS['xoopsDB']->query($sql);
80 80
         while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) {
81 81
             if ('' !== xoops_trim($myrow['frame_description'])) {
82 82
                 $modversion['sub'][$i]['name'] = htmlspecialchars($myrow['frame_description'], ENT_QUOTES | ENT_HTML5);
83
-                $modversion['sub'][$i]['url']  = 'index.php?iframeid=' . (int)$myrow['frame_frameid'];
83
+                $modversion['sub'][$i]['url']  = 'index.php?iframeid='.(int) $myrow['frame_frameid'];
84 84
                 $i++;
85 85
             }
86 86
         }
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 // Make Sample button visible?
108 108
 $modversion['config'][] = [
109 109
     'name'        => 'displaySampleButton',
110
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
111
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
110
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON',
111
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC',
112 112
     'formtype'    => 'yesno',
113 113
     'valuetype'   => 'int',
114 114
     'default'     => 1,
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 /** @var Admin $adminObject */
27 27
 /** @var Helper $helper */
28 28
 
29
-require dirname(__DIR__) . '/preloads/autoloader.php';
29
+require dirname(__DIR__).'/preloads/autoloader.php';
30 30
 
31
-require dirname(__DIR__, 3) . '/include/cp_header.php';
31
+require dirname(__DIR__, 3).'/include/cp_header.php';
32 32
 //require dirname(__DIR__, 3) . '/class/xoopsformloader.php';
33
-require dirname(__DIR__) . '/include/common.php';
33
+require dirname(__DIR__).'/include/common.php';
34 34
 
35 35
 $moduleDirName      = \basename(\dirname(__DIR__));
36 36
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
Please login to merge, or discard this patch.
admin/manage.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 use Xmf\Module\Admin;
11 11
 use Xmf\Request;
12 12
 
13
-require_once __DIR__ . '/admin_header.php';
14
-require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
13
+require_once __DIR__.'/admin_header.php';
14
+require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
15 15
 
16 16
 // Verify if the table is up to date
17 17
 if (!myiframe_FieldExists('frame_frameid', $GLOBALS['xoopsDB']->prefix('myiframe'))) {
18
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
-    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
-    header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
18
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
19
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
20
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
21
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
22
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
23
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
24
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
25
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
26
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
27
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
28
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
29
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe')." CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
30
+    $result = $GLOBALS['xoopsDB']->queryF('ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('myiframe').' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
31
+    header('Location : '.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
32 32
 }
33 33
 
34 34
 $module_id = $xoopsModule->getVar('mid');
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
  */
54 54
 function addEditForm($frameid, $Action, $FormTitle, $longdesc, $width, $height, $align, $frameborder, $marginwidth, $marginheight, $scrolling, $url, $LabelSubmitButton): void
55 55
 {
56
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
56
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
57 57
     global $xoopsModule;
58 58
 
59
-    $sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
59
+    $sform = new \XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php');
60 60
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
61 61
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
62 62
     $sform->addElement(new \XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     $buttonTray->addElement($cancel_btn);
95 95
     $sform->addElement($buttonTray);
96 96
     $sform->display();
97
-    require_once __DIR__ . '/admin_footer.php';
97
+    require_once __DIR__.'/admin_footer.php';
98 98
 }
99 99
 
100 100
 // ******************************************************************************************************************************************
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
                 $adminObject->displayNavigation(basename(__FILE__));
113 113
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
114 114
                 echo '<tr><td class="odd">';
115
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
116
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 1';
115
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
116
+                echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 1';
117 117
                 echo '</td></tr></table>';
118
-                require_once __DIR__ . '/admin_footer.php';
118
+                require_once __DIR__.'/admin_footer.php';
119 119
                 xoops_cp_footer();
120 120
                 exit();
121 121
             }
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
             $adminObject->displayNavigation(basename(__FILE__));
169 169
             echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
170 170
             echo '<tr><td class="odd">';
171
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
172
-            echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 2';
171
+            echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
172
+            echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 2';
173 173
             echo "</td></tr></table>\n";
174
-            require_once __DIR__ . '/admin_footer.php';
174
+            require_once __DIR__.'/admin_footer.php';
175 175
             xoops_cp_footer();
176 176
             exit();
177 177
         }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             xoops_cp_header();
182 182
             $adminObject = Admin::getInstance();
183 183
             $adminObject->displayNavigation(basename(__FILE__));
184
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
184
+            echo '<h4>'._AM_MYIFRAME_CONFIG.'</h4>';
185 185
             xoops_confirm(
186 186
                 [
187 187
                     'op'      => 'delete',
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
                 'manage.php',
192 192
                 _AM_MYIFRAME_RUSUREDEL
193 193
             );
194
-            require_once __DIR__ . '/admin_footer.php';
194
+            require_once __DIR__.'/admin_footer.php';
195 195
         } else {
196 196
             if (empty($_POST['frameid'])) {
197
-                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX . ' 3');
197
+                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX.' 3');
198 198
             }
199 199
             $frameid = Request::getInt('frameid', 0, 'POST');
200 200
             $critere = new \Criteria('frame_frameid', $frameid, '=');
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
                 $adminObject->displayNavigation(basename(__FILE__));
211 211
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
212 212
                 echo '<tr><td class="odd">';
213
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
214
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX . ' 4';
213
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
214
+                echo _AM_MYIFRAME_ERROR_ADD_INDEX.' 4';
215 215
                 echo "</td></tr></table>\n";
216
-                require_once __DIR__ . '/admin_footer.php';
216
+                require_once __DIR__.'/admin_footer.php';
217 217
                 xoops_cp_footer();
218 218
                 $adminObject = Admin::getInstance();
219 219
                 $adminObject->displayNavigation(basename(__FILE__));
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
234 234
             $res = $iframeHandler->insert($frame);
235 235
             if (!$res) {
236
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX . ' 5');
236
+                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX.' 5');
237 237
             }
238 238
             redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
239 239
         }
@@ -249,23 +249,23 @@  discard block
 block discarded – undo
249 249
         xoops_cp_header();
250 250
         $adminObject = Admin::getInstance();
251 251
         $adminObject->displayNavigation(basename(__FILE__));
252
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br>\n";
252
+        echo '<h4>'._AM_MYIFRAME_CONFIG."</h4><br>\n";
253 253
         echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
254
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>" . _AM_MYIFRAME_ACTION . "</th></tr>\n";
254
+        echo "<tr><th align='center'>"._AM_MYIFRAME_ID."</th><th align='center'>"._AM_MYIFRAME_DESC."</th><th align='center'>"._AM_MYIFRAME_CREATED."</th><th align='center'>"._AM_MYIFRAME_HITS."</th><th align='center'>"._AM_MYIFRAME_ACTION."</th></tr>\n";
255 255
         $critere = new \Criteria('1', '1', '=');
256 256
         $critere->setSort('frame_description');
257 257
         $frarray = $iframeHandler->getObjects($critere);
258 258
         $class   = 'even';
259
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
259
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php';
260 260
         if (count($frarray) > 0) {
261 261
             /** @var Myiframe $frame */
262 262
             foreach ($frarray as $frame) {
263
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
264
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
263
+                $action_edit   = "<a href='".$baseurl.'?op=edit&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/edit.png' alt='"._AM_MYIFRAME_EDIT."'></a>";
264
+                $action_delete = "<a href='".$baseurl.'?op=delete&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/delete.png' alt='"._AM_MYIFRAME_DELETE."'></a>";
265 265
                 if ('' === xoops_trim($frame->getVar('frame_description'))) {
266 266
                     $liendesc = $frame->getVar('frame_url');
267 267
                 } else {
268
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
268
+                    $liendesc = "<a href='".XOOPS_URL.'/modules/myiframe/index.php?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
269 269
                 }
270 270
                 echo "<tr class='"
271 271
                      . $class
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
                 $class = ('even' === $class) ? 'odd' : 'even';
286 286
             }
287 287
         }
288
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD . "'></td></tr>";
288
+        echo "<tr class='".$class."'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='"._AM_MYIFRAME_ADD."'></td></tr>";
289 289
         echo '</table>';
290
-        require_once __DIR__ . '/admin_footer.php';
290
+        require_once __DIR__.'/admin_footer.php';
291 291
         break;
292 292
 }
293 293
 
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Xmf\Module\Admin;
19 19
 use XoopsModules\Myiframe;
20 20
 
21
-require_once \dirname(__DIR__) . '/preloads/autoloader.php';
21
+require_once \dirname(__DIR__).'/preloads/autoloader.php';
22 22
 
23 23
 $moduleDirName      = \basename(\dirname(__DIR__));
24 24
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 //$categoryHandler     = new Myiframe\CategoryHandler($db);
38 38
 //$downloadHandler     = new Myiframe\DownloadHandler($db);
39 39
 
40
-if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
41
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
42
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
43
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
44
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
45
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
46
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
47
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
48
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
49
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
50
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
51
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
52
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
53
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
40
+if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) {
41
+    define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__)));
42
+    define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
43
+    define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
44
+    define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/');
45
+    define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/');
46
+    define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images');
47
+    define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/');
48
+    define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/');
49
+    define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php');
50
+    define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png');
51
+    define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash
52
+    define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash
53
+    define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1);
54 54
 }
55 55
 
56 56
 $pathIcon16 = Admin::iconUrl('', '16');
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 //$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
60 60
 
61 61
 $icons = [
62
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
63
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
64
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
65
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
66
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
67
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
68
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
69
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
70
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
62
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
63
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
64
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
65
+    'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
66
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
67
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
68
+    'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
69
+    '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
70
+    '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
71 71
 ];
72 72
 
73 73
 $debug = false;
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
     $pathModIcon32 = $helper->getModule()
89 89
                             ->getInfo('modicons32');
90 90
 
91
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
91
+    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16);
92 92
     $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
93 93
 }
Please login to merge, or discard this patch.
blocks/myiframe_iframe.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 /** @var Helper $helper */
17 17
 
18
-require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
18
+require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
19 19
 
20 20
 /**
21 21
  * @param $options
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         'left',
37 37
         'rigth',
38 38
     ];
39
-    $tblscrolling  = [
39
+    $tblscrolling = [
40 40
         'yes',
41 41
         'no',
42 42
         'auto',
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
         $block['longdesc']     = $frame->getVar('frame_description');
49 49
         $block['width']        = $frame->getVar('frame_width');
50 50
         $block['height']       = $frame->getVar('frame_height');
51
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
51
+        $block['align']        = $tblalign[$frame->getVar('frame_align')-1];
52 52
         $block['frameborder']  = $frame->getVar('frame_frameborder');
53 53
         $block['marginwidth']  = $frame->getVar('frame_marginwidth');
54 54
         $block['marginheight'] = $frame->getVar('frame_marginheight');
55
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
55
+        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling')-1];
56 56
         $block['url']          = $frame->getVar('frame_url');
57 57
     }
58 58
 
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
     $critere->setSort('frame_description');
78 78
     $frarray = $iframeHandler->getObjects($critere);
79 79
 
80
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
80
+    $form = ''._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
81 81
     /** @var Myiframe $oneframe */
82 82
     foreach ($frarray as $oneframe) {
83
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
83
+        $form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
84 84
         if ($options[0] == $oneframe->getVar('frame_frameid')) {
85 85
             $form .= " selected='selected'";
86 86
         }
87
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
87
+        $form .= '>'.$oneframe->getVar('frame_description').'</option>';
88 88
     }
89 89
     $form .= "</select>\n";
90 90
 
Please login to merge, or discard this patch.