Completed
Push — master ( 3e4ef4...d1a68a )
by Michael
01:42 queued 10s
created
class/contents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $form->addElement(new xoopsFormHidden('contents_id', $this->getVar('contents_id', 'e')));
103 103
 
104 104
         // Active
105
-        $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'),   ' ' . _YES . '', ' ' . _NO . '' );
105
+        $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'), ' ' . _YES . '', ' ' . _NO . '');
106 106
         $contents_active->setDescription(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE_DESC);
107 107
         $form->addElement($contents_active, false);
108 108
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $form->addElement($contents_weight, false);
128 128
 
129 129
         // Editor
130
-        $options_tray  = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>');
130
+        $options_tray = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>');
131 131
         if (class_exists('XoopsFormEditor')) {
132 132
             // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'],
133 133
             $editorConfigs = array('editor' => $xfHelper->getConfig('use_wysiwyg', 'dhtmltextarea'),
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         $ret = array();
300 300
         $sql  = 'SELECT contents_cid ';
301 301
         $sql .= 'FROM `' . $this->table . '` ';
302
-        $sql .= 'WHERE (contents_active =\''. XoopsfaqConstants::ACTIVE . '\') ';
302
+        $sql .= 'WHERE (contents_active =\'' . XoopsfaqConstants::ACTIVE . '\') ';
303 303
         $sql .= 'GROUP BY contents_cid';
304 304
         if (!$result = $this->db->query($sql)) {
305 305
             return $ret;
Please login to merge, or discard this patch.
class/utility.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $currentVersion = strtolower(str_replace('XOOPS ', '', XOOPS_VERSION));
44 44
         $requiredVersion = strtolower($module->getInfo('min_xoops'));
45
-        $vc = version_compare ($currentVersion , $requiredVersion);
46
-        $success = ($vc>=0);
45
+        $vc = version_compare($currentVersion, $requiredVersion);
46
+        $success = ($vc >= 0);
47 47
         if (false === $success) {
48 48
             xoops_loadLanguage('admin', $module->dirname());
49 49
             $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_XOOPS, $requiredVersion, $currentVersion));
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 static::rrmdir($fObj->getPathname());
160 160
             }
161 161
         }
162
-        $iterator = null;   // clear iterator Obj to close file/directory
162
+        $iterator = null; // clear iterator Obj to close file/directory
163 163
         return rmdir($src); // remove the directory & return results
164 164
     }
165 165
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 static::rmove($fObj->getPathname(), $dest . '/' . $fObj->getFilename());
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
 
@@ -232,11 +232,11 @@  discard block
 block discarded – undo
232 232
 
233 233
         // Open the source directory to read in files
234 234
         $iterator = new DirectoryIterator($src);
235
-        foreach($iterator as $fObj) {
236
-            if($fObj->isFile()) {
235
+        foreach ($iterator as $fObj) {
236
+            if ($fObj->isFile()) {
237 237
                 copy($fObj->getPathname(), $dest . '/' . $fObj->getFilename());
238
-            } else if(!$fObj->isDot() && $fObj->isDir()) {
239
-                static::rcopy($fObj->getPathname(), $dest . '/' . $fObj-getFilename());
238
+            } else if (!$fObj->isDot() && $fObj->isDir()) {
239
+                static::rcopy($fObj->getPathname(), $dest . '/' . $fObj - getFilename());
240 240
             }
241 241
         }
242 242
         return true;
@@ -257,19 +257,19 @@  discard block
 block discarded – undo
257 257
         xoops_loadLanguage('admin', $moduleDirName);
258 258
         $ret = '';
259 259
         if (null !== $value) {
260
-            foreach($icon_array as $_op => $icon) {
260
+            foreach ($icon_array as $_op => $icon) {
261 261
                 if (false === strpos($icon, '.')) {
262 262
                     $iconName = $icon;
263 263
                     $iconExt = 'png';
264 264
                 } else {
265
-                    $iconName = substr($icon, 0, strlen($icon)-strrchr($icon, '.'));
265
+                    $iconName = substr($icon, 0, strlen($icon) - strrchr($icon, '.'));
266 266
                     $iconExt  = substr(strrchr($icon, '.'), 1);
267 267
                 }
268 268
                 $url = (!is_numeric($_op)) ? $_op . '?' . $param . '=' . $value : xoops_getenv('PHP_SELF') . '?op=' . $iconName . '&amp;' . $param . '=' . $value;
269 269
                 if (null !== $extra) {
270 270
                     $url .= ' ' . $extra;
271 271
                 }
272
-                $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
272
+                $title = constant(htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
273 273
                 $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"'
274 274
                      . ' title ="' . $title . '"'
275 275
                      . ' alt = "' . $title . '"'
Please login to merge, or discard this patch.