Completed
Push — master ( 1b2f30...7ddb60 )
by Michael
05:43 queued 01:48
created
answer.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include_once __DIR__ . '/header.php';
9
+include_once __DIR__.'/header.php';
10 10
 
11 11
 global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule;
12 12
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 }
27 27
 
28 28
 // Getting the faqid
29
-$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
30
-$faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : $faqid;
29
+$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0;
30
+$faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : $faqid;
31 31
 
32 32
 // If no FAQ is selected, exit
33 33
 if ($faqid == 0) {
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
 
128 128
         // Storing the FAQ object in the database
129 129
         if (!$faqObj->store()) {
130
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($faqObj->getErrors()));
130
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($faqObj->getErrors()));
131 131
         }
132 132
 
133 133
         // Storing the answer object in the database
134 134
         if (!$newAnswerObj->store()) {
135
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($newAnswerObj->getErrors()));
135
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($newAnswerObj->getErrors()));
136 136
         }
137 137
 
138 138
         $notificationHandler = xoops_getHandler('notification');
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             case 2:
149 149
                 // Answer for an open question submitted, auto-approved; became Q&A, need approbation
150 150
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
151
-                    include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
151
+                    include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
152 152
                     $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
153 153
                 }
154 154
                 // Send notifications
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             case 3:
159 159
                 // Answer submitted, needs approbation
160 160
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
161
-                    include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
161
+                    include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
162 162
                     $notificationHandler->subscribe('question', $newAnswerObj->answerid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
163 163
                 }
164 164
                 // Send notifications
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 // New answer submitted for a published Q&A, need approbation
174 174
                 // Send notifications
175 175
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
176
-                    include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
176
+                    include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
177 177
                     $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
178 178
                 }
179 179
 
@@ -210,20 +210,20 @@  discard block
 block discarded – undo
210 210
         }
211 211
 
212 212
         $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
213
-        include_once(XOOPS_ROOT_PATH . '/header.php');
214
-        include_once __DIR__ . '/footer.php';
213
+        include_once(XOOPS_ROOT_PATH.'/header.php');
214
+        include_once __DIR__.'/footer.php';
215 215
 
216 216
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
217 217
 
218
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
218
+        $moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
219 219
         $xoopsTpl->assign('whereInSection', $moduleName);
220 220
         $xoopsTpl->assign('lang_submit', _MD_SF_SUBMITANSWER);
221 221
 
222 222
         $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUBMITANSWERTO, ucwords($xoopsModule->name())));
223
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUBMITANSWER_INTRO);
223
+        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUBMITANSWER_INTRO);
224 224
 
225 225
         include_once 'include/answer.inc.php';
226 226
 
227
-        include_once XOOPS_ROOT_PATH . '/footer.php';
227
+        include_once XOOPS_ROOT_PATH.'/footer.php';
228 228
         break;
229 229
 }
Please login to merge, or discard this patch.
blocks/faqs_recent_questions.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 function b_faqs_recent_questions_show($options)
13 13
 {
14
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
14
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
15 15
 
16 16
     $block = array();
17 17
 
@@ -60,44 +60,44 @@  discard block
 block discarded – undo
60 60
  */
61 61
 function b_faqs_recent_questions_edit($options)
62 62
 {
63
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
63
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
64 64
 
65 65
     $form = sf_createCategorySelect($options[0]);
66 66
 
67
-    $form .= '&nbsp;<br>' . _MB_SF_ORDER . "&nbsp;<select name='options[]'>";
67
+    $form .= '&nbsp;<br>'._MB_SF_ORDER."&nbsp;<select name='options[]'>";
68 68
 
69 69
     $form .= "<option value='datesub'";
70 70
     if ($options[1] === 'datesub') {
71 71
         $form .= " selected='selected'";
72 72
     }
73
-    $form .= '>' . _MB_SF_DATE . "</option>\n";
73
+    $form .= '>'._MB_SF_DATE."</option>\n";
74 74
 
75 75
     $form .= "<option value='counter'";
76 76
     if ($options[1] === 'counter') {
77 77
         $form .= " selected='selected'";
78 78
     }
79
-    $form .= '>' . _MB_SF_HITS . "</option>\n";
79
+    $form .= '>'._MB_SF_HITS."</option>\n";
80 80
 
81 81
     $form .= "<option value='weight'";
82 82
     if ($options[1] === 'weight') {
83 83
         $form .= " selected='selected'";
84 84
     }
85
-    $form .= '>' . _MB_SF_WEIGHT . "</option>\n";
85
+    $form .= '>'._MB_SF_WEIGHT."</option>\n";
86 86
 
87 87
     $form .= "</select>\n";
88 88
 
89
-    $form .= '&nbsp;' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "' />&nbsp;" . _MB_SF_QUESTIONS . '';
90
-    $form .= '&nbsp;<br>' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[3] . "' />&nbsp;" . _MB_SF_LENGTH . '';
89
+    $form .= '&nbsp;'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_SF_QUESTIONS.'';
90
+    $form .= '&nbsp;<br>'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[3]."' />&nbsp;"._MB_SF_LENGTH.'';
91 91
 
92
-    $form .= '<br />' . _MB_SF_SHOW_DATE . "&nbsp;<input type='radio' id='options[]' name='options[]' value='1'";
92
+    $form .= '<br />'._MB_SF_SHOW_DATE."&nbsp;<input type='radio' id='options[]' name='options[]' value='1'";
93 93
     if ($options[4] == 1) {
94 94
         $form .= " checked='checked'";
95 95
     }
96
-    $form .= ' />&nbsp;' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'";
96
+    $form .= ' />&nbsp;'._YES."<input type='radio' id='options[]' name='options[]' value='0'";
97 97
     if ($options[4] == 0) {
98 98
         $form .= " checked='checked'";
99 99
     }
100
-    $form .= ' />&nbsp;' . _NO . '';
100
+    $form .= ' />&nbsp;'._NO.'';
101 101
 
102 102
     return $form;
103 103
 }
Please login to merge, or discard this patch.
blocks/faqs_random_diduno.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 function b_faqs_random_diduno_show()
11 11
 {
12
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
12
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
13 13
 
14 14
     $block = array();
15 15
 
Please login to merge, or discard this patch.
blocks/faqs_context.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 function b_faqs_context_show($options)
13 13
 {
14
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
14
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
15 15
 
16 16
     $block = array();
17 17
 
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function b_faqs_context_edit($options)
50 50
 {
51
-    $form = '' . _MB_SF_DISP . '&nbsp;';
52
-    $form .= "<input type='text' name='options[]' value='" . $options[0] . "' />&nbsp;" . _MB_SF_FAQS . '';
51
+    $form = ''._MB_SF_DISP.'&nbsp;';
52
+    $form .= "<input type='text' name='options[]' value='".$options[0]."' />&nbsp;"._MB_SF_FAQS.'';
53 53
 
54 54
     return $form;
55 55
 }
Please login to merge, or discard this patch.
blocks/faqs_recent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 function b_faqs_recent_show($options)
13 13
 {
14
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
14
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
15 15
     $myts = MyTextSanitizer::getInstance();
16 16
 
17 17
     $smartModule       = sf_getModuleInfo();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         $memberHandler = xoops_getHandler('member');
55
-        $users         = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
55
+        $users         = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
56 56
         for ($i = 0, $iMax = count($faqsObj); $i < $iMax; ++$i) {
57 57
             $faqs['categoryid']   = $faqsObj[$i]->categoryid();
58 58
             $faqs['question']     = $faqsObj[$i]->question($maxQuestionLength);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $faqs['categoryname'] = $allcategories[$faqsObj[$i]->categoryid()]->getVar('name');
61 61
 
62 62
             // Creating the answer object
63
-            $answerObj =& $allanswers[$faqsObj[$i]->faqid()];
63
+            $answerObj = & $allanswers[$faqsObj[$i]->faqid()];
64 64
 
65 65
             $faqs['date'] = $faqsObj[$i]->datesub();
66 66
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $block['lang_poster']   = _MB_SF_ANSWEREDBY;
75 75
         $block['lang_date']     = _MB_SF_DATE;
76 76
         $modulename             = $myts->htmlSpecialChars($smartModule->getVar('name'));
77
-        $block['lang_visitfaq'] = _MB_SF_VISITFAQ . ' ' . $modulename;
77
+        $block['lang_visitfaq'] = _MB_SF_VISITFAQ.' '.$modulename;
78 78
     }
79 79
 
80 80
     return $block;
@@ -86,34 +86,34 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function b_faqs_recent_edit($options)
88 88
 {
89
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
89
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
90 90
 
91 91
     $form = sf_createCategorySelect($options[0]);
92 92
 
93
-    $form .= '&nbsp;<br>' . _MB_SF_ORDER . "&nbsp;<select name='options[]'>";
93
+    $form .= '&nbsp;<br>'._MB_SF_ORDER."&nbsp;<select name='options[]'>";
94 94
 
95 95
     $form .= "<option value='datesub'";
96 96
     if ($options[1] === 'datesub') {
97 97
         $form .= " selected='selected'";
98 98
     }
99
-    $form .= '>' . _MB_SF_DATE . "</option>\n";
99
+    $form .= '>'._MB_SF_DATE."</option>\n";
100 100
 
101 101
     $form .= "<option value='counter'";
102 102
     if ($options[1] === 'counter') {
103 103
         $form .= " selected='selected'";
104 104
     }
105
-    $form .= '>' . _MB_SF_HITS . "</option>\n";
105
+    $form .= '>'._MB_SF_HITS."</option>\n";
106 106
 
107 107
     $form .= "<option value='weight'";
108 108
     if ($options[1] === 'weight') {
109 109
         $form .= " selected='selected'";
110 110
     }
111
-    $form .= '>' . _MB_SF_WEIGHT . "</option>\n";
111
+    $form .= '>'._MB_SF_WEIGHT."</option>\n";
112 112
 
113 113
     $form .= "</select>\n";
114 114
 
115
-    $form .= '&nbsp;' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "' />&nbsp;" . _MB_SF_FAQS . '';
116
-    $form .= '&nbsp;<br>' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[3] . "' />&nbsp;" . _MB_SF_LENGTH . '';
115
+    $form .= '&nbsp;'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_SF_FAQS.'';
116
+    $form .= '&nbsp;<br>'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[3]."' />&nbsp;"._MB_SF_LENGTH.'';
117 117
 
118 118
     return $form;
119 119
 }
Please login to merge, or discard this patch.
blocks/faqs_most_viewed.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 function b_faqs_most_viewed_show($options)
13 13
 {
14
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
14
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
15 15
 
16 16
     $block = array();
17 17
     if ($options[0] == 0) {
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 function b_faqs_most_viewed_edit($options)
49 49
 {
50 50
     global $xoopsDB, $xoopsModule, $xoopsUser;
51
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
51
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
52 52
 
53 53
     $form = sf_createCategorySelect($options[0]);
54 54
 
55
-    $form .= '&nbsp;<br />' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[1] . "' />&nbsp;" . _MB_SF_FAQS . '';
56
-    $form .= '&nbsp;<br />' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "' />&nbsp;" . _MB_SF_LENGTH . '';
55
+    $form .= '&nbsp;<br />'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[1]."' />&nbsp;"._MB_SF_FAQS.'';
56
+    $form .= '&nbsp;<br />'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_SF_LENGTH.'';
57 57
 
58 58
     return $form;
59 59
 }
Please login to merge, or discard this patch.
blocks/faqs_new.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 function b_faqs_new_show($options)
13 13
 {
14
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
14
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
15 15
 
16 16
     $block = array();
17 17
 
@@ -57,44 +57,44 @@  discard block
 block discarded – undo
57 57
 function b_faqs_new_edit($options)
58 58
 {
59 59
     global $xoopsDB, $xoopsModule, $xoopsUser;
60
-    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
60
+    include_once(XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php');
61 61
 
62 62
     $form = sf_createCategorySelect($options[0]);
63 63
 
64
-    $form .= '&nbsp;<br>' . _MB_SF_ORDER . "&nbsp;<select name='options[]'>";
64
+    $form .= '&nbsp;<br>'._MB_SF_ORDER."&nbsp;<select name='options[]'>";
65 65
 
66 66
     $form .= "<option value='datesub'";
67 67
     if ($options[1] === 'datesub') {
68 68
         $form .= " selected='selected'";
69 69
     }
70
-    $form .= '>' . _MB_SF_DATE . "</option>\n";
70
+    $form .= '>'._MB_SF_DATE."</option>\n";
71 71
 
72 72
     $form .= "<option value='counter'";
73 73
     if ($options[1] === 'counter') {
74 74
         $form .= " selected='selected'";
75 75
     }
76
-    $form .= '>' . _MB_SF_HITS . "</option>\n";
76
+    $form .= '>'._MB_SF_HITS."</option>\n";
77 77
 
78 78
     $form .= "<option value='weight'";
79 79
     if ($options[1] === 'weight') {
80 80
         $form .= " selected='selected'";
81 81
     }
82
-    $form .= '>' . _MB_SF_WEIGHT . "</option>\n";
82
+    $form .= '>'._MB_SF_WEIGHT."</option>\n";
83 83
 
84 84
     $form .= "</select>\n";
85 85
 
86
-    $form .= '&nbsp;' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "' />&nbsp;" . _MB_SF_FAQS . '';
87
-    $form .= '&nbsp;<br>' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[3] . "' />&nbsp;" . _MB_SF_LENGTH . '';
86
+    $form .= '&nbsp;'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_SF_FAQS.'';
87
+    $form .= '&nbsp;<br>'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[3]."' />&nbsp;"._MB_SF_LENGTH.'';
88 88
 
89
-    $form .= '<br />' . _MB_SF_SHOW_DATE . "&nbsp;<input type='radio' id='options[]' name='options[]' value='1'";
89
+    $form .= '<br />'._MB_SF_SHOW_DATE."&nbsp;<input type='radio' id='options[]' name='options[]' value='1'";
90 90
     if ($options[4] == 1) {
91 91
         $form .= " checked='checked'";
92 92
     }
93
-    $form .= ' />&nbsp;' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'";
93
+    $form .= ' />&nbsp;'._YES."<input type='radio' id='options[]' name='options[]' value='0'";
94 94
     if ($options[4] == 0) {
95 95
         $form .= " checked='checked'";
96 96
     }
97
-    $form .= ' />&nbsp;' . _NO . '';
97
+    $form .= ' />&nbsp;'._NO.'';
98 98
 
99 99
     return $form;
100 100
 }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
  * Author: The SmartFactory <www.smartfactory.ca>
6 6
  * Licence: GNU
7 7
  */
8
-include_once __DIR__ . '/header.php';
8
+include_once __DIR__.'/header.php';
9 9
 
10 10
 // At which record shall we start for the Categories
11
-$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0;
11
+$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0;
12 12
 
13 13
 // At which record shall we start for the FAQ
14
-$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
14
+$start = isset($_GET['start']) ? (int) $_GET['start'] : 0;
15 15
 
16 16
 // Creating the category handler object
17 17
 $categoryHandler = sf_gethandler('category');
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
 $xoopsOption['template_main'] = 'smartfaq_index.tpl';
36 36
 
37
-include_once(XOOPS_ROOT_PATH . '/header.php');
38
-include_once __DIR__ . '/footer.php';
37
+include_once(XOOPS_ROOT_PATH.'/header.php');
38
+include_once __DIR__.'/footer.php';
39 39
 
40 40
 // Creating the categories objects
41 41
 $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     // Get the last smartfaq in each category
59 59
     $last_qnaObj = $faqHandler->getLastPublishedByCat();
60 60
 }
61
-$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize'];
61
+$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize'];
62 62
 $categories  = array();
63 63
 foreach ($categoriesObj as $cat_id => $category) {
64 64
     $total = 0;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) {
69 69
                 if (isset($last_qnaObj[$subcat_id])) {
70 70
                     $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid'));
71
-                    $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>');
71
+                    $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>');
72 72
                 }
73 73
                 $subcat->setVar('faqcount', $totalQnas[$subcat_id]);
74 74
                 if ($xoopsModuleConfig['displaysubcatonindex']) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     if ($total > 0) {
87 87
         if (isset($last_qnaObj[$cat_id])) {
88 88
             $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid'));
89
-            $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>');
89
+            $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>');
90 90
         }
91 91
         $category->setVar('faqcount', $total);
92 92
         if (!isset($categories[$cat_id])) {
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
         }
125 125
 
126 126
         $memberHandler = xoops_getHandler('member');
127
-        $users         = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
127
+        $users         = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
128 128
         for ($i = 0; $i < $totalQnasOnPage; ++$i) {
129 129
             $faq = $faqsObj[$i]->toArray(null, $allcategories);
130 130
 
131 131
             // Creating the answer object
132
-            $answerObj =& $allanswers[$faqsObj[$i]->faqid()];
132
+            $answerObj = & $allanswers[$faqsObj[$i]->faqid()];
133 133
 
134 134
             $answerObj->setVar('dohtml', $faqsObj[$i]->getVar('html'));
135 135
             $answerObj->setVar('doxcode', $faqsObj[$i]->getVar('xcodes'));
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
 }
151 151
 
152 152
 // Language constants
153
-$moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
153
+$moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
154 154
 $xoopsTpl->assign('whereInSection', $moduleName);
155 155
 $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']);
156 156
 $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']);
157 157
 $xoopsTpl->assign('display_categoryname', true);
158 158
 $xoopsTpl->assign('displayFull', $xoopsModuleConfig['displaytype'] === 'full');
159 159
 
160
-$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName);
160
+$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName);
161 161
 $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1));
162 162
 $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS);
163 163
 $xoopsTpl->assign('lang_home', _MD_SF_HOME);
@@ -176,20 +176,20 @@  discard block
 block discarded – undo
176 176
 $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS);
177 177
 
178 178
 // Category Navigation Bar
179
-include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
179
+include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
180 180
 $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', '');
181 181
 if ($xoopsModuleConfig['useimagenavpage'] == 1) {
182
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
182
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
183 183
 } else {
184
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
184
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
185 185
 }
186 186
 
187 187
 // FAQ Navigation Bar
188 188
 $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', '');
189 189
 if ($xoopsModuleConfig['useimagenavpage'] == 1) {
190
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
190
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
191 191
 } else {
192
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
192
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
193 193
 }
194 194
 
195 195
 // Page Title Hack by marcan
@@ -197,4 +197,4 @@  discard block
 block discarded – undo
197 197
 $xoopsTpl->assign('xoops_pagetitle', $module_name);
198 198
 // End Page Title Hack by marcan
199 199
 
200
-include_once(XOOPS_ROOT_PATH . '/footer.php');
200
+include_once(XOOPS_ROOT_PATH.'/footer.php');
Please login to merge, or discard this patch.
footer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 $uid     = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
12 12
 $isAdmin = (sf_userIsAdmin() || sf_moderator());
13 13
 
14
-$xoopsTpl->assign('sf_adminpage', "<a href='" . XOOPS_URL . "/modules/smartfaq/admin/index.php'>" . _MD_SF_ADMIN_PAGE . '</a>');
14
+$xoopsTpl->assign('sf_adminpage', "<a href='".XOOPS_URL."/modules/smartfaq/admin/index.php'>"._MD_SF_ADMIN_PAGE.'</a>');
15 15
 $xoopsTpl->assign('isAdmin', $isAdmin);
16 16
 
17 17
 $xoopsTpl->assign(array('lang_on' => _MD_SF_ON, 'lang_postedby' => _MD_SF_POSTEDBY, 'lang_faq' => _MD_SF_QUESTION, 'lang_datesub' => _MD_SF_DATESUB, 'lang_hits' => _MD_SF_HITS));
@@ -28,4 +28,4 @@  discard block
 block discarded – undo
28 28
 
29 29
 $xoopsTpl->assign('ref_smartfaq', 'SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)');
30 30
 
31
-$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='" . XOOPS_URL . "/modules/smartfaq/assets/css/smartfaq.css'/>");
31
+$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartfaq/assets/css/smartfaq.css'/>");
Please login to merge, or discard this patch.