Completed
Pull Request — master (#1)
by Michael
02:28
created
language/english/modinfo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
  */
28 28
 define('_MI_XOOPSFAQ_NAME', 'XOOPS FAQ');
29 29
 define('_MI_XOOPSFAQ_DESC', 'This module is used to create Frequently Asked Questions (FAQs). You can use it to '
30
-                          . 'provide information on your website for your users. The module if very simple, but '
31
-                          . 'flexible enough to use for other purposes as well.'
30
+                            . 'provide information on your website for your users. The module if very simple, but '
31
+                            . 'flexible enough to use for other purposes as well.'
32 32
 );
33 33
 
34 34
 /**
Please login to merge, or discard this patch.
class/category.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -169,32 +169,32 @@
 block discarded – undo
169 169
         $buttons = array('edit', 'delete');
170 170
 
171 171
         $ret = '<table class="outer width100 bnone pad3 marg5">'
172
-             . '  <thead>'
173
-             . '  <tr class="xoopsCenter">'
174
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>'
175
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>'
176
-             . '    <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
177
-             . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
178
-             . '  </tr>'
179
-             . '  </thead>'
180
-             . '  <tbody>';
172
+                . '  <thead>'
173
+                . '  <tr class="xoopsCenter">'
174
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ORDER . '</th>'
175
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CATEGORY_ID . '</th>'
176
+                . '    <th class="txtleft">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
177
+                . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
178
+                . '  </tr>'
179
+                . '  </thead>'
180
+                . '  <tbody>';
181 181
         if ($objects['count'] > 0) {
182 182
             foreach ($objects['list'] as $object) {
183 183
                 $ret .= '  <tr class="xoopsCenter">'
184
-                      . '    <td class="even txtcenter">' . $object->getVar('category_order') . '</td>'
185
-                      . '    <td class="even txtcenter">' . $object->getVar('category_id') . '</td>'
186
-                      . '    <td class="even txtleft">' . $object->getVar('category_title') . '</td>'
187
-                      . '    <td class="even txtcenter">';
184
+                        . '    <td class="even txtcenter">' . $object->getVar('category_order') . '</td>'
185
+                        . '    <td class="even txtcenter">' . $object->getVar('category_id') . '</td>'
186
+                        . '    <td class="even txtleft">' . $object->getVar('category_title') . '</td>'
187
+                        . '    <td class="even txtcenter">';
188 188
                 $ret .= XoopsfaqUtility::renderIconLinks($buttons, 'category_id', $object->getVar('category_id'));
189 189
                 $ret .= '    </td>'
190
-                      . '  </tr>';
190
+                        . '  </tr>';
191 191
             }
192 192
         } else {
193 193
             $ret .= '  <tr class="txtcenter"><td colspan="4" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>';
194 194
         }
195 195
         $ret .= '  </tbody>'
196 196
 //              . '  <tfoot><tr class="txtcenter"><td colspan="4" class="head">&nbsp;</td></tr></tfoot>'
197
-              . '</table>';
197
+                . '</table>';
198 198
         return $ret;
199 199
     }
200 200
 
Please login to merge, or discard this patch.
class/contents.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class XoopsfaqContents extends XoopsObject
32 32
 {
33
-  /**
34
-   * @var string contains this modules directory name
35
-   */
33
+    /**
34
+     * @var string contains this modules directory name
35
+     */
36 36
     protected $dirname;
37 37
 
38 38
     /**
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
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'),
134
-                                     'rows' => 25,
135
-                                     'cols' => '100%',
134
+                                        'rows' => 25,
135
+                                        'cols' => '100%',
136 136
                                     'width' => '100%',
137
-                                   'height' => '600px',
138
-                                     'name' => 'contents_contents',
137
+                                    'height' => '600px',
138
+                                        'name' => 'contents_contents',
139 139
                                     'value' => $this->getVar('contents_contents', 'e')
140 140
             );
141 141
             $contents_contents = new XoopsFormEditor('', 'contents_contents', $editorConfigs);
@@ -328,18 +328,18 @@  discard block
 block discarded – undo
328 328
         $buttons      = array('edit', 'delete');
329 329
 
330 330
         $ret = '<table class="outer width100 bnone pad3 marg5">'
331
-             . '  <thead>'
332
-             . '  <tr class="center">'
333
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ID . '</th>'
334
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ACTIVE . '</th>'
335
-             . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_WEIGHT . '</th>'
336
-             . '    <th class="left">' . _AM_XOOPSFAQ_CONTENTS_TITLE . '</th>'
337
-             . '    <th class="left">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
338
-             . '    <th>' . _AM_XOOPSFAQ_CONTENTS_PUBLISH . '</th>'
339
-             . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
340
-             . '  </tr>'
341
-             . '  </thead>'
342
-             . '  <tbody>';
331
+                . '  <thead>'
332
+                . '  <tr class="center">'
333
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ID . '</th>'
334
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_ACTIVE . '</th>'
335
+                . '    <th class="width5">' . _AM_XOOPSFAQ_CONTENTS_WEIGHT . '</th>'
336
+                . '    <th class="left">' . _AM_XOOPSFAQ_CONTENTS_TITLE . '</th>'
337
+                . '    <th class="left">' . _AM_XOOPSFAQ_CATEGORY_TITLE . '</th>'
338
+                . '    <th>' . _AM_XOOPSFAQ_CONTENTS_PUBLISH . '</th>'
339
+                . '    <th class="width20">' . _AM_XOOPSFAQ_ACTIONS . '</th>'
340
+                . '  </tr>'
341
+                . '  </thead>'
342
+                . '  <tbody>';
343 343
         if ($objects['count'] > 0) {
344 344
             $tdClass = 0;
345 345
             foreach ($objects['list'] as $object) {
@@ -349,23 +349,23 @@  discard block
 block discarded – undo
349 349
                 ++$tdClass;
350 350
                 $dispClass = ($tdClass % 1) ? 'even' : 'odd';
351 351
                 $ret .= '  <tr class="center middle">'
352
-                      . '    <td class="' . $dispClass . '">' . $object->getVar('contents_id') . '</td>'
353
-                      . '    <td class="' . $dispClass . '">' . $object->getActiveIcon() . '</td>'
354
-                      . '    <td class="' . $dispClass . '">' . $object->getVar('contents_weight') . '</td>'
355
-                      . '    <td class="' . $dispClass . ' left">' . $thisContentTitle . '</td>'
356
-                      . '    <td class="' . $dispClass . ' left">' . $thisCatTitle . '</td>'
357
-                      . '    <td class="' . $dispClass . '">' . $object->getPublished(_SHORTDATESTRING) . '</td>'
358
-                      . '    <td class="' . $dispClass . '">';
352
+                        . '    <td class="' . $dispClass . '">' . $object->getVar('contents_id') . '</td>'
353
+                        . '    <td class="' . $dispClass . '">' . $object->getActiveIcon() . '</td>'
354
+                        . '    <td class="' . $dispClass . '">' . $object->getVar('contents_weight') . '</td>'
355
+                        . '    <td class="' . $dispClass . ' left">' . $thisContentTitle . '</td>'
356
+                        . '    <td class="' . $dispClass . ' left">' . $thisCatTitle . '</td>'
357
+                        . '    <td class="' . $dispClass . '">' . $object->getPublished(_SHORTDATESTRING) . '</td>'
358
+                        . '    <td class="' . $dispClass . '">';
359 359
                 $ret .= XoopsfaqUtility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id'))
360
-                      . '</td>'
361
-                      . '  </tr>';
360
+                        . '</td>'
361
+                        . '  </tr>';
362 362
             }
363 363
         } else {
364 364
             $ret .= '  <tr class="center"><td colspan="7" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>';
365 365
         }
366 366
         $ret .= '  </tbody>'
367 367
 //             . '  <tr class="center"><td colspan="7" class="foot">&nbsp;</td></tr>'
368
-              . '</table>';
368
+                . '</table>';
369 369
         return $ret;
370 370
     }
371 371
 
Please login to merge, or discard this patch.
class/utility.php 1 patch
Indentation   +10 added lines, -10 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
     /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
         // Open the source directory to read in files
172 172
         $iterator = new DirectoryIterator($src);
173
-       foreach ($iterator as $fObj) {
173
+        foreach ($iterator as $fObj) {
174 174
             if ($fObj->isFile()) {
175 175
                 $filename = $fObj->getPathname();
176 176
                 $fObj = null; // clear this iterator object to close the file
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
                 }
296 296
                 $title = constant (htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName)));
297 297
                 $img = '<img src="' . Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"'
298
-                     . ' title ="' . $title . '"'
299
-                     . ' alt = "' . $title . '"'
300
-                     . ' class="bnone middle">';
298
+                        . ' title ="' . $title . '"'
299
+                        . ' alt = "' . $title . '"'
300
+                        . ' class="bnone middle">';
301 301
                 $ret .= '<a href="' . $url . '"' . $extra . '>' . $img . '</a>';
302 302
             }
303 303
         }
Please login to merge, or discard this patch.
blocks/xoopsfaq_rand.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         $catObj       = $xfCatHandler->get($xpFaqObj->getVar('contents_cid'));
81 81
         $cid          = $catObj->getVar('category_id');
82 82
         $block = array( 'title' => _MB_XOOPSFAQ_RANDOM_TITLE,
83
-                          'faq' => $faq,
84
-                       'faqans' => $faqAns,
85
-                     'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')),
86
-                      'linktxt' => _MB_XOOPSFAQ_SEE_MORE,
87
-                      'catlink' => $xfHelper->url('index.php?cat_id=' . $cid),
88
-                       'cattxt' => $catObj->getVar('category_title')
89
-                      );
83
+                            'faq' => $faq,
84
+                        'faqans' => $faqAns,
85
+                        'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')),
86
+                        'linktxt' => _MB_XOOPSFAQ_SEE_MORE,
87
+                        'catlink' => $xfHelper->url('index.php?cat_id=' . $cid),
88
+                        'cattxt' => $catObj->getVar('category_title')
89
+                        );
90 90
         unset($xpFaqObj, $catObj);
91 91
     }
92 92
     return $block;
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
     $selectCat   = $formSelect->render();
118 118
 
119 119
     $form = '<div class="line140">'
120
-          . _MB_XOOPSFAQ_CHARS . '&nbsp;'
121
-          . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right">&nbsp;'
122
-          . _MB_XOOPSFAQ_LENGTH . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
123
-          . '</div>';
120
+            . _MB_XOOPSFAQ_CHARS . '&nbsp;'
121
+            . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right">&nbsp;'
122
+            . _MB_XOOPSFAQ_LENGTH . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
123
+            . '</div>';
124 124
     return $form;
125 125
 }
Please login to merge, or discard this patch.
blocks/xoopsfaq_category.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $block['title'] = _MB_XOOPSFAQ_CATTITLE;
83 83
         foreach ($catObjArray as $cId => $catObj) {
84 84
             $block['cat'][] = array('title' => $myts->displayTarea($catObj->getVar('category_title')),
85
-                                     'link' => $xfHelper->url('index.php?cat_id=' . $cId),
85
+                                        'link' => $xfHelper->url('index.php?cat_id=' . $cId),
86 86
             );
87 87
         }
88 88
     }
Please login to merge, or discard this patch.
blocks/xoopsfaq_recent.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 );
93 93
             }
94 94
             $block['faq'][] = array('title' => $faqTitle,
95
-                                      'ans' => $faqAns,
95
+                                        'ans' => $faqAns,
96 96
                                 'published' => $faqObj->getPublished(_SHORTDATESTRING)
97 97
             );
98 98
         }
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
     $nchck = !empty($ychck) ? '' : ' checked';
132 132
 
133 133
     $form = '<div class="line140">'
134
-          . _MB_XOOPSFAQ_NUM_FAQS . '&nbsp;'
135
-          . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>'
136
-          . _MB_XOOPSFAQ_CHARS . '&nbsp;<input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right">&nbsp;'
137
-          . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . '&nbsp;'
138
-          . '<label for="r0">' . _NO . '</label>'
139
-          . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '>&nbsp;'
140
-          . '<label for="r1">' . _YES . '</label>'
141
-          . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck
142
-          . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
143
-          . '</div>';
134
+            . _MB_XOOPSFAQ_NUM_FAQS . '&nbsp;'
135
+            . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right"><br>'
136
+            . _MB_XOOPSFAQ_CHARS . '&nbsp;<input type="number" name="options[1]" value="' . $options[1] . '" style="width: 5em;" min="0" class="right">&nbsp;'
137
+            . _MB_XOOPSFAQ_LENGTH . '<br>' . _MB_XOOPSFAQ_SHOW_DATE . '&nbsp;'
138
+            . '<label for="r0">' . _NO . '</label>'
139
+            . '<input type="radio" name="options[2]" id="r0" value="0"' . $nchck . '>&nbsp;'
140
+            . '<label for="r1">' . _YES . '</label>'
141
+            . '<input type="radio" name="options[2]" id="r1" value="1"' . $ychck
142
+            . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat
143
+            . '</div>';
144 144
     return $form;
145 145
 }
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
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
             $bodyWords = '';
67 67
             foreach ($contentsObj['list'] as $obj) {
68 68
                 $question = array('id' => $obj->getVar('contents_id'),
69
-                               'title' => $obj->getVar('contents_title'),
70
-                              'answer' => $obj->getVar('contents_contents')
69
+                                'title' => $obj->getVar('contents_title'),
70
+                                'answer' => $obj->getVar('contents_contents')
71 71
                 );
72 72
                 $GLOBALS['xoopsTpl']->append('questions', $question);
73 73
                 $bodyWords .= ' ' . $obj->getVar('contents_title') . ' ' . $obj->getVar('contents_contents');
Please login to merge, or discard this patch.
include/onupdate.inc.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
    || !($GLOBALS['xoopsUser'] instanceof XoopsUser)
34 34
    || !($GLOBALS['xoopsUser']->isAdmin()))
35 35
 {
36
-     exit("Restricted access" . PHP_EOL);
36
+        exit("Restricted access" . PHP_EOL);
37 37
 }
38 38
 
39 39
 /**
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
         // been relocated to ./assets
94 94
         //----------------------------------------------------------------
95 95
         $old_directories = array($xfHelper->path('css/'),
96
-                                 $xfHelper->path('js/'),
97
-                                 $xfHelper->path('images/')
96
+                                    $xfHelper->path('js/'),
97
+                                    $xfHelper->path('images/')
98 98
         );
99 99
         foreach ($old_directories as $old_dir) {
100 100
             $dirInfo = new SplFileInfo($old_dir);
Please login to merge, or discard this patch.