Completed
Pull Request — master (#2)
by
unknown
02:13
created
class/category.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      *
119 119
      * @param string $sort order ('id', order', or 'title') - default: id
120 120
      *
121
-     * @return mixed XoopsfaqCategory | false on failure
121
+     * @return boolean XoopsfaqCategory | false on failure
122 122
      */
123 123
     public function getObj($sort = 'id')
124 124
     {
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -170,33 +170,33 @@
 block discarded – undo
170 170
         $buttons = array('edit', 'delete');
171 171
 
172 172
         $ret = '<table class="outer width100 bnone pad3 marg5">'
173
-             . '  <thead>'
174
-             . '  <tr class="xoopsCenter">'
175
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>'
176
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>'
177
-             . '    <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
178
-             . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
179
-             . '  </tr>'
180
-             . '  </thead>'
181
-             . '  <tbody>';
173
+                . '  <thead>'
174
+                . '  <tr class="xoopsCenter">'
175
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>'
176
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>'
177
+                . '    <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
178
+                . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
179
+                . '  </tr>'
180
+                . '  </thead>'
181
+                . '  <tbody>';
182 182
         if ($objects['count'] > 0) {
183 183
             /* @var $object XoopsObject */
184 184
             foreach ($objects['list'] as $object) {
185 185
                 $ret .= '  <tr class="xoopsCenter">'
186
-                      . '    <td class="even txtcenter">' . $object->getVar('category_order') . '</td>'
187
-                      . '    <td class="even txtcenter">' . $object->getVar('category_id') . '</td>'
188
-                      . '    <td class="even txtleft">' . $object->getVar('category_title') . '</td>'
189
-                      . '    <td class="even txtcenter">';
186
+                        . '    <td class="even txtcenter">' . $object->getVar('category_order') . '</td>'
187
+                        . '    <td class="even txtcenter">' . $object->getVar('category_id') . '</td>'
188
+                        . '    <td class="even txtleft">' . $object->getVar('category_title') . '</td>'
189
+                        . '    <td class="even txtcenter">';
190 190
                 $ret .= XoopsfaqUtility::renderIconLinks($buttons, 'category_id', $object->getVar('category_id'));
191 191
                 $ret .= '    </td>'
192
-                      . '  </tr>';
192
+                        . '  </tr>';
193 193
             }
194 194
         } else {
195 195
             $ret .= '  <tr class="txtcenter"><td colspan="4" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>';
196 196
         }
197 197
         $ret .= '  </tbody>'
198 198
 //              . '  <tfoot><tr class="txtcenter"><td colspan="4" class="head">&nbsp;</td></tr></tfoot>'
199
-              . '</table>';
199
+                . '</table>';
200 200
         return $ret;
201 201
     }
202 202
 
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
             /* @var $obj XoopsObject */
72 72
             foreach ($contentsObj['list'] as $obj) {
73 73
                 $question = array('id' => $obj->getVar('contents_id'),
74
-                               'title' => $obj->getVar('contents_title'),
75
-                              'answer' => $obj->getVar('contents_contents')
74
+                                'title' => $obj->getVar('contents_title'),
75
+                                'answer' => $obj->getVar('contents_contents')
76 76
                 );
77 77
                 $GLOBALS['xoopsTpl']->append('questions', $question);
78 78
                 $bodyWords .= ' ' . $obj->getVar('contents_title') . ' ' . $obj->getVar('contents_contents');
Please login to merge, or discard this patch.
include/rss.inc.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     /* @var $contentObj XoopsObject */
60 60
     foreach ($contentObjs as $contentObj) {
61 61
         $retVal[] = array ('image' => '',
62
-                           'title' => $contentObj->getVar('contents_title'),
62
+                            'title' => $contentObj->getVar('contents_title'),
63 63
                             'link' => $contentObj->getVar('contents_contents'),
64 64
                             'time' => $contentObj->getVar('contents_publish'),
65 65
                             'desc' => '',
Please login to merge, or discard this 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 $contentObj XoopsObject */
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.
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 $xfCatHandler XoopsfaqCategoryHandler */
@@ -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/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 $xfHelper Xmf\Module\Helper\GenericHelper */
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/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.
blocks/xoopsfaq_category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     $moduleDirName = basename(dirname(__DIR__));
39 39
     xoops_load('constants', $moduleDirName);
40 40
 
41
-    $myts         = MyTextSanitizer::getInstance();
41
+    $myts = MyTextSanitizer::getInstance();
42 42
 
43 43
     /* @var $xfCatHandler XoopsfaqCategoryHandler */
44 44
     /* @var $xfFaqHandler XoopsfaqContentsHandler */
Please login to merge, or discard this patch.
blocks/xoopsfaq_recent.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 );
96 96
             }
97 97
             $block['faq'][] = array('title' => $faqTitle,
98
-                                      'ans' => $faqAns,
98
+                                        'ans' => $faqAns,
99 99
                                 'published' => $faqObj->getPublished(_SHORTDATESTRING)
100 100
             );
101 101
         }
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
     $nchck = !empty($ychck) ? '' : ' checked';
137 137
 
138 138
     $form = '<div class="line140">'
139
-          . _MB_XOOPSFAQ_NUM_FAQS . '&nbsp;'
140
-          . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>'
141
-          . _MB_XOOPSFAQ_CHARS . '&nbsp;<input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right">&nbsp;'
142
-          . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . '&nbsp;'
143
-          . '<label for="r0">' . _NO . '</label>'
144
-          . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '>&nbsp;'
145
-          . '<label for="r1">' . _YES . '</label>'
146
-          . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck . '>'
147
-          . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
148
-          . '</div>';
139
+            . _MB_XOOPSFAQ_NUM_FAQS . '&nbsp;'
140
+            . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>'
141
+            . _MB_XOOPSFAQ_CHARS . '&nbsp;<input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right">&nbsp;'
142
+            . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . '&nbsp;'
143
+            . '<label for="r0">' . _NO . '</label>'
144
+            . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '>&nbsp;'
145
+            . '<label for="r1">' . _YES . '</label>'
146
+            . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck . '>'
147
+            . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
148
+            . '</div>';
149 149
     return $form;
150 150
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $moduleDirName = basename(dirname(__DIR__));
40 40
     xoops_load('constants', $moduleDirName);
41 41
 
42
-    $myts         = MyTextSanitizer::getInstance();
42
+    $myts = MyTextSanitizer::getInstance();
43 43
 
44 44
     /* @var $xfCatHandler XoopsfaqCategoryHandler */
45 45
     /* @var $xfFaqHandler XoopsfaqContentsHandler */
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $faqTitle = $myts->displayTarea($faqObj->getVar('contents_title'));
85 85
             if (!empty($options[1])) {
86 86
                 $txtAns   = strip_tags($faqObj->getVar('contents_contents')); // get rid of html for block
87
-                $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0 ,0 ,0 ,0);
87
+                $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0, 0, 0, 0);
88 88
             } else {
89 89
                 $faqAns   = $myts->displayTarea($faqObj->getVar('contents_contents'),
90 90
                             (int)$faqObj->getVar('dohtml'),
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     $formSelect->addOptionArray($optionArray);
131 131
     $selOptions = (false === strpos($options[3], ',')) ? $options[3] : explode(',', $options[3]);
132 132
     $formSelect->setValue($selOptions);
133
-    $selectCat   = $formSelect->render();
133
+    $selectCat = $formSelect->render();
134 134
 
135 135
     $ychck = (isset($options[2]) && ($options[2] > 0)) ? ' checked' : '';
136 136
     $nchck = !empty($ychck) ? '' : ' checked';
Please login to merge, or discard this patch.
class/utility.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
  * @since::      File available since version 4.10
23 23
  */
24 24
 
25
- /**
26
-  * XoopsfaqUtility
27
-  *
28
-  * Static utility class to provide common functionality
29
-  *
30
-  */
25
+    /**
26
+     * XoopsfaqUtility
27
+     *
28
+     * Static utility class to provide common functionality
29
+     *
30
+     */
31 31
 class XoopsfaqUtility
32 32
 {
33 33
     /**
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
                 }
295 295
                 $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
296 296
                 $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"'
297
-                     . ' title ="' . $title . '"'
298
-                     . ' alt = "' . $title . '"'
299
-                     . ' class="bnone middle">';
297
+                        . ' title ="' . $title . '"'
298
+                        . ' alt = "' . $title . '"'
299
+                        . ' class="bnone middle">';
300 300
                 $ret .= '<a href="' . $url . '"' . $extra . '>' . $img . '</a>';
301 301
             }
302 302
         }
Please login to merge, or discard this patch.