Completed
Push — master ( a7fe76...1b2f30 )
by Michael
04:20
created
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.
request.php 2 patches
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -41,94 +41,94 @@
 block discarded – undo
41 41
 }
42 42
 
43 43
 switch ($op) {
44
-    case 'post':
44
+        case 'post':
45 45
 
46
-        global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
46
+            global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
47 47
 
48
-        $newFaqObj = $faqHandler->create();
48
+            $newFaqObj = $faqHandler->create();
49 49
 
50
-        if (!$xoopsUser) {
51
-            if ($xoopsModuleConfig['anonpost'] == 1) {
52
-                $uid = 0;
50
+            if (!$xoopsUser) {
51
+                if ($xoopsModuleConfig['anonpost'] == 1) {
52
+                    $uid = 0;
53
+                } else {
54
+                    redirect_header('index.php', 3, _NOPERM);
55
+                }
53 56
             } else {
54
-                redirect_header('index.php', 3, _NOPERM);
57
+                $uid = $xoopsUser->uid();
55 58
             }
56
-        } else {
57
-            $uid = $xoopsUser->uid();
58
-        }
59
-
60
-        // Putting the values about the FAQ in the FAQ object
61
-        $newFaqObj->setVar('categoryid', $_POST['categoryid']);
62
-        $newFaqObj->setVar('uid', $uid);
63
-        $newFaqObj->setVar('question', $_POST['question']);
64
-        $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
65
-        $newFaqObj->setVar('notifypub', $notifypub);
66
-
67
-        // Setting the status of the FAQ
68
-        if ($xoopsModuleConfig['autoapprove_request'] == 1) {
69
-            $newFaqObj->setVar('status', _SF_STATUS_OPENED);
70
-        } else {
71
-            $newFaqObj->setVar('status', _SF_STATUS_ASKED);
72
-        }
73
-
74
-        // Storing the FAQ object in the database
75
-        if (!$newFaqObj->store()) {
76
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors()));
77
-        }
78
-
79
-        // Get the cateopry object related to that FAQ
80
-        // If autoapprove_requested
81
-        if ($xoopsModuleConfig['autoapprove_request'] == 1) {
82
-            // We do not not subscribe user to notification on publish since we publish it right away
83
-
84
-            // Send notifications
85
-            $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED));
86
-
87
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
88
-        } else {
89
-            // Subscribe the user to On Published notification, if requested
90
-            if ($notifypub == 1) {
91
-                include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
92
-                $notificationHandler = xoops_getHandler('notification');
93
-                $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
59
+
60
+            // Putting the values about the FAQ in the FAQ object
61
+            $newFaqObj->setVar('categoryid', $_POST['categoryid']);
62
+            $newFaqObj->setVar('uid', $uid);
63
+            $newFaqObj->setVar('question', $_POST['question']);
64
+            $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
65
+            $newFaqObj->setVar('notifypub', $notifypub);
66
+
67
+            // Setting the status of the FAQ
68
+            if ($xoopsModuleConfig['autoapprove_request'] == 1) {
69
+                $newFaqObj->setVar('status', _SF_STATUS_OPENED);
70
+            } else {
71
+                $newFaqObj->setVar('status', _SF_STATUS_ASKED);
72
+            }
73
+
74
+            // Storing the FAQ object in the database
75
+            if (!$newFaqObj->store()) {
76
+                redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors()));
94 77
             }
95
-            // Send notifications
96
-            $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED));
97 78
 
98
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
99
-        }
79
+            // Get the cateopry object related to that FAQ
80
+            // If autoapprove_requested
81
+            if ($xoopsModuleConfig['autoapprove_request'] == 1) {
82
+                // We do not not subscribe user to notification on publish since we publish it right away
83
+
84
+                // Send notifications
85
+                $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED));
86
+
87
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
88
+            } else {
89
+                // Subscribe the user to On Published notification, if requested
90
+                if ($notifypub == 1) {
91
+                    include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
92
+                    $notificationHandler = xoops_getHandler('notification');
93
+                    $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
94
+                }
95
+                // Send notifications
96
+                $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED));
97
+
98
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
99
+            }
100 100
 
101
-        //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
102
-        redirect_header('index.php', 2, $redirect_msg);
103
-        break;
101
+            //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
102
+            redirect_header('index.php', 2, $redirect_msg);
103
+            break;
104 104
 
105
-    case 'form':
106
-    default:
105
+        case 'form':
106
+        default:
107 107
 
108
-        global $xoopsUser, $myts;
108
+            global $xoopsUser, $myts;
109 109
 
110
-        $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
111
-        include_once(XOOPS_ROOT_PATH . '/header.php');
112
-        include_once __DIR__ . '/footer.php';
110
+            $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
111
+            include_once(XOOPS_ROOT_PATH . '/header.php');
112
+            include_once __DIR__ . '/footer.php';
113 113
 
114
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
114
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
115 115
 
116
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
117
-        $xoopsTpl->assign('whereInSection', $moduleName);
118
-        $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
116
+            $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
117
+            $xoopsTpl->assign('whereInSection', $moduleName);
118
+            $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
119 119
 
120
-        $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
121
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
120
+            $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
121
+            $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
122 122
 
123
-        include_once 'include/request.inc.php';
123
+            include_once 'include/request.inc.php';
124 124
 
125
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
125
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
126 126
 
127
-        $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
127
+            $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
128 128
 
129
-        include_once 'include/request.inc.php';
129
+            include_once 'include/request.inc.php';
130 130
 
131
-        include_once XOOPS_ROOT_PATH . '/footer.php';
131
+            include_once XOOPS_ROOT_PATH . '/footer.php';
132 132
 
133
-        break;
133
+            break;
134 134
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include_once __DIR__ . '/header.php';
10
-include_once(XOOPS_ROOT_PATH . '/header.php');
9
+include_once __DIR__.'/header.php';
10
+include_once(XOOPS_ROOT_PATH.'/header.php');
11 11
 
12 12
 global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule;
13 13
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         // Storing the FAQ object in the database
75 75
         if (!$newFaqObj->store()) {
76
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors()));
76
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.sf_formatErrors($newFaqObj->getErrors()));
77 77
         }
78 78
 
79 79
         // Get the cateopry object related to that FAQ
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         } else {
89 89
             // Subscribe the user to On Published notification, if requested
90 90
             if ($notifypub == 1) {
91
-                include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
91
+                include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
92 92
                 $notificationHandler = xoops_getHandler('notification');
93 93
                 $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
94 94
             }
@@ -108,17 +108,17 @@  discard block
 block discarded – undo
108 108
         global $xoopsUser, $myts;
109 109
 
110 110
         $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
111
-        include_once(XOOPS_ROOT_PATH . '/header.php');
112
-        include_once __DIR__ . '/footer.php';
111
+        include_once(XOOPS_ROOT_PATH.'/header.php');
112
+        include_once __DIR__.'/footer.php';
113 113
 
114 114
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
115 115
 
116
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
116
+        $moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
117 117
         $xoopsTpl->assign('whereInSection', $moduleName);
118 118
         $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
119 119
 
120 120
         $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
121
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
121
+        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg']));
122 122
 
123 123
         include_once 'include/request.inc.php';
124 124
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         include_once 'include/request.inc.php';
130 130
 
131
-        include_once XOOPS_ROOT_PATH . '/footer.php';
131
+        include_once XOOPS_ROOT_PATH.'/footer.php';
132 132
 
133 133
         break;
134 134
 }
Please login to merge, or discard this patch.
language/english/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
 define('_AM_SF_STATUS_EXP', "Status<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the status of the Q&amp;A.</span>");
273 273
 define('_AM_SF_SUBMISSIONSMNGMT', 'Submitted Q&amp;A');
274 274
 define('_AM_SF_SPECIFIC_URL_SELECT', 'Specific URL...');
275
-define('_AM_SF_SPECIFIC_URL', "Specific URL</span><span style='font-size: xx-small; font-weight: normal; display: block;'>If you have set the 'Contextually link to<br />this module' to <i>" . _AM_SF_SPECIFIC_URL_SELECT . "</i>, please<br />specify the URL.<br />\n<b>Example :</b> modules/newbb</span>");
275
+define('_AM_SF_SPECIFIC_URL', "Specific URL</span><span style='font-size: xx-small; font-weight: normal; display: block;'>If you have set the 'Contextually link to<br />this module' to <i>"._AM_SF_SPECIFIC_URL_SELECT."</i>, please<br />specify the URL.<br />\n<b>Example :</b> modules/newbb</span>");
276 276
 define('_AM_SF_SUBMISSION_MODERATE', "Moderate this Q&amp;A's submission");
277 277
 define('_AM_SF_SUBMITTED', 'Submitted');
278 278
 define('_AM_SF_SUBMITTED_EXP', '<b>Submitted Q&amp;A</b> : Q&amp;A that have been submitted by users. Once approved, they will be displayed in the Q&amp;A section.');
Please login to merge, or discard this patch.
language/english/main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 define('_MD_SF_INTARTICLE', 'Have a look at this FAQ at %s');
75 75
 define('_MD_SF_MAIL', 'Send Q&amp;A');
76 76
 define('_MD_SF_MAINHEAD', 'Welcome to the');
77
-define('_MD_SF_MAININTRO', "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='" . XOOPS_URL . "/forms/askus/form.php'>Ask us a Question!</a>");
77
+define('_MD_SF_MAININTRO', "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='".XOOPS_URL."/forms/askus/form.php'>Ask us a Question!</a>");
78 78
 define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category');
79 79
 define('_MD_SF_MAINNOFAQS', 'There are no Q&amp;As in this category');
80 80
 define('_MD_SF_MODERATION_MAIN_HEAD', 'Moderation section of ');
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 define('_MD_SF_SPECIFIC_URL_SELECT', 'Specific URL...');
127 127
 define('_MD_SF_SENDSTORY', 'Send this Q&amp;A to a friend');
128 128
 define('_MD_SF_SPECIFIC_URL', 'Specific URL');
129
-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");
129
+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");
130 130
 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.');
131 131
 define('_MD_SF_SUB_SNEWNAME', 'Submit a Q&amp;A');
132 132
 define('_MD_SF_SUB_SMNAME', 'Submit a Q&amp;A');
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +13 added lines, -13 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
-include_once __DIR__ . '/header.php';
9
+include_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);
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
 
44 44
 echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
45 45
 echo "<html>\n<head>\n";
46
-echo '<title>' . _MD_SF_FAQCOMEFROM . ' ' . $xoopsConfig['sitename'] . "</title>\n";
47
-echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "' />\n";
48
-echo "<meta name='AUTHOR' content='" . $xoopsConfig['sitename'] . "' />\n";
49
-echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by " . $xoopsConfig['sitename'] . "' />\n";
50
-echo "<meta name='DESCRIPTION' content='" . $xoopsConfig['slogan'] . "' />\n";
51
-echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "' />\n\n\n";
46
+echo '<title>'._MD_SF_FAQCOMEFROM.' '.$xoopsConfig['sitename']."</title>\n";
47
+echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
48
+echo "<meta name='AUTHOR' content='".$xoopsConfig['sitename']."' />\n";
49
+echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by ".$xoopsConfig['sitename']."' />\n";
50
+echo "<meta name='DESCRIPTION' content='".$xoopsConfig['slogan']."' />\n";
51
+echo "<meta name='GENERATOR' content='".XOOPS_VERSION."' />\n\n\n";
52 52
 
53 53
 echo "<body bgcolor='#ffffff' text='#000000' onload='window.print()'>
54 54
      <div style='width: 650px; border: 1px solid #000; padding: 20px;'>
55
-     <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt='' /><h2 style='margin: 0;'>" . $faqObj->question() . "</h2></div>
56
-     <div align='center'>" . $who_where . "</div>
55
+     <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL."/modules/smartfaq/assets/images/logo_module.png' border='0' alt='' /><h2 style='margin: 0;'>".$faqObj->question()."</h2></div>
56
+     <div align='center'>" . $who_where."</div>
57 57
                 <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div>
58 58
                 <div></div>
59
-                <b><p>" . $faqObj->question() . '</p></b>
60
-                <p>' . $answerObj->answer() . "</p>
59
+                <b><p>" . $faqObj->question().'</p></b>
60
+                <p>' . $answerObj->answer()."</p>
61 61
                 <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div>
62
-                <p>" . $comeFrom . '</p>
62
+                <p>" . $comeFrom.'</p>
63 63
             </div>
64 64
     <br />';
65 65
 
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 dirname(dirname(__DIR__)) . '/mainfile.php';
9
+include dirname(dirname(__DIR__)).'/mainfile.php';
10 10
 
11
-include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
12
-include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php';
13
-include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php';
14
-include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php';
11
+include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
12
+include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php';
13
+include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php';
14
+include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php';
15 15
 
16 16
 $myts = MyTextSanitizer::getInstance();
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 //about
26 26
 $modversion['module_status']       = 'RC 1';
27 27
 $modversion['release_date']        = '2016/03/28';
28
-$modversion['release_file']        = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt';
28
+$modversion['release_file']        = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt';
29 29
 $modversion['module_website_url']  = 'www.xoops.org';
30 30
 $modversion['module_website_name'] = 'XOOPS';
31 31
 $modversion['min_php']             = '5.5';
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $modversion['sub'][2]['url']  = 'request.php?op=add';
134 134
         }
135 135
 
136
-        include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
136
+        include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
137 137
 
138 138
         // Creating the FAQ handler object
139 139
         $faqHandler = sf_gethandler('faq');
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
-include_once __DIR__ . '/header.php';
9
+include_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);
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
     $faqObj->updateCounter();
43 43
 }
44 44
 $xoopsOption['template_main'] = 'smartfaq_faq.tpl';
45
-include_once(XOOPS_ROOT_PATH . '/header.php');
46
-include_once __DIR__ . '/footer.php';
45
+include_once(XOOPS_ROOT_PATH.'/header.php');
46
+include_once __DIR__.'/footer.php';
47 47
 
48 48
 $faq = $faqObj->toArray(null, $categoryObj, false);
49 49
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 $xoopsTpl->assign('display_categoryname', false);
79 79
 
80 80
 $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes'));
81
-$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'));
81
+$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'));
82 82
 $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY);
83 83
 $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY);
84 84
 $xoopsTpl->assign('faqid', $faqObj->getVar('faqid'));
@@ -94,19 +94,19 @@  discard block
 block discarded – undo
94 94
 
95 95
 // Page Title Hack by marcan
96 96
 $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
97
-$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $categoryObj->name() . ' - ' . $faq['question']);
97
+$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$categoryObj->name().' - '.$faq['question']);
98 98
 // End Page Title Hack by marcan
99 99
 
100 100
 // Include the comments if the selected FAQ supports comments
101 101
 if ($faqObj->cancomment() == 1) {
102
-    include_once XOOPS_ROOT_PATH . '/include/comment_view.php';
102
+    include_once XOOPS_ROOT_PATH.'/include/comment_view.php';
103 103
 }
104 104
 
105 105
 //code to include smartie
106
-if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) {
107
-    include_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php';
106
+if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) {
107
+    include_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php';
108 108
     $xoopsTpl->assign('smarttie', 1);
109 109
 }
110 110
 //end code for smarttie
111 111
 
112
-include_once XOOPS_ROOT_PATH . '/footer.php';
112
+include_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.