Completed
Push — master ( b0c184...5f4391 )
by Michael
20s queued 11s
created
class/Contact.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $form->addElement(new \XoopsFormLabel(_AM_CONTACT_TO, '', ''));
80 80
         $form->addElement(new \XoopsFormText(_AM_CONTACT_NAMETO, 'contact_nameto', 50, 255, $this->getVar('contact_name')), true);
81 81
         $form->addElement(new \XoopsFormText(_AM_CONTACT_MAILTO, 'contact_mailto', 50, 255, $this->getVar('contact_mail')), true);
82
-        $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE . $this->getVar('contact_subject')), true);
82
+        $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE.$this->getVar('contact_subject')), true);
83 83
         $form->addElement(new \XoopsFormTextArea(_AM_CONTACT_MESSAGE, 'contact_message', '', 5, 60), true);
84 84
         $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
85 85
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public function toArray()
95 95
     {
96 96
         $ret  = [];
97
-        $vars =& $this->getVars();
97
+        $vars = & $this->getVars();
98 98
         foreach (array_keys($vars) as $i) {
99 99
             $ret [$i] = $this->getVar($i);
100 100
         }
Please login to merge, or discard this patch.
class/Common/Configurator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *
21 21
  */
22 22
 
23
-require_once dirname(__DIR__) . '/include/common.php';
23
+require_once dirname(__DIR__).'/include/common.php';
24 24
 
25 25
 /**
26 26
  * Class Configurator
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 class Configurator
29 29
 {
30 30
     public $uploadFolders   = [];
31
-    public $blankFiles  = [];
31
+    public $blankFiles = [];
32 32
     public $templateFolders = [];
33 33
     public $oldFiles        = [];
34 34
     public $oldFolders      = [];
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         $capsDirName          = strtoupper($moduleDirName);
44 44
         $this->name           = 'Module Configurator';
45 45
         $this->uploadFolders  = [
46
-            constant($capsDirName . '_UPLOAD_PATH'),
47
-            constant($capsDirName . '_UPLOAD_PATH') . '/content',
48
-            constant($capsDirName . '_UPLOAD_PATH') . '/images',
49
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/category',
50
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails',
46
+            constant($capsDirName.'_UPLOAD_PATH'),
47
+            constant($capsDirName.'_UPLOAD_PATH').'/content',
48
+            constant($capsDirName.'_UPLOAD_PATH').'/images',
49
+            constant($capsDirName.'_UPLOAD_PATH').'/images/category',
50
+            constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails',
51 51
         ];
52 52
         $this->blankFiles = [
53
-            constant($capsDirName . '_UPLOAD_PATH'),
54
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/category',
55
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails',
53
+            constant($capsDirName.'_UPLOAD_PATH'),
54
+            constant($capsDirName.'_UPLOAD_PATH').'/images/category',
55
+            constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails',
56 56
         ];
57 57
 
58 58
         $this->templateFolders = [
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             '/templates/admin/'
62 62
 
63 63
         ];
64
-        $this->oldFiles        = [
64
+        $this->oldFiles = [
65 65
             '/class/request.php',
66 66
             '/class/registry.php',
67 67
             '/class/utilities.php',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             '/include/functions.php',
71 71
             '/ajaxrating.txt'
72 72
         ];
73
-        $this->oldFolders      = [
73
+        $this->oldFolders = [
74 74
             '/images',
75 75
             '/css',
76 76
             '/js',
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
         //        $sql   .= " WHERE metakey='version' LIMIT 1";
35 35
         //        $query = $GLOBALS['xoopsDB']->query($sql);
36 36
         //        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
37
-        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n";
37
+        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n";
38 38
         $html .= "<div style='padding: 8px;'>\n";
39 39
         //        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n";
40 40
         //        $html .= "<br>\n";
41 41
         //        $html .= "<br>\n";
42
-        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n";
42
+        $html .= '<div>'.constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n";
43 43
         $html .= "<ul>\n";
44 44
         //
45
-        $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
46
-        $html  .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
45
+        $gdlib = function_exists('gd_info') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>';
46
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib;
47 47
         if (function_exists('gd_info')) {
48 48
             if (true === ($gdlib = gd_info())) {
49
-                $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
49
+                $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>';
50 50
             }
51 51
         }
52 52
         //
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
         //    $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
57 57
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
58 58
         //
59
-        $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
60
-        $html      .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
59
+        $downloads = ini_get('file_uploads') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>';
60
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads;
61 61
         //
62
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n";
63
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . "</span></b>\n";
64
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . ini_get('memory_limit') . "</span></b>\n";
62
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.ini_get('upload_max_filesize')."</span></b>\n";
63
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.ini_get('post_max_size')."</span></b>\n";
64
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.ini_get('memory_limit')."</span></b>\n";
65 65
         $html .= "</ul>\n";
66 66
         $html .= "<ul>\n";
67
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n";
67
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n";
68 68
         $html .= "</ul>\n";
69 69
         $html .= "<br>\n";
70
-        $html .= constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n";
70
+        $html .= constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n";
71 71
         $html .= '</div>';
72 72
         $html .= '</fieldset><br>';
73 73
 
Please login to merge, or discard this patch.
class/Common/Breadcrumb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         require_once $GLOBALS['xoops']->path('class/template.php');
71 71
         $breadcrumbTpl = new \XoopsTpl();
72 72
         $breadcrumbTpl->assign('breadcrumb', $this->bread);
73
-        $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl');
73
+        $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl');
74 74
         unset($breadcrumbTpl);
75 75
 
76 76
         return $html;
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +10 added lines, -10 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 (\Exception $e) {
38 38
             echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
         if (!mkdir($dst) && !is_dir($dst)) {
61 61
             while (false !== ($file = readdir($dir))) {
62 62
                 if (('.' !== $file) && ('..' !== $file)) {
63
-                    if (is_dir($src . '/' . $file)) {
64
-                        self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
63
+                    if (is_dir($src.'/'.$file)) {
64
+                        self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
65 65
                     } else {
66
-                        copy($src . '/' . $file, $dst . '/' . $file);
66
+                        copy($src.'/'.$file, $dst.'/'.$file);
67 67
                     }
68 68
                 }
69 69
             }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 self::rrmdir($fObj->getPathname());
159 159
             }
160 160
         }
161
-        $iterator = null;   // clear iterator Obj to close file/directory
161
+        $iterator = null; // clear iterator Obj to close file/directory
162 162
         return rmdir($src); // remove the directory & return results
163 163
     }
164 164
 
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
         $iterator = new \DirectoryIterator($src);
192 192
         foreach ($iterator as $fObj) {
193 193
             if ($fObj->isFile()) {
194
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
194
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
195 195
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
196 196
                 // Try recursively on directory
197
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
197
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
198 198
                 //                rmdir($fObj->getPath()); // now delete the directory
199 199
             }
200 200
         }
201
-        $iterator = null;   // clear iterator Obj to close file/directory
201
+        $iterator = null; // clear iterator Obj to close file/directory
202 202
         return rmdir($src); // remove the directory & return results
203 203
     }
204 204
 
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
         $iterator = new \DirectoryIterator($src);
235 235
         foreach ($iterator as $fObj) {
236 236
             if ($fObj->isFile()) {
237
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
237
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
238 238
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
239
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
239
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
240 240
             }
241 241
         }
242 242
         return true;
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
         //check for minimum XOOPS version
38 38
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
39 39
         if (null === $requiredVer) {
40
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
40
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
41 41
         }
42
-        $success     = true;
42
+        $success = true;
43 43
 
44 44
         if (version_compare($currentVer, $requiredVer, '<')) {
45
-            $success     = false;
46
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
45
+            $success = false;
46
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
47 47
         }
48 48
 
49 49
         return $success;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $reqVer  = $module->getInfo('min_php');
67 67
         if (false !== $reqVer && '' !== $reqVer) {
68 68
             if (version_compare($verNum, $reqVer, '<')) {
69
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
69
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
70 70
                 $success = false;
71 71
             }
72 72
         }
Please login to merge, or discard this patch.
class/helper0.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     protected function __construct($debug)
61 61
     {
62 62
         $this->debug = $debug;
63
-        $this->dirname =  basename(dirname(__DIR__));
63
+        $this->dirname = basename(dirname(__DIR__));
64 64
     }
65 65
     /*
66 66
     *  @static function getInstance
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $this->addLog("ERROR :: CONFIG '{$name}' does not exist");
114 114
             return null;
115 115
         }
116
-        $this->addLog("Getting config '{$name}' : " . $this->config[$name]);
116
+        $this->addLog("Getting config '{$name}' : ".$this->config[$name]);
117 117
         return $this->config[$name];
118 118
     }
119 119
     /*
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             $this->initConfig();
133 133
         }
134 134
         $this->config[$name] = $value;
135
-        $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
135
+        $this->addLog("Setting config '{$name}' : ".$this->config[$name]);
136 136
         return $this->config[$name];
137 137
     }
138 138
     /*
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function getHandler($name)
147 147
     {
148
-        if (!isset($this->handler[$name . 'Handler'])) {
148
+        if (!isset($this->handler[$name.'Handler'])) {
149 149
             $this->initHandler($name);
150 150
         }
151 151
         $this->addLog("Getting handler '{$name}'");
152
-        return $this->handler[$name . 'Handler'];
152
+        return $this->handler[$name.'Handler'];
153 153
     }
154 154
     /*
155 155
     *  @static function initModule
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function initHandler($name)
189 189
     {
190
-        $this->addLog('INIT ' . $name . ' HANDLER');
191
-        $this->handler[$name . 'Handler'] = xoops_getModuleHandler($name, $this->dirname);
190
+        $this->addLog('INIT '.$name.' HANDLER');
191
+        $this->handler[$name.'Handler'] = xoops_getModuleHandler($name, $this->dirname);
192 192
     }
193 193
     /*
194 194
     *  @static function addLog
Please login to merge, or discard this patch.
class/ContactHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,9 +138,9 @@
 block discarded – undo
138 138
 
139 139
         $subjectPrefix = '';
140 140
         if ($GLOBALS['xoopsModuleConfig']['form_dept'] && $GLOBALS['xoopsModuleConfig']['subject_prefix'] && $GLOBALS['xoopsModuleConfig']['contact_dept']) {
141
-            $subjectPrefix = '[' . $GLOBALS['xoopsModuleConfig']['prefix_text'] . ' ' . $contact['contact_department'] . ']: ';
141
+            $subjectPrefix = '['.$GLOBALS['xoopsModuleConfig']['prefix_text'].' '.$contact['contact_department'].']: ';
142 142
         }
143
-        $xoopsMailer->setSubject($subjectPrefix . html_entity_decode($contact['contact_subject'], ENT_QUOTES, 'UTF-8'));
143
+        $xoopsMailer->setSubject($subjectPrefix.html_entity_decode($contact['contact_subject'], ENT_QUOTES, 'UTF-8'));
144 144
         $xoopsMailer->setBody(html_entity_decode($contact['contact_message'], ENT_QUOTES, 'UTF-8'));
145 145
         if ($xoopsMailer->send()) {
146 146
             $message = _MD_CONTACT_MES_SEND;
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 $moduleDirName = basename(__DIR__);
23
-include __DIR__ . '/../../mainfile.php';
24
-include __DIR__ . '/class/contact.php';
25
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
23
+include __DIR__.'/../../mainfile.php';
24
+include __DIR__.'/class/contact.php';
25
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
26 26
 
27 27
 /** @var ContactContactHandler $contactHandler*/
28 28
 $contactHandler = Contact\Helper::getInstance()->getHandler('Contact');
Please login to merge, or discard this patch.