Completed
Push — master ( 454ebd...de22fe )
by Michael
03:58
created
admin/answer.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -114,18 +114,18 @@
 block discarded – undo
114 114
     foreach ($proposed_answers as $proposed_answer) {
115 115
         if (Constants::SF_STATUS_NEW_ANSWER == $faqObj->status()) {
116 116
             $merge   = "<a href='faq.php?op=merge&amp;faqid="
117
-                       . $faqObj->faqid()
118
-                       . '&amp;answerid='
119
-                       . $proposed_answer->answerid()
120
-                       . "'><img src='"
121
-                       . XOOPS_URL
122
-                       . '/modules/'
123
-                       . $xoopsModule->dirname()
124
-                       . "/assets/images/icon/merge.gif' title='"
125
-                       . _AM_SF_FAQ_MERGE
126
-                       . "' alt='"
127
-                       . _AM_SF_FAQ_MERGE
128
-                       . "'></a>&nbsp;";
117
+                        . $faqObj->faqid()
118
+                        . '&amp;answerid='
119
+                        . $proposed_answer->answerid()
120
+                        . "'><img src='"
121
+                        . XOOPS_URL
122
+                        . '/modules/'
123
+                        . $xoopsModule->dirname()
124
+                        . "/assets/images/icon/merge.gif' title='"
125
+                        . _AM_SF_FAQ_MERGE
126
+                        . "' alt='"
127
+                        . _AM_SF_FAQ_MERGE
128
+                        . "'></a>&nbsp;";
129 129
             $approve = "<a href='answer.php?op=selectanswer&amp;faqid=" . $faqid . '&amp;answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "'></a>";
130 130
         }
131 131
         $modify = "<a href='faq.php?op=mod&amp;faqid=" . $faqObj->faqid() . '&amp;answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "'></a>&nbsp;";
Please login to merge, or discard this patch.
admin/category.php 1 patch
Switch Indentation   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -231,149 +231,149 @@
 block discarded – undo
231 231
 }
232 232
 
233 233
 switch ($op) {
234
-    case 'mod':
235
-        $categoryid  = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
236
-        $destList    = isset($_POST['destList']) ? $_POST['destList'] : '';
237
-        $adminObject = \Xmf\Module\Admin::getInstance();
238
-        xoops_cp_header();
234
+        case 'mod':
235
+            $categoryid  = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
236
+            $destList    = isset($_POST['destList']) ? $_POST['destList'] : '';
237
+            $adminObject = \Xmf\Module\Admin::getInstance();
238
+            xoops_cp_header();
239 239
 
240
-        $adminObject->displayNavigation(basename(__FILE__));
241
-        editcat(true, $categoryid);
242
-        break;
240
+            $adminObject->displayNavigation(basename(__FILE__));
241
+            editcat(true, $categoryid);
242
+            break;
243 243
 
244
-    case 'addcategory':
245
-        global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid;
244
+        case 'addcategory':
245
+            global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid;
246 246
 
247
-        $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
247
+            $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
248 248
 
249
-        if (0 != $categoryid) {
250
-            $categoryObj = new Smartfaq\Category($categoryid);
251
-        } else {
252
-            $categoryObj = $categoryHandler->create();
253
-        }
249
+            if (0 != $categoryid) {
250
+                $categoryObj = new Smartfaq\Category($categoryid);
251
+            } else {
252
+                $categoryObj = $categoryHandler->create();
253
+            }
254 254
 
255
-        //if (isset($_POST['allmods'])) $allmods = $_POST['allmods'];
256
-        //if (isset($_POST['moderators'])) $moderators = $_POST['moderators'];
255
+            //if (isset($_POST['allmods'])) $allmods = $_POST['allmods'];
256
+            //if (isset($_POST['moderators'])) $moderators = $_POST['moderators'];
257 257
 
258
-        $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0);
259
-        $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0;
260
-        $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1);
258
+            $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0);
259
+            $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0;
260
+            $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1);
261 261
 
262
-        // Groups and permissions
263
-        if (isset($_POST['groups_read'])) {
264
-            $categoryObj->setGroups_read($_POST['groups_read']);
265
-        } else {
266
-            $categoryObj->setGroups_read();
267
-        }
268
-        //  $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array();
269
-        //  $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array();
270
-
271
-        $categoryObj->setVar('name', $_POST['name']);
272
-
273
-        $categoryObj->setVar('description', $_POST['description']);
274
-        if ($categoryObj->isNew()) {
275
-            $redirect_msg = _AM_SF_CATCREATED;
276
-            $redirect_to  = 'category.php?op=mod';
277
-        } else {
278
-            $redirect_msg = _AM_SF_COLMODIFIED;
279
-            $redirect_to  = 'category.php';
280
-        }
281
-
282
-        if (!$categoryObj->store()) {
283
-            redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . Smartfaq\Utility::formatErrors($categoryObj->getErrors()));
284
-        }
285
-        // TODO : put this function in the category class
286
-        Smartfaq\Utility::saveCategoryPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read');
287
-        //Smartfaq\Utility::saveCategoryPermissions($groups_admin, $categoriesObj->categoryid(), 'category_admin');
262
+            // Groups and permissions
263
+            if (isset($_POST['groups_read'])) {
264
+                $categoryObj->setGroups_read($_POST['groups_read']);
265
+            } else {
266
+                $categoryObj->setGroups_read();
267
+            }
268
+            //  $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array();
269
+            //  $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array();
270
+
271
+            $categoryObj->setVar('name', $_POST['name']);
272
+
273
+            $categoryObj->setVar('description', $_POST['description']);
274
+            if ($categoryObj->isNew()) {
275
+                $redirect_msg = _AM_SF_CATCREATED;
276
+                $redirect_to  = 'category.php?op=mod';
277
+            } else {
278
+                $redirect_msg = _AM_SF_COLMODIFIED;
279
+                $redirect_to  = 'category.php';
280
+            }
288 281
 
289
-        if ($applyall) {
282
+            if (!$categoryObj->store()) {
283
+                redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . Smartfaq\Utility::formatErrors($categoryObj->getErrors()));
284
+            }
290 285
             // TODO : put this function in the category class
291
-            Smartfaq\Utility::overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid());
292
-        }
286
+            Smartfaq\Utility::saveCategoryPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read');
287
+            //Smartfaq\Utility::saveCategoryPermissions($groups_admin, $categoriesObj->categoryid(), 'category_admin');
293 288
 
294
-        redirect_header($redirect_to, 2, $redirect_msg);
295
-        break;
289
+            if ($applyall) {
290
+                // TODO : put this function in the category class
291
+                Smartfaq\Utility::overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid());
292
+            }
296 293
 
297
-    case 'del':
298
-        global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET;
294
+            redirect_header($redirect_to, 2, $redirect_msg);
295
+            break;
299 296
 
300
-        $module_id    = $xoopsModule->getVar('mid');
301
-        $gpermHandler = xoops_getHandler('groupperm');
297
+        case 'del':
298
+            global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET;
302 299
 
303
-        $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
304
-        $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid;
300
+            $module_id    = $xoopsModule->getVar('mid');
301
+            $gpermHandler = xoops_getHandler('groupperm');
305 302
 
306
-        $categoryObj = new Smartfaq\Category($categoryid);
303
+            $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
304
+            $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid;
307 305
 
308
-        $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
309
-        $name    = isset($_POST['name']) ? $_POST['name'] : '';
306
+            $categoryObj = new Smartfaq\Category($categoryid);
310 307
 
311
-        if ($confirm) {
312
-            if (!$categoryHandler->delete($categoryObj)) {
313
-                redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR);
308
+            $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
309
+            $name    = isset($_POST['name']) ? $_POST['name'] : '';
310
+
311
+            if ($confirm) {
312
+                if (!$categoryHandler->delete($categoryObj)) {
313
+                    redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR);
314
+                }
315
+                redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name));
316
+            } else {
317
+                // no confirm: show deletion condition
318
+                $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
319
+                xoops_cp_header();
320
+                xoops_confirm([
321
+                                  'op'         => 'del',
322
+                                  'categoryid' => $categoryObj->categoryid(),
323
+                                  'confirm'    => 1,
324
+                                  'name'       => $categoryObj->name()
325
+                              ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
326
+                xoops_cp_footer();
314 327
             }
315
-            redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name));
316
-        } else {
317
-            // no confirm: show deletion condition
318
-            $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
328
+            exit();
329
+            break;
330
+
331
+        case 'cancel':
332
+            redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, ''));
333
+            break;
334
+        case 'default':
335
+        default:
336
+            $adminObject = \Xmf\Module\Admin::getInstance();
319 337
             xoops_cp_header();
320
-            xoops_confirm([
321
-                              'op'         => 'del',
322
-                              'categoryid' => $categoryObj->categoryid(),
323
-                              'confirm'    => 1,
324
-                              'name'       => $categoryObj->name()
325
-                          ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
326
-            xoops_cp_footer();
327
-        }
328
-        exit();
329
-        break;
330
-
331
-    case 'cancel':
332
-        redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, ''));
333
-        break;
334
-    case 'default':
335
-    default:
336
-        $adminObject = \Xmf\Module\Admin::getInstance();
337
-        xoops_cp_header();
338
-
339
-        $adminObject->displayNavigation(basename(__FILE__));
340
-        echo "<br>\n";
341 338
 
342
-        // Creating the objects for top categories
343
-        $categoriesObj =& $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0);
344
-
345
-        Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
346
-        echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . _AM_SF_CATEGORIES_TITLE . '</h3>';
347
-        echo "<div id='toptable'>";
348
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>';
349
-
350
-        echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
351
-        echo '<tr>';
352
-        echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>';
353
-        echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>';
354
-        echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>';
355
-        echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>';
356
-        echo '</tr>';
357
-        $totalCategories = $categoryHandler->getCategoriesCount(0);
358
-        if (count($categoriesObj) > 0) {
359
-            foreach ($categoriesObj as $key => $thiscat) {
360
-                displayCategory($thiscat);
361
-            }
362
-        } else {
339
+            $adminObject->displayNavigation(basename(__FILE__));
340
+            echo "<br>\n";
341
+
342
+            // Creating the objects for top categories
343
+            $categoriesObj =& $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0);
344
+
345
+            Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
346
+            echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . _AM_SF_CATEGORIES_TITLE . '</h3>';
347
+            echo "<div id='toptable'>";
348
+            echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>';
349
+
350
+            echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
363 351
             echo '<tr>';
364
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>';
352
+            echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>';
353
+            echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>';
354
+            echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>';
355
+            echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>';
365 356
             echo '</tr>';
366
-            $categoryid = '0';
367
-        }
368
-        echo "</table>\n";
369
-        require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
370
-        $pagenav = new \XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory');
371
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
372
-        echo '</div>';
357
+            $totalCategories = $categoryHandler->getCategoriesCount(0);
358
+            if (count($categoriesObj) > 0) {
359
+                foreach ($categoriesObj as $key => $thiscat) {
360
+                    displayCategory($thiscat);
361
+                }
362
+            } else {
363
+                echo '<tr>';
364
+                echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>';
365
+                echo '</tr>';
366
+                $categoryid = '0';
367
+            }
368
+            echo "</table>\n";
369
+            require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
370
+            $pagenav = new \XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory');
371
+            echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
372
+            echo '</div>';
373 373
 
374
-        editcat(false);
374
+            editcat(false);
375 375
 
376
-        break;
376
+            break;
377 377
 }
378 378
 
379 379
 require_once __DIR__ . '/admin_footer.php';
Please login to merge, or discard this patch.
admin/myblocksadmin.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -173,22 +173,22 @@  discard block
 block discarded – undo
173 173
             </td>
174 174
             <td class='$class' align='center' nowrap='nowrap'>
175 175
                 <input type='radio' name='side[$bid]' value='"
176
-             . XOOPS_SIDEBLOCK_LEFT
177
-             . "'$ssel0>-<input type='radio' name='side[$bid]' value='"
178
-             . XOOPS_CENTERBLOCK_LEFT
179
-             . "'$ssel2><input type='radio' name='side[$bid]' value='"
180
-             . XOOPS_CENTERBLOCK_CENTER
181
-             . "'$ssel3><input type='radio' name='side[$bid]' value='"
182
-             . XOOPS_CENTERBLOCK_RIGHT
183
-             . "'$ssel4>-<input type='radio' name='side[$bid]' value='"
184
-             . XOOPS_SIDEBLOCK_RIGHT
185
-             . "'$ssel1>
176
+                . XOOPS_SIDEBLOCK_LEFT
177
+                . "'$ssel0>-<input type='radio' name='side[$bid]' value='"
178
+                . XOOPS_CENTERBLOCK_LEFT
179
+                . "'$ssel2><input type='radio' name='side[$bid]' value='"
180
+                . XOOPS_CENTERBLOCK_CENTER
181
+                . "'$ssel3><input type='radio' name='side[$bid]' value='"
182
+                . XOOPS_CENTERBLOCK_RIGHT
183
+                . "'$ssel4>-<input type='radio' name='side[$bid]' value='"
184
+                . XOOPS_SIDEBLOCK_RIGHT
185
+                . "'$ssel1>
186 186
                 <br>
187 187
                 <br>
188 188
                 <input type='radio' name='side[$bid]' value='-1'$sseln>
189 189
                 "
190
-             . _NONE
191
-             . "
190
+                . _NONE
191
+                . "
192 192
             </td>
193 193
             <td class='$class' align='center'>
194 194
                 <input type='text' name=weight[$bid] value='$weight' size='5' maxlength='5' style='text-align:right;'>
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
             </td>
206 206
             <td class='$class' align='center'>
207 207
                 <a href='admin.php?fct=blocksadmin&amp;op=edit&amp;bid=$bid'>"
208
-             . _EDIT
209
-             . "</a>
208
+                . _EDIT
209
+                . "</a>
210 210
                 <input type='hidden' name='bid[$bid]' value='$bid'>
211 211
             </td>
212 212
         </tr>\n";
@@ -239,14 +239,14 @@  discard block
 block discarded – undo
239 239
     }
240 240
 
241 241
     $form = new GroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src="
242
-                                                          . XOOPS_URL
243
-                                                          . '/modules/'
244
-                                                          . $xoopsModule->dirname()
245
-                                                          . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
246
-                                                          . _AM_SF_GROUPS
247
-                                                          . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
248
-                                                          . _AM_SF_GROUPSINFO
249
-                                                          . '</span>');
242
+                                                            . XOOPS_URL
243
+                                                            . '/modules/'
244
+                                                            . $xoopsModule->dirname()
245
+                                                            . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
246
+                                                            . _AM_SF_GROUPS
247
+                                                            . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
248
+                                                            . _AM_SF_GROUPSINFO
249
+                                                            . '</span>');
250 250
     $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS);
251 251
     $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS);
252 252
     foreach ($item_list as $item_id => $item_name) {
Please login to merge, or discard this patch.
admin/faq.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -562,11 +562,11 @@
 block discarded – undo
562 562
             $faqid =  Request::getInt('faqid', 0, 'POST');
563 563
             xoops_cp_header();
564 564
             xoops_confirm([
565
-                              'op'      => 'del',
566
-                              'faqid'   => $faqObj->faqid(),
567
-                              'confirm' => 1,
568
-                              'name'    => $faqObj->question()
569
-                          ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
565
+                                'op'      => 'del',
566
+                                'faqid'   => $faqObj->faqid(),
567
+                                'confirm' => 1,
568
+                                'name'    => $faqObj->question()
569
+                            ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
570 570
             xoops_cp_footer();
571 571
         }
572 572
 
Please login to merge, or discard this patch.
admin/permissions.php 1 patch
Switch Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -26,53 +26,53 @@
 block discarded – undo
26 26
 }
27 27
 
28 28
 switch ($op) {
29
-    case 'default':
30
-    default:
31
-        global $xoopsDB, $xoopsModule;
29
+        case 'default':
30
+        default:
31
+            global $xoopsDB, $xoopsModule;
32 32
 
33
-        $adminObject = \Xmf\Module\Admin::getInstance();
34
-        xoops_cp_header();
35
-        $adminObject->displayNavigation(basename(__FILE__));
36
-        // View Categories permissions
37
-        $item_list_view = [];
38
-        $block_view     = [];
39
-        // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
40
-        Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
33
+            $adminObject = \Xmf\Module\Admin::getInstance();
34
+            xoops_cp_header();
35
+            $adminObject->displayNavigation(basename(__FILE__));
36
+            // View Categories permissions
37
+            $item_list_view = [];
38
+            $block_view     = [];
39
+            // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
40
+            Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
41 41
 
42
-        $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
43
-        if ($xoopsDB->getRowsNum($result_view)) {
44
-            while ($myrow_view = $xoopsDB->fetchArray($result_view)) {
45
-                $item_list_view['cid']   = $myrow_view['categoryid'];
46
-                $item_list_view['title'] = $myrow_view['name'];
47
-                $form_view               = new \XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
48
-                                                                                                                    . XOOPS_URL
49
-                                                                                                                    . '/modules/'
50
-                                                                                                                    . $xoopsModule->dirname()
51
-                                                                                                                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
52
-                                                                                                                    . _AM_SF_PERMISSIONSVIEWMAN
53
-                                                                                                                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
54
-                                                                                                                    . _AM_SF_VIEW_CATS
55
-                                                                                                                    . '</span>', 'admin/permissions.php');
56
-                $block_view[]            = $item_list_view;
57
-                foreach ($block_view as $itemlists) {
58
-                    $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
42
+            $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
43
+            if ($xoopsDB->getRowsNum($result_view)) {
44
+                while ($myrow_view = $xoopsDB->fetchArray($result_view)) {
45
+                    $item_list_view['cid']   = $myrow_view['categoryid'];
46
+                    $item_list_view['title'] = $myrow_view['name'];
47
+                    $form_view               = new \XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
48
+                                                                                                                        . XOOPS_URL
49
+                                                                                                                        . '/modules/'
50
+                                                                                                                        . $xoopsModule->dirname()
51
+                                                                                                                        . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
52
+                                                                                                                        . _AM_SF_PERMISSIONSVIEWMAN
53
+                                                                                                                        . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
54
+                                                                                                                        . _AM_SF_VIEW_CATS
55
+                                                                                                                        . '</span>', 'admin/permissions.php');
56
+                    $block_view[]            = $item_list_view;
57
+                    foreach ($block_view as $itemlists) {
58
+                        $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
59
+                    }
59 60
                 }
61
+                echo $form_view->render();
62
+            } else {
63
+                echo "<img id='toptableicon' src="
64
+                     . XOOPS_URL
65
+                     . '/modules/'
66
+                     . $xoopsModule->dirname()
67
+                     . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
68
+                     . _AM_SF_PERMISSIONSVIEWMAN
69
+                     . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
70
+                     . _AM_SF_NOPERMSSET
71
+                     . '</span>';
60 72
             }
61
-            echo $form_view->render();
62
-        } else {
63
-            echo "<img id='toptableicon' src="
64
-                 . XOOPS_URL
65
-                 . '/modules/'
66
-                 . $xoopsModule->dirname()
67
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
68
-                 . _AM_SF_PERMISSIONSVIEWMAN
69
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
70
-                 . _AM_SF_NOPERMSSET
71
-                 . '</span>';
72
-        }
73
-        echo '</div>';
73
+            echo '</div>';
74 74
 
75
-        echo "<br>\n";
75
+            echo "<br>\n";
76 76
 }
77 77
 
78 78
 require_once __DIR__ . '/admin_footer.php';
Please login to merge, or discard this patch.
admin/mygrouppermform.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -379,20 +379,20 @@
 block discarded – undo
379 379
             $tree .= ' checked';
380 380
         }
381 381
         $tree .= '>'
382
-                 . $option['name']
383
-                 . '<input type="hidden" name="'
384
-                 . $this->getName()
385
-                 . '[parents]['
386
-                 . $option['id']
387
-                 . ']" value="'
388
-                 . implode(':', $parentIds)
389
-                 . '"><input type="hidden" name="'
390
-                 . $this->getName()
391
-                 . '[itemname]['
392
-                 . $option['id']
393
-                 . ']" value="'
394
-                 . htmlspecialchars($option['name'], ENT_QUOTES)
395
-                 . "\"><br>\n";
382
+                    . $option['name']
383
+                    . '<input type="hidden" name="'
384
+                    . $this->getName()
385
+                    . '[parents]['
386
+                    . $option['id']
387
+                    . ']" value="'
388
+                    . implode(':', $parentIds)
389
+                    . '"><input type="hidden" name="'
390
+                    . $this->getName()
391
+                    . '[itemname]['
392
+                    . $option['id']
393
+                    . ']" value="'
394
+                    . htmlspecialchars($option['name'], ENT_QUOTES)
395
+                    . "\"><br>\n";
396 396
         if (isset($option['children'])) {
397 397
             foreach ($option['children'] as $child) {
398 398
                 array_push($parentIds, $option['id']);
Please login to merge, or discard this patch.
class/FaqHandler.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         if ($faq->isNew()) {
95 95
             $sql = sprintf(
96 96
                 'INSERT INTO %s (faqid, categoryid, question, howdoi, diduno, uid, datesub, `status`, counter, weight, html, smiley, xcodes, cancomment, comments, notifypub, modulelink, contextpage, exacturl, partialview) VALUES (NULL, %u, %s, %s, %s, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %u, %u)',
97
-                           $this->db->prefix('smartfaq_faq'),
97
+                            $this->db->prefix('smartfaq_faq'),
98 98
                 $categoryid,
99 99
                 $this->db->quoteString($question),
100 100
                 $this->db->quoteString($howdoi),
Please login to merge, or discard this patch.
class/CategoryHandler.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $sql = sprintf(
93 93
                 'INSERT INTO %s (parentid, name, description, total, weight, created) VALUES (%u, %s, %s, %u, %u, %u)',
94 94
                 $this->db->prefix('smartfaq_categories'),
95
-                           $parentid,
95
+                            $parentid,
96 96
                 $this->db->quoteString($name),
97 97
                 $this->db->quoteString($description),
98 98
                 $total,
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 'UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u',
105 105
                 $this->db->prefix('smartfaq_categories'),
106 106
                 $parentid,
107
-                           $this->db->quoteString($name),
107
+                            $this->db->quoteString($name),
108 108
                 $this->db->quoteString($description),
109 109
                 $total,
110 110
                 $weight,
Please login to merge, or discard this patch.
class/GroupFormCheckBox.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -201,20 +201,20 @@
 block discarded – undo
201 201
             $tree .= ' checked';
202 202
         }
203 203
         $tree .= '>'
204
-                 . $option['name']
205
-                 . '<input type="hidden" name="'
206
-                 . $this->getName()
207
-                 . '[parents]['
208
-                 . $option['id']
209
-                 . ']" value="'
210
-                 . implode(':', $parentIds)
211
-                 . '"><input type="hidden" name="'
212
-                 . $this->getName()
213
-                 . '[itemname]['
214
-                 . $option['id']
215
-                 . ']" value="'
216
-                 . htmlspecialchars($option['name'], ENT_QUOTES)
217
-                 . "\"><br>\n";
204
+                    . $option['name']
205
+                    . '<input type="hidden" name="'
206
+                    . $this->getName()
207
+                    . '[parents]['
208
+                    . $option['id']
209
+                    . ']" value="'
210
+                    . implode(':', $parentIds)
211
+                    . '"><input type="hidden" name="'
212
+                    . $this->getName()
213
+                    . '[itemname]['
214
+                    . $option['id']
215
+                    . ']" value="'
216
+                    . htmlspecialchars($option['name'], ENT_QUOTES)
217
+                    . "\"><br>\n";
218 218
         if (isset($option['children'])) {
219 219
             foreach ($option['children'] as $child) {
220 220
                 array_push($parentIds, $option['id']);
Please login to merge, or discard this patch.