Completed
Push — master ( f622d7...06cba9 )
by
unknown
09:22
created
class/utility.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                 self::rrmdir($fObj->getPathname());
183 183
             }
184 184
         }
185
-        $iterator = null;   // clear iterator Obj to close file/directory
185
+        $iterator = null; // clear iterator Obj to close file/directory
186 186
         return rmdir($src); // remove the directory & return results
187 187
     }
188 188
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 self::rmove($fObj->getPathname(), $dest . '/' . $fObj->getFilename());
222 222
             }
223 223
         }
224
-        $iterator = null;   // clear iterator Obj to close file/directory
224
+        $iterator = null; // clear iterator Obj to close file/directory
225 225
         return rmdir($src); // remove the directory & return results
226 226
     }
227 227
 
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
 
256 256
         // Open the source directory to read in files
257 257
         $iterator = new DirectoryIterator($src);
258
-        foreach($iterator as $fObj) {
259
-            if($fObj->isFile()) {
258
+        foreach ($iterator as $fObj) {
259
+            if ($fObj->isFile()) {
260 260
                 copy($fObj->getPathname(), $dest . '/' . $fObj->getFilename());
261
-            } else if(!$fObj->isDot() && $fObj->isDir()) {
262
-                self::rcopy($fObj->getPathname(), $dest . '/' . $fObj-getFilename());
261
+            } else if (!$fObj->isDot() && $fObj->isDir()) {
262
+                self::rcopy($fObj->getPathname(), $dest . '/' . $fObj - getFilename());
263 263
             }
264 264
         }
265 265
         return true;
@@ -280,19 +280,19 @@  discard block
 block discarded – undo
280 280
         xoops_loadLanguage('admin', $moduleDirName);
281 281
         $ret = '';
282 282
         if (null !== $value) {
283
-            foreach($icon_array as $_op => $icon) {
283
+            foreach ($icon_array as $_op => $icon) {
284 284
                 if (false === strpos($icon, '.')) {
285 285
                     $iconName = $icon;
286 286
                     $iconExt = 'png';
287 287
                 } else {
288
-                    $iconName = substr($icon, 0, strlen($icon)-strrchr($icon, '.'));
288
+                    $iconName = substr($icon, 0, strlen($icon) - strrchr($icon, '.'));
289 289
                     $iconExt  = substr(strrchr($icon, '.'), 1);
290 290
                 }
291 291
                 $url = (!is_numeric($_op)) ? $_op . '?' . $param . '=' . $value : xoops_getenv('PHP_SELF') . '?op=' . $iconName . '&' . $param . '=' . $value;
292 292
                 if (null !== $extra) {
293 293
                     $url .= ' ' . $extra;
294 294
                 }
295
-                $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
295
+                $title = constant(htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
296 296
                 $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"'
297 297
                      . ' title ="' . $title . '"'
298 298
                      . ' alt = "' . $title . '"'
Please login to merge, or discard this patch.
class/contents.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 
96 96
         include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
97 97
 
98
-        $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW: sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title'));
98
+        $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW : sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title'));
99 99
         $form = new XoopsThemeForm($caption, 'content', $_SERVER['REQUEST_URI'], 'post', true);
100 100
 //        $form->addElement(new XoopsFormHiddenToken());
101 101
         $form->addElement(new xoopsFormHidden('op', 'save'));
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'),
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $criteria->setStart(0);
255 255
             $criteria->setLimit(0);
256 256
         } else {
257
-            $obj['list']  = $this->getObjects($sort, false);
257
+            $obj['list'] = $this->getObjects($sort, false);
258 258
         }
259 259
         $obj['list'] = $this->getObjects($criteria, false);
260 260
         $obj['count'] = (false !== $obj['list']) ? count($obj['list']) : 0;
Please login to merge, or discard this patch.
include/onupdate.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
         $oldFiles = array($xfHelper->path('include/functions.php'),
131 131
                             $xsHelper->path('class/utilities.php')
132 132
         );
133
-        foreach($oldFiles as $file) {
133
+        foreach ($oldFiles as $file) {
134 134
             if (is_file($file)) {
135 135
                 if (false === ($delOk = unlink($file))) {
136 136
                     $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_REMOVE, $file));
Please login to merge, or discard this patch.
include/search.inc.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
         return $ret;
44 44
     }
45 45
 
46
-    $moduleDirName = basename(dirname(__DIR__)) ;
46
+    $moduleDirName = basename(dirname(__DIR__));
47 47
     xoops_load('constants', $moduleDirName);
48 48
 
49 49
     $xfHelper = Xmf\Module\Helper::getHelper($moduleDirName);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     $catCount   = !empty($catArray) ? count($catArray) : 0;
70 70
     $totalLimit = (int)$limit - $catCount;
71 71
     foreach ($catArray as $cId => $cat) {
72
-        $ret[] = array ('image' => 'assets/images/folder.png',
72
+        $ret[] = array('image' => 'assets/images/folder.png',
73 73
                          'link' => $xfHelper->url('index.php?cat_id=' . $cId),
74 74
                         'title' => $cat['category_title'],
75 75
         );
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
     $contentArray = $xfFaqHandler->getAll($criteria, $contentFields, false);
101 101
     foreach ($contentArray as $content) {
102
-        $ret[] = array ('image' => 'assets/images/question2.gif',
102
+        $ret[] = array('image' => 'assets/images/question2.gif',
103 103
                          'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
104 104
                         'title' => $content['contents_title'],
105 105
                          'time' => $content['contents_publish'],
Please login to merge, or discard this patch.
include/sitemap.plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
 
26 26
     $myts = MyTextSanitizer::getInstance();
27 27
 
28
-    $moduleDirName = basename(dirname(__DIR__)) ;
28
+    $moduleDirName = basename(dirname(__DIR__));
29 29
     $xfHelper      = Xmf\Module\Helper::getHelper($moduleDirName);
30 30
     $xfCatHandler  = $xfHelper->getHandler('category');
31 31
     $catList       = $xfCatHandler->getList();
32 32
 
33
-    $retVal = array() ;
34
-    foreach ($catList as $id=>$title){
33
+    $retVal = array();
34
+    foreach ($catList as $id=>$title) {
35 35
         $retVal['parent'][] = array('id' => $id,
36 36
                                  'title' => $myts->htmlSpecialChars($title),
37 37
                                    'url' => $xfHelper->url('index.php?cat_id=' . $id)
Please login to merge, or discard this patch.
include/rss.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     $retVal = array();
55 55
 
56 56
     foreach ($contentObjs as $contentObj) {
57
-        $retVal[] = array ('image' => '',
57
+        $retVal[] = array('image' => '',
58 58
                            'title' => $contentObj->getVar('contents_title'),
59 59
                             'link' => $contentObj->getVar('contents_contents'),
60 60
                             'time' => $contentObj->getVar('contents_publish'),
Please login to merge, or discard this patch.
admin/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $catCount = $xfCatHandler->getCount();
100 100
         $adminObject->displayNavigation(basename(__FILE__));
101 101
         if (!empty($catCount)) {
102
-            $adminObject->addItemButton(_AM_XOOPSFAQ_CREATE_NEW, basename(__FILE__) . '?op=edit', 'add' , '');
102
+            $adminObject->addItemButton(_AM_XOOPSFAQ_CREATE_NEW, basename(__FILE__) . '?op=edit', 'add', '');
103 103
             $adminObject->displayButton('left');
104 104
         }
105 105
         $xfFaqHandler->displayAdminListing('weight');
Please login to merge, or discard this patch.
admin/category.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         break;
81 81
 
82 82
     case 'save':
83
-        if ( ($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity) ) {
84
-            if ( !$GLOBALS['xoopsSecurity']->check() ) {
83
+        if (($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity)) {
84
+            if (!$GLOBALS['xoopsSecurity']->check()) {
85 85
                 // failed xoops security check
86 86
                 $xfHelper->redirect('admin/index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true));
87 87
             }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     case 'default':
110 110
     default:
111 111
         $adminObject->displayNavigation('category.php');
112
-        $adminObject->addItemButton(_XO_XOOPSFAQ_ADDCAT, 'category.php?op=edit', 'add' , '');
112
+        $adminObject->addItemButton(_XO_XOOPSFAQ_ADDCAT, 'category.php?op=edit', 'add', '');
113 113
         $adminObject->displayButton('left');
114 114
         $xfCatHandler->displayAdminListing('order');
115 115
         break;
Please login to merge, or discard this patch.
blocks/xoopsfaq_recent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $faqTitle = $myts->displayTarea($faqObj->getVar('contents_title'));
82 82
             if (!empty($options[1])) {
83 83
                 $txtAns   = strip_tags($faqObj->getVar('contents_contents')); // get rid of html for block
84
-                $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0 ,0 ,0 ,0);
84
+                $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0, 0, 0, 0);
85 85
             } else {
86 86
                 $faqAns   = $myts->displayTarea($faqObj->getVar('contents_contents'),
87 87
                             (int)$faqObj->getVar('dohtml'),
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     $formSelect->addOptionArray($optionArray);
126 126
     $selOptions = (false === strpos($options[3], ',')) ? $options[3] : explode(',', $options[3]);
127 127
     $formSelect->setValue($selOptions);
128
-    $selectCat   = $formSelect->render();
128
+    $selectCat = $formSelect->render();
129 129
 
130 130
     $ychck = (isset($options[2]) && ($options[2] > 0)) ? ' checked' : '';
131 131
     $nchck = !empty($ychck) ? '' : ' checked';
Please login to merge, or discard this patch.