Completed
Push — master ( 0d7d1b...48b96e )
by Michael
02:08
created
include/comment_functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 function smartfaq_com_update($faq_id, $total_num)
12 12
 {
13 13
     $db  = XoopsDatabaseFactory::getDatabaseConnection();
14
-    $sql = 'UPDATE ' . $db->prefix('smartfaq_faq') . ' SET comments = ' . $total_num . ' WHERE faqid = ' . $faq_id;
14
+    $sql = 'UPDATE '.$db->prefix('smartfaq_faq').' SET comments = '.$total_num.' WHERE faqid = '.$faq_id;
15 15
     $db->query($sql);
16 16
 }
17 17
 
Please login to merge, or discard this patch.
language/english/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 define('_MD_SF_SPECIFIC_URL_SELECT', 'Specific URL...');
133 133
 define('_MD_SF_SENDSTORY', 'Send this Q&A to a friend');
134 134
 define('_MD_SF_SPECIFIC_URL', 'Specific URL');
135
-define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>" . _MD_SF_SPECIFIC_URL_SELECT . "</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb");
135
+define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>"._MD_SF_SPECIFIC_URL_SELECT."</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb");
136 136
 define('_MD_SF_SUB_INTRO', 'please fill this form to send your Q&amp;A. The site administrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.');
137 137
 define('_MD_SF_SUB_SNEWNAME', 'Submit a Q&amp;A');
138 138
 define('_MD_SF_SUB_SMNAME', 'Submit a Q&amp;A');
Please login to merge, or discard this patch.
notification_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-include XOOPS_ROOT_PATH . '/include/notification_update.php';
9
+include __DIR__.'/../../mainfile.php';
10
+include XOOPS_ROOT_PATH.'/include/notification_update.php';
Please login to merge, or discard this patch.
comment_reply.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/include/comment_reply.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/include/comment_reply.php';
Please login to merge, or discard this patch.
blocks/faqs_recent.php 1 patch
Spacing   +10 added lines, -10 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
-    require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
14
+    require_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);
@@ -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
-    require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
89
+    require_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';
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';
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';
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.
faq.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-require_once __DIR__ . '/header.php';
9
+require_once __DIR__.'/header.php';
10 10
 
11
-$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
11
+$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0;
12 12
 
13 13
 if ($faqid == 0) {
14 14
     redirect_header('javascript:history.go(-1)', 1, _MD_SF_NOFAQSELECTED);
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
     $faqObj->updateCounter();
45 45
 }
46 46
 $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_faq.tpl';
47
-require_once XOOPS_ROOT_PATH . '/header.php';
48
-require_once __DIR__ . '/footer.php';
47
+require_once XOOPS_ROOT_PATH.'/header.php';
48
+require_once __DIR__.'/footer.php';
49 49
 
50 50
 $faq = $faqObj->toArray(null, $categoryObj, false);
51 51
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 $xoopsTpl->assign('display_categoryname', false);
81 81
 
82 82
 $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes'));
83
-$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&amp;body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $faqObj->getVar('faqid'));
83
+$xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&amp;body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$faqObj->getVar('faqid'));
84 84
 $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY);
85 85
 $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY);
86 86
 $xoopsTpl->assign('faqid', $faqObj->getVar('faqid'));
@@ -96,19 +96,19 @@  discard block
 block discarded – undo
96 96
 
97 97
 // Page Title Hack by marcan
98 98
 $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
99
-$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $categoryObj->name() . ' - ' . $faq['question']);
99
+$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$categoryObj->name().' - '.$faq['question']);
100 100
 // End Page Title Hack by marcan
101 101
 
102 102
 // Include the comments if the selected FAQ supports comments
103 103
 if ($faqObj->cancomment() == 1) {
104
-    require_once XOOPS_ROOT_PATH . '/include/comment_view.php';
104
+    require_once XOOPS_ROOT_PATH.'/include/comment_view.php';
105 105
 }
106 106
 
107 107
 //code to include smartie
108
-if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) {
109
-    require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php';
108
+if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) {
109
+    require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php';
110 110
     $xoopsTpl->assign('smarttie', 1);
111 111
 }
112 112
 //end code for smarttie
113 113
 
114
-require_once XOOPS_ROOT_PATH . '/footer.php';
114
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
9
+include __DIR__.'/../../mainfile.php';
10 10
 
11
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
12
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php';
13
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php';
14
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php';
11
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php';
13
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php';
14
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php';
15 15
 
16 16
 $myts = MyTextSanitizer::getInstance();
Please login to merge, or discard this patch.
comment_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/include/comment_edit.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/include/comment_edit.php';
Please login to merge, or discard this patch.
answer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 use Xmf\Request;
10 10
 
11
-require_once __DIR__ . '/header.php';
11
+require_once __DIR__.'/header.php';
12 12
 
13 13
 global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule;
14 14
 
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 
130 130
         // Storing the FAQ object in the database
131 131
         if (!$faqObj->store()) {
132
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($faqObj->getErrors()));
132
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($faqObj->getErrors()));
133 133
         }
134 134
 
135 135
         // Storing the answer object in the database
136 136
         if (!$newAnswerObj->store()) {
137
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($newAnswerObj->getErrors()));
137
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.sf_formatErrors($newAnswerObj->getErrors()));
138 138
         }
139 139
 
140 140
         $notificationHandler = xoops_getHandler('notification');
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             case 2:
151 151
                 // Answer for an open question submitted, auto-approved; became Q&A, need approbation
152 152
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
153
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
153
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
154 154
                     $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
155 155
                 }
156 156
                 // Send notifications
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             case 3:
161 161
                 // Answer submitted, needs approbation
162 162
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
163
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
163
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
164 164
                     $notificationHandler->subscribe('question', $newAnswerObj->answerid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
165 165
                 }
166 166
                 // Send notifications
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                 // New answer submitted for a published Q&A, need approbation
176 176
                 // Send notifications
177 177
                 if (isset($_POST['notifypub']) && $_POST['notifypub'] == 1) {
178
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
178
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
179 179
                     $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
180 180
                 }
181 181
 
@@ -212,20 +212,20 @@  discard block
 block discarded – undo
212 212
         }
213 213
 
214 214
         $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
215
-        require_once XOOPS_ROOT_PATH . '/header.php';
216
-        require_once __DIR__ . '/footer.php';
215
+        require_once XOOPS_ROOT_PATH.'/header.php';
216
+        require_once __DIR__.'/footer.php';
217 217
 
218 218
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
219 219
 
220
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
220
+        $moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
221 221
         $xoopsTpl->assign('whereInSection', $moduleName);
222 222
         $xoopsTpl->assign('lang_submit', _MD_SF_SUBMITANSWER);
223 223
 
224 224
         $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUBMITANSWERTO, ucwords($xoopsModule->name())));
225
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUBMITANSWER_INTRO);
225
+        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUBMITANSWER_INTRO);
226 226
 
227
-        require_once __DIR__ . '/include/answer.inc.php';
227
+        require_once __DIR__.'/include/answer.inc.php';
228 228
 
229
-        require_once XOOPS_ROOT_PATH . '/footer.php';
229
+        require_once XOOPS_ROOT_PATH.'/footer.php';
230 230
         break;
231 231
 }
Please login to merge, or discard this patch.