Completed
Push — master ( 8e5652...4e30dc )
by Michael
02:28
created
admin/permissions.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,14 +59,14 @@
 block discarded – undo
59 59
             echo $form_view->render();
60 60
         } else {
61 61
             echo "<img id='toptableicon' src="
62
-                 . XOOPS_URL
63
-                 . '/modules/'
64
-                 . $xoopsModule->dirname()
65
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
-                 . _AM_SF_PERMISSIONSVIEWMAN
67
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
-                 . _AM_SF_NOPERMSSET
69
-                 . '</span>';
62
+                    . XOOPS_URL
63
+                    . '/modules/'
64
+                    . $xoopsModule->dirname()
65
+                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
+                    . _AM_SF_PERMISSIONSVIEWMAN
67
+                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
+                    . _AM_SF_NOPERMSSET
69
+                    . '</span>';
70 70
         }
71 71
         echo '</div>';
72 72
 
Please login to merge, or discard this 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.
include/blocksadmin.inc.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -70,18 +70,18 @@
 block discarded – undo
70 70
     $myblock->setVar('title', $myts->stripSlashesGPC($btitle));
71 71
     $myblock->setVar('content', $myts->stripSlashesGPC($bcontent));
72 72
     $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='
73
-                 . _CHARSET
74
-                 . '"><meta http-equiv="content-language" content="'
75
-                 . _LANGCODE
76
-                 . '"><title>'
77
-                 . $xoopsConfig['sitename']
78
-                 . '</title><link rel="stylesheet" type="text/css" media="all" href="'
79
-                 . getcss($xoopsConfig['theme_set'])
80
-                 . '"></head><body><table><tr><th>'
81
-                 . $myblock->getVar('title')
82
-                 . '</th></tr><tr><td>'
83
-                 . $myblock->getContent('S', $bctype)
84
-                 . '</td></tr></table></body></html>';
73
+                    . _CHARSET
74
+                    . '"><meta http-equiv="content-language" content="'
75
+                    . _LANGCODE
76
+                    . '"><title>'
77
+                    . $xoopsConfig['sitename']
78
+                    . '</title><link rel="stylesheet" type="text/css" media="all" href="'
79
+                    . getcss($xoopsConfig['theme_set'])
80
+                    . '"></head><body><table><tr><th>'
81
+                    . $myblock->getVar('title')
82
+                    . '</th></tr><tr><td>'
83
+                    . $myblock->getContent('S', $bctype)
84
+                    . '</td></tr></table></body></html>';
85 85
 
86 86
     $dummyfile = '_dummyfile_' . time() . '.html';
87 87
     $fp        = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w');
Please login to merge, or discard this patch.
open_index.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@
 block discarded – undo
116 116
 // Language constants
117 117
 $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
118 118
 $xoopsTpl->assign([
119
-                      'lang_on'       => _MD_SF_ON,
120
-                      'lang_postedby' => _MD_SF_POSTEDBY,
121
-                      'lang_total'    => $totalQnasOnPage,
122
-                      'lang_faq'      => _MD_SF_FAQ,
123
-                      'lang_datesub'  => _MD_SF_DATESUB,
124
-                      'lang_hits'     => _MD_SF_HITS
125
-                  ]);
119
+                        'lang_on'       => _MD_SF_ON,
120
+                        'lang_postedby' => _MD_SF_POSTEDBY,
121
+                        'lang_total'    => $totalQnasOnPage,
122
+                        'lang_faq'      => _MD_SF_FAQ,
123
+                        'lang_datesub'  => _MD_SF_DATESUB,
124
+                        'lang_hits'     => _MD_SF_HITS
125
+                    ]);
126 126
 
127 127
 $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
128 128
 $xoopsTpl->assign('lang_mainhead', sprintf(_MD_SF_OPEN_WELCOME, $xoopsConfig['sitename']));
Please login to merge, or discard this patch.
footer.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 $xoopsTpl->assign('isAdmin', $isAdmin);
16 16
 
17 17
 $xoopsTpl->assign([
18
-                      'lang_on'       => _MD_SF_ON,
19
-                      'lang_postedby' => _MD_SF_POSTEDBY,
20
-                      'lang_faq'      => _MD_SF_QUESTION,
21
-                      'lang_datesub'  => _MD_SF_DATESUB,
22
-                      'lang_hits'     => _MD_SF_HITS
23
-                  ]);
18
+                        'lang_on'       => _MD_SF_ON,
19
+                        'lang_postedby' => _MD_SF_POSTEDBY,
20
+                        'lang_faq'      => _MD_SF_QUESTION,
21
+                        'lang_datesub'  => _MD_SF_DATESUB,
22
+                        'lang_hits'     => _MD_SF_HITS
23
+                    ]);
24 24
 $xoopsTpl->assign('sectionname', $myts->displayTarea($xoopsModule->getVar('name')));
25 25
 
26 26
 $xoopsTpl->assign('modulename', $xoopsModule->dirname());
Please login to merge, or discard this patch.
admin/category.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -46,18 +46,18 @@  discard block
 block discarded – undo
46 46
 
47 47
     echo '<tr>';
48 48
     echo "<td class='even' align='lefet'>"
49
-         . $spaces
50
-         . "<a href='"
51
-         . XOOPS_URL
52
-         . '/modules/'
53
-         . $xoopsModule->dirname()
54
-         . '/category.php?categoryid='
55
-         . $categoryObj->categoryid()
56
-         . "'><img src='"
57
-         . XOOPS_URL
58
-         . "/modules/smartfaq/assets/images/icon/subcat.gif' alt=''>&nbsp;"
59
-         . $categoryObj->name()
60
-         . '</a></td>';
49
+            . $spaces
50
+            . "<a href='"
51
+            . XOOPS_URL
52
+            . '/modules/'
53
+            . $xoopsModule->dirname()
54
+            . '/category.php?categoryid='
55
+            . $categoryObj->categoryid()
56
+            . "'><img src='"
57
+            . XOOPS_URL
58
+            . "/modules/smartfaq/assets/images/icon/subcat.gif' alt=''>&nbsp;"
59
+            . $categoryObj->name()
60
+            . '</a></td>';
61 61
     echo "<td class='even' align='left'>" . $description . '</td>';
62 62
     echo "<td class='even' align='center'>" . $categoryObj->weight() . '</td>';
63 63
     echo "<td class='even' align='center'> $modify $delete </td>";
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
             $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
315 315
             xoops_cp_header();
316 316
             xoops_confirm([
317
-                              'op'         => 'del',
318
-                              'categoryid' => $categoryObj->categoryid(),
319
-                              'confirm'    => 1,
320
-                              'name'       => $categoryObj->name()
321
-                          ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
317
+                                'op'         => 'del',
318
+                                'categoryid' => $categoryObj->categoryid(),
319
+                                'confirm'    => 1,
320
+                                'name'       => $categoryObj->name()
321
+                            ], 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
322 322
             xoops_cp_footer();
323 323
         }
324 324
         exit();
Please login to merge, or discard this 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/question.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -284,11 +284,11 @@
 block discarded – undo
284 284
             $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
285 285
             xoops_cp_header();
286 286
             xoops_confirm([
287
-                              'op'      => 'del',
288
-                              'faqid'   => $faqObj->faqid(),
289
-                              'confirm' => 1,
290
-                              'name'    => $faqObj->question()
291
-                          ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
287
+                                'op'      => 'del',
288
+                                'faqid'   => $faqObj->faqid(),
289
+                                'confirm' => 1,
290
+                                'name'    => $faqObj->question()
291
+                            ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
292 292
             xoops_cp_footer();
293 293
         }
294 294
 
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 define('_MI_SF_REQUESTINTROMSGDSC', 'Introduction message to be displayed in the Request a Q&amp;A page of the module.');
116 116
 define(
117 117
     '_MI_SF_REQUESTINTROMSGDEF',
118
-       'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
118
+        'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
119 119
 );
120 120
 
121 121
 define('_MI_SF_OPENINTROMSG', 'Open Questions section introduction message:');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 define('_MI_SF_HELP_PATH_SELECT', "Path of SmartFAQ's help files");
129 129
 define(
130 130
     '_MI_SF_HELP_PATH_SELECT_DSC',
131
-       "SELECT FROM where you would LIKE TO access SmartFAQ's help files. If you downloaded the 'SmartFAQ's Help Package' AND uploaded it IN 'modules/smartfaq/doc/', you can SELECT 'Inside the module'. Alternatively, you can access the module's help file directly from docs.xoops.org by chosing this in the selector. You can also select 'Custom Path' and specify yourself the path of the help files in the next config option 'Custom path of SmartFAQ's help files'"
131
+        "SELECT FROM where you would LIKE TO access SmartFAQ's help files. If you downloaded the 'SmartFAQ's Help Package' AND uploaded it IN 'modules/smartfaq/doc/', you can SELECT 'Inside the module'. Alternatively, you can access the module's help file directly from docs.xoops.org by chosing this in the selector. You can also select 'Custom Path' and specify yourself the path of the help files in the next config option 'Custom path of SmartFAQ's help files'"
132 132
 );
133 133
 
134 134
 define('_MI_SF_HELP_PATH_CUSTOM', "Custom path of SmartFAQ's help files");
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 define('_MI_SF_DIR_ATTACHMENT', 'Attachments physical path.');
352 352
 define(
353 353
     '_MI_SF_DIR_ATTACHMENT_DESC',
354
-       "Physical path only needs to be set from your xoops root and not before, for example you may have attachments uploaded to www.yoururl.com/uploads/newbb the path entered would then be '/uploads/newbb' never include a trailing slash '/' the thumbnails path becomes '/uploads/newbb/thumbs'"
354
+        "Physical path only needs to be set from your xoops root and not before, for example you may have attachments uploaded to www.yoururl.com/uploads/newbb the path entered would then be '/uploads/newbb' never include a trailing slash '/' the thumbnails path becomes '/uploads/newbb/thumbs'"
355 355
 );
356 356
 define('_MI_SF_PATH_MAGICK', 'Path for ImageMagick');
357 357
 define('_MI_SF_PATH_MAGICK_DESC', "Usually it is '/usr/bin/X11'. Leave it BLANK if you do not have ImageMagicK installed or for autodetecting.");
Please login to merge, or discard this patch.
language/english/main.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 define('_MD_SF_MAINHEAD', 'Welcome to the');
77 77
 define(
78 78
     '_MD_SF_MAININTRO',
79
-       "In this area of the site, you will find the answers to the frequently asked questions. Each Q&amp;A is placed in a category for easier finding. This is the section from where the random Q&amp;As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='"
80
-       . XOOPS_URL
81
-       . "/forms/askus/form.php'>Ask us a Question!</a>"
79
+        "In this area of the site, you will find the answers to the frequently asked questions. Each Q&amp;A is placed in a category for easier finding. This is the section from where the random Q&amp;As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='"
80
+        . XOOPS_URL
81
+        . "/forms/askus/form.php'>Ask us a Question!</a>"
82 82
 );
83 83
 define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category');
84 84
 define('_MD_SF_MAINNOFAQS', 'There are no Q&amp;As in this category');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 define('_MD_SF_REQUEST_ERROR', 'An error occured. Your request was not sent.');
121 121
 define(
122 122
     '_MD_SF_REQUEST_INTRO',
123
-       'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
123
+        'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
124 124
 );
125 125
 define('_MD_SF_REQUEST_RECEIVED_NEED_APPROVAL', 'Your request has been sent and will be published in the Open Questions section upon approval by a moderator.<br>Thank you for your contribution!');
126 126
 define('_MD_SF_REQUEST_RECEIVED_AND_PUBLISHED', 'Your request has been sent and automatically published in the Open Questions section. Thank you for your contribution!');
Please login to merge, or discard this patch.
language/english/admin.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 define('_AM_SF_CONTEXTMODULELINK', 'Contextually linked to this module');
79 79
 define(
80 80
     '_AM_SF_CONTEXTMODULELINK_FAQ',
81
-       "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&amp;A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&amp;A will be displayed.</span>"
81
+        "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&amp;A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&amp;A will be displayed.</span>"
82 82
 );
83 83
 define('_AM_SF_CONTEXTOPTIONS', 'Contextual options');
84 84
 define('_AM_SF_CONTEXTPAGE', 'Contextually linked to this URL');
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 define('_AM_SF_ERROR_FAQ_NOT_SAVED', 'An error occured. The Q&amp;A was not saved in the database.');
122 122
 define(
123 123
     '_AM_SF_EXACTURL',
124
-       "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&amp;A will only display in the'Specific URL set above'. If set to 'No', the Q&amp;A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"
124
+        "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&amp;A will only display in the'Specific URL set above'. If set to 'No', the Q&amp;A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"
125 125
 );
126 126
 define('_AM_SF_FAQ_EDIT', 'Edit this Q&amp;A');
127 127
 define('_AM_SF_FAQ_NEW_ANSWER_PUBLISHED', 'The original answer was replaced by this answer.');
Please login to merge, or discard this patch.