Completed
Push — master ( f47147...0adc58 )
by
unknown
02:15
created
blocks/xoopsfaq_rand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
         $xpFaqObj = $xpFaqObjArray[$faqNum];
75 75
         $faq      = $myts->displayTarea($xpFaqObj->getVar('contents_title'));
76 76
         $txtAns   = strip_tags($xpFaqObj->getVar('contents_contents')); // get rid of html for block
77
-        $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0 ,0 ,0 ,0);
77
+        $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0, 0, 0, 0);
78 78
 
79 79
         $xfCatHandler = $xfHelper->getHandler('category');
80 80
         $catObj       = $xfCatHandler->get($xpFaqObj->getVar('contents_cid'));
81 81
         $cid          = $catObj->getVar('category_id');
82
-        $block = array( 'title' => _MB_XOOPSFAQ_RANDOM_TITLE,
82
+        $block = array('title' => _MB_XOOPSFAQ_RANDOM_TITLE,
83 83
                           'faq' => $faq,
84 84
                        'faqans' => $faqAns,
85 85
                      'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     $formSelect->addOptionArray($optionArray);
115 115
     $selOptions = (false === strpos($options[1], ',')) ? $options[1] : explode(',', $options[1]);
116 116
     $formSelect->setValue($selOptions);
117
-    $selectCat   = $formSelect->render();
117
+    $selectCat = $formSelect->render();
118 118
 
119 119
     $form = '<div class="line140">'
120 120
           . _MB_XOOPSFAQ_CHARS . '&nbsp;'
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.
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.
xoops_version.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 // Module SQL Tables
64 64
 $modversion['tables']              = array('xoopsfaq_contents',
65 65
                                          'xoopsfaq_categories'
66
-) ;
66
+);
67 67
 
68 68
 // Scripts to run upon installation or update
69 69
 $modversion['onInstall']           = "include/oninstall.inc.php";
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 $editor_handler = XoopsEditorHandler::getInstance();
137 137
 $editorList     = array_flip($editor_handler->getList());
138 138
 
139
-$modversion['config']              = array(array('name' => 'use_wysiwyg',
139
+$modversion['config'] = array(array('name' => 'use_wysiwyg',
140 140
                                                 'title' => '_MI_XOOPSFAQ_EDITORS',
141 141
                                           'description' => '_MI_XOOPSFAQ_EDITORS_DESC',
142 142
                                              'formtype' => 'select',
Please login to merge, or discard this patch.
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
                 static::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
                 static::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
-                static::rcopy($fObj->getPathname(), $dest . '/' . $fObj-getFilename());
261
+            } else if (!$fObj->isDot() && $fObj->isDir()) {
262
+                static::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 . '&amp;' . $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.
include/onupdate.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         $oldFiles = array($xfHelper->path('include/functions.php'),
132 132
                             $xfHelper->path('class/utilities.php')
133 133
         );
134
-        foreach($oldFiles as $file) {
134
+        foreach ($oldFiles as $file) {
135 135
             if (is_file($file)) {
136 136
                 if (false === ($delOk = unlink($file))) {
137 137
                     $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_REMOVE, $file));
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
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     /** @var Xmf\Module\Helper\GenericHelper $xfHelper */
28 28
     $myts = MyTextSanitizer::getInstance();
29 29
 
30
-    $moduleDirName = basename(dirname(__DIR__)) ;
30
+    $moduleDirName = basename(dirname(__DIR__));
31 31
     $xfHelper      = Xmf\Module\Helper::getHelper($moduleDirName);
32 32
     $xfCatHandler  = $xfHelper->getHandler('category');
33 33
     $catList       = $xfCatHandler->getList();
34 34
 
35
-    $retVal = array() ;
36
-    foreach ($catList as $id=>$title){
35
+    $retVal = array();
36
+    foreach ($catList as $id=>$title) {
37 37
         $retVal['parent'][] = array('id' => $id,
38 38
                                  'title' => $myts->htmlSpecialChars($title),
39 39
                                    'url' => $xfHelper->url('index.php?cat_id=' . $id)
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
     /** @var XoopsfaqCategoryHandler $xfCatHandler */
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     $catCount   = !empty($catArray) ? count($catArray) : 0;
74 74
     $totalLimit = (int)$limit - $catCount;
75 75
     foreach ($catArray as $cId => $cat) {
76
-        $ret[] = array ('image' => 'assets/images/folder.png',
76
+        $ret[] = array('image' => 'assets/images/folder.png',
77 77
                          'link' => $xfHelper->url('index.php?cat_id=' . $cId),
78 78
                         'title' => $cat['category_title'],
79 79
         );
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     }
104 104
     $contentArray = $xfFaqHandler->getAll($criteria, $contentFields, false);
105 105
     foreach ($contentArray as $content) {
106
-        $ret[] = array ('image' => 'assets/images/question2.gif',
106
+        $ret[] = array('image' => 'assets/images/question2.gif',
107 107
                          'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
108 108
                         'title' => $content['contents_title'],
109 109
                          'time' => $content['contents_publish'],
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
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
     /** @var XoopsObject $contentObj */
60 60
     foreach ($contentObjs as $contentObj) {
61
-        $retVal[] = array ('image' => '',
61
+        $retVal[] = array('image' => '',
62 62
                            'title' => $contentObj->getVar('contents_title'),
63 63
                             'link' => $contentObj->getVar('contents_contents'),
64 64
                             'time' => $contentObj->getVar('contents_publish'),
Please login to merge, or discard this patch.