Completed
Push — master ( f47147...0adc58 )
by
unknown
02:15
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.
blocks/xoopsfaq_rand.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
         $xpFaqObj = $xpFaqObjArray[$faqNum];
75 75
         $faq      = $myts->displayTarea($xpFaqObj->getVar('contents_title'));
76 76
         $txtAns   = strip_tags($xpFaqObj->getVar('contents_contents')); // get rid of html for block
77
-        $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0 ,0 ,0 ,0);
77
+        $faqAns   = $myts->displayTarea(xoops_substr($txtAns, 0, $options[0]), 0, 0, 0, 0, 0);
78 78
 
79 79
         $xfCatHandler = $xfHelper->getHandler('category');
80 80
         $catObj       = $xfCatHandler->get($xpFaqObj->getVar('contents_cid'));
81 81
         $cid          = $catObj->getVar('category_id');
82
-        $block = array( 'title' => _MB_XOOPSFAQ_RANDOM_TITLE,
82
+        $block = array('title' => _MB_XOOPSFAQ_RANDOM_TITLE,
83 83
                           'faq' => $faq,
84 84
                        'faqans' => $faqAns,
85 85
                      'morelink' => $xfHelper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     $formSelect->addOptionArray($optionArray);
115 115
     $selOptions = (false === strpos($options[1], ',')) ? $options[1] : explode(',', $options[1]);
116 116
     $formSelect->setValue($selOptions);
117
-    $selectCat   = $formSelect->render();
117
+    $selectCat = $formSelect->render();
118 118
 
119 119
     $form = '<div class="line140">'
120 120
           . _MB_XOOPSFAQ_CHARS . '&nbsp;'
Please login to merge, or discard this patch.
blocks/xoopsfaq_category.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     $moduleDirName = basename(dirname(__DIR__));
39 39
     xoops_load('constants', $moduleDirName);
40 40
 
41
-    $myts         = MyTextSanitizer::getInstance();
41
+    $myts = MyTextSanitizer::getInstance();
42 42
 
43 43
     /** @var XoopsfaqCategoryHandler $xfCatHandler */
44 44
     /** @var XoopsfaqContentsHandler $xfFaqHandler */
Please login to merge, or discard this patch.
include/onupdate.inc.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         $oldFiles = array($xfHelper->path('include/functions.php'),
132 132
                             $xfHelper->path('class/utilities.php')
133 133
         );
134
-        foreach($oldFiles as $file) {
134
+        foreach ($oldFiles as $file) {
135 135
             if (is_file($file)) {
136 136
                 if (false === ($delOk = unlink($file))) {
137 137
                     $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_REMOVE, $file));
Please login to merge, or discard this patch.
include/oninstall.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
    || !($GLOBALS['xoopsUser'] instanceof XoopsUser)
30 30
    || !($GLOBALS['xoopsUser']->isAdmin()))
31 31
 {
32
-     exit("Restricted access" . PHP_EOL);
32
+        exit("Restricted access" . PHP_EOL);
33 33
 }
34 34
 
35 35
 /**
Please login to merge, or discard this patch.
include/search.inc.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     $totalLimit = (int)$limit - $catCount;
71 71
     foreach ($catArray as $cId => $cat) {
72 72
         $ret[] = array ('image' => 'assets/images/folder.png',
73
-                         'link' => $xfHelper->url('index.php?cat_id=' . $cId),
73
+                            'link' => $xfHelper->url('index.php?cat_id=' . $cId),
74 74
                         'title' => $cat['category_title'],
75 75
         );
76 76
     }
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
     $contentArray = $xfFaqHandler->getAll($criteria, $contentFields, false);
101 101
     foreach ($contentArray as $content) {
102 102
         $ret[] = array ('image' => 'assets/images/question2.gif',
103
-                         'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
103
+                            'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
104 104
                         'title' => $content['contents_title'],
105
-                         'time' => $content['contents_publish'],
105
+                            'time' => $content['contents_publish'],
106 106
         );
107 107
     }
108 108
     unset($contentArray);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         return $ret;
44 44
     }
45 45
 
46
-    $moduleDirName = basename(dirname(__DIR__)) ;
46
+    $moduleDirName = basename(dirname(__DIR__));
47 47
     xoops_load('constants', $moduleDirName);
48 48
 
49 49
     /** @var XoopsfaqCategoryHandler $xfCatHandler */
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     $catCount   = !empty($catArray) ? count($catArray) : 0;
74 74
     $totalLimit = (int)$limit - $catCount;
75 75
     foreach ($catArray as $cId => $cat) {
76
-        $ret[] = array ('image' => 'assets/images/folder.png',
76
+        $ret[] = array('image' => 'assets/images/folder.png',
77 77
                          'link' => $xfHelper->url('index.php?cat_id=' . $cId),
78 78
                         'title' => $cat['category_title'],
79 79
         );
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     }
104 104
     $contentArray = $xfFaqHandler->getAll($criteria, $contentFields, false);
105 105
     foreach ($contentArray as $content) {
106
-        $ret[] = array ('image' => 'assets/images/question2.gif',
106
+        $ret[] = array('image' => 'assets/images/question2.gif',
107 107
                          'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
108 108
                         'title' => $content['contents_title'],
109 109
                          'time' => $content['contents_publish'],
Please login to merge, or discard this patch.
include/sitemap.plugin.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     $retVal = array() ;
34 34
     foreach ($catList as $id=>$title){
35 35
         $retVal['parent'][] = array('id' => $id,
36
-                                 'title' => $myts->htmlSpecialChars($title),
37
-                                   'url' => $xfHelper->url('index.php?cat_id=' . $id)
36
+                                    'title' => $myts->htmlSpecialChars($title),
37
+                                    'url' => $xfHelper->url('index.php?cat_id=' . $id)
38 38
         );
39 39
     }
40 40
     return $retVal;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     /** @var Xmf\Module\Helper\GenericHelper $xfHelper */
28 28
     $myts = MyTextSanitizer::getInstance();
29 29
 
30
-    $moduleDirName = basename(dirname(__DIR__)) ;
30
+    $moduleDirName = basename(dirname(__DIR__));
31 31
     $xfHelper      = Xmf\Module\Helper::getHelper($moduleDirName);
32 32
     $xfCatHandler  = $xfHelper->getHandler('category');
33 33
     $catList       = $xfCatHandler->getList();
34 34
 
35
-    $retVal = array() ;
36
-    foreach ($catList as $id=>$title){
35
+    $retVal = array();
36
+    foreach ($catList as $id=>$title) {
37 37
         $retVal['parent'][] = array('id' => $id,
38 38
                                  'title' => $myts->htmlSpecialChars($title),
39 39
                                    'url' => $xfHelper->url('index.php?cat_id=' . $id)
Please login to merge, or discard this patch.
admin/category.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
         $catId = Request::getInt('category_id', null);
37 37
         $obj   = $xfCatHandler->get($catId);
38 38
         if ($obj instanceof XoopsfaqCategory) {
39
-          $obj->displayForm();
39
+            $obj->displayForm();
40 40
         } else {
41
-          $xfCatHandler->displayError(_AM_XOOPSFAQ_ERROR_COULD_NOT_EDIT_CAT);
41
+            $xfCatHandler->displayError(_AM_XOOPSFAQ_ERROR_COULD_NOT_EDIT_CAT);
42 42
         }
43 43
         break;
44 44
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         break;
81 81
 
82 82
     case 'save':
83
-        if ( ($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity) ) {
84
-            if ( !$GLOBALS['xoopsSecurity']->check() ) {
83
+        if (($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity)) {
84
+            if (!$GLOBALS['xoopsSecurity']->check()) {
85 85
                 // failed xoops security check
86 86
                 $xfHelper->redirect('admin/index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true));
87 87
             }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     case 'default':
110 110
     default:
111 111
         $adminObject->displayNavigation('category.php');
112
-        $adminObject->addItemButton(_XO_XOOPSFAQ_ADDCAT, 'category.php?op=edit', 'add' , '');
112
+        $adminObject->addItemButton(_XO_XOOPSFAQ_ADDCAT, 'category.php?op=edit', 'add', '');
113 113
         $adminObject->displayButton('left');
114 114
         $xfCatHandler->displayAdminListing('order');
115 115
         break;
Please login to merge, or discard this patch.
admin/main.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,15 +74,15 @@
 block discarded – undo
74 74
         if (is_object($obj) && $obj instanceof XoopsfaqContents) {
75 75
             $contents_publish = strtotime(Request::getString('contents_publish', time(), 'POST'));
76 76
             $obj->setVars(array('contents_cid' => Request::getInt('contents_cid', XoopsfaqConstants::DEFAULT_CATEGORY, 'POST'),
77
-                              'contents_title' => Request::getString('contents_title', '', 'POST'),
78
-                           'contents_contents' => $contents_contents,
79
-                             'contents_weight' => Request::getInt('contents_weight', XoopsfaqConstants::DEFAULT_WEIGHT, 'POST'),
80
-                             'contents_active' => Request::getInt('contents_active', XoopsfaqConstants::ACTIVE, 'POST'),
77
+                                'contents_title' => Request::getString('contents_title', '', 'POST'),
78
+                            'contents_contents' => $contents_contents,
79
+                                'contents_weight' => Request::getInt('contents_weight', XoopsfaqConstants::DEFAULT_WEIGHT, 'POST'),
80
+                                'contents_active' => Request::getInt('contents_active', XoopsfaqConstants::ACTIVE, 'POST'),
81 81
                             'contents_publish' => $contents_publish,
82
-                                      'dohtml' => isset($_POST['dohtml']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
82
+                                        'dohtml' => isset($_POST['dohtml']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
83 83
                                     'dosmiley' => isset($_POST['dosmiley']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
84
-                                     'doxcode' => isset($_POST['doxcode']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
85
-                                     'doimage' => isset($_POST['doimage']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
84
+                                        'doxcode' => isset($_POST['doxcode']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
85
+                                        'doimage' => isset($_POST['doimage']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET,
86 86
                                         'dobr' => isset($_POST['dobr']) ? XoopsfaqConstants::SET : XoopsfaqConstants::NOTSET)
87 87
             );
88 88
             $ret = $xfFaqHandler->insert($obj, true);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $catCount = $xfCatHandler->getCount();
100 100
         $adminObject->displayNavigation(basename(__FILE__));
101 101
         if (!empty($catCount)) {
102
-            $adminObject->addItemButton(_AM_XOOPSFAQ_CREATE_NEW, basename(__FILE__) . '?op=edit', 'add' , '');
102
+            $adminObject->addItemButton(_AM_XOOPSFAQ_CREATE_NEW, basename(__FILE__) . '?op=edit', 'add', '');
103 103
             $adminObject->displayButton('left');
104 104
         }
105 105
         $xfFaqHandler->displayAdminListing('weight');
Please login to merge, or discard this patch.