Completed
Branch master (c92e39)
by Michael
02:32
created
open_index.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@
 block discarded – undo
116 116
 // Language constants
117 117
 $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
118 118
 $xoopsTpl->assign(array(
119
-                      'lang_on'       => _MD_SF_ON,
120
-                      'lang_postedby' => _MD_SF_POSTEDBY,
121
-                      'lang_total'    => $totalQnasOnPage,
122
-                      'lang_faq'      => _MD_SF_FAQ,
123
-                      'lang_datesub'  => _MD_SF_DATESUB,
124
-                      'lang_hits'     => _MD_SF_HITS
125
-                  ));
119
+                        'lang_on'       => _MD_SF_ON,
120
+                        'lang_postedby' => _MD_SF_POSTEDBY,
121
+                        'lang_total'    => $totalQnasOnPage,
122
+                        'lang_faq'      => _MD_SF_FAQ,
123
+                        'lang_datesub'  => _MD_SF_DATESUB,
124
+                        'lang_hits'     => _MD_SF_HITS
125
+                    ));
126 126
 
127 127
 $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
128 128
 $xoopsTpl->assign('lang_mainhead', sprintf(_MD_SF_OPEN_WELCOME, $xoopsConfig['sitename']));
Please login to merge, or discard this patch.
footer.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 $xoopsTpl->assign('isAdmin', $isAdmin);
16 16
 
17 17
 $xoopsTpl->assign(array(
18
-                      'lang_on'       => _MD_SF_ON,
19
-                      'lang_postedby' => _MD_SF_POSTEDBY,
20
-                      'lang_faq'      => _MD_SF_QUESTION,
21
-                      'lang_datesub'  => _MD_SF_DATESUB,
22
-                      'lang_hits'     => _MD_SF_HITS
23
-                  ));
18
+                        'lang_on'       => _MD_SF_ON,
19
+                        'lang_postedby' => _MD_SF_POSTEDBY,
20
+                        'lang_faq'      => _MD_SF_QUESTION,
21
+                        'lang_datesub'  => _MD_SF_DATESUB,
22
+                        'lang_hits'     => _MD_SF_HITS
23
+                    ));
24 24
 $xoopsTpl->assign('sectionname', $myts->displayTarea($xoopsModule->getVar('name')));
25 25
 
26 26
 $xoopsTpl->assign('modulename', $xoopsModule->dirname());
Please login to merge, or discard this patch.
category.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,10 +136,10 @@
 block discarded – undo
136 136
     if (isset($last_qnaObj) && $last_qnaObj) {
137 137
         $category['last_faqid']         = $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid');
138 138
         $category['last_question_link'] = "<a href='faq.php?faqid="
139
-                                          . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')
140
-                                          . "'>"
141
-                                          . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize)
142
-                                          . '</a>';
139
+                                            . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')
140
+                                            . "'>"
141
+                                            . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize)
142
+                                            . '</a>';
143 143
     }
144 144
 }
145 145
 
Please login to merge, or discard this patch.
submit.php 1 patch
Switch Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -47,154 +47,154 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 switch ($op) {
50
-    case 'preview':
50
+        case 'preview':
51 51
 
52
-        global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
52
+            global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
53 53
 
54
-        $faqObj      = $faqHandler->create();
55
-        $answerObj   = $answerHandler->create();
56
-        $categoryObj = $categoryHandler->get($_POST['categoryid']);
54
+            $faqObj      = $faqHandler->create();
55
+            $answerObj   = $answerHandler->create();
56
+            $categoryObj = $categoryHandler->get($_POST['categoryid']);
57 57
 
58
-        if (!$xoopsUser) {
59
-            if ($xoopsModuleConfig['anonpost'] == 1) {
60
-                $uid = 0;
58
+            if (!$xoopsUser) {
59
+                if ($xoopsModuleConfig['anonpost'] == 1) {
60
+                    $uid = 0;
61
+                } else {
62
+                    redirect_header('index.php', 3, _NOPERM);
63
+                }
61 64
             } else {
62
-                redirect_header('index.php', 3, _NOPERM);
65
+                $uid = $xoopsUser->uid();
63 66
             }
64
-        } else {
65
-            $uid = $xoopsUser->uid();
66
-        }
67 67
 
68
-        $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
68
+            $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
69 69
 
70
-        // Putting the values about the FAQ in the FAQ object
71
-        $faqObj->setVar('categoryid', $_POST['categoryid']);
72
-        $faqObj->setVar('uid', $uid);
73
-        $faqObj->setVar('question', $_POST['question']);
74
-        $faqObj->setVar('howdoi', $_POST['howdoi']);
75
-        $faqObj->setVar('diduno', $_POST['diduno']);
76
-        $faqObj->setVar('datesub', time());
70
+            // Putting the values about the FAQ in the FAQ object
71
+            $faqObj->setVar('categoryid', $_POST['categoryid']);
72
+            $faqObj->setVar('uid', $uid);
73
+            $faqObj->setVar('question', $_POST['question']);
74
+            $faqObj->setVar('howdoi', $_POST['howdoi']);
75
+            $faqObj->setVar('diduno', $_POST['diduno']);
76
+            $faqObj->setVar('datesub', time());
77 77
 
78
-        // Putting the values in the answer object
79
-        $answerObj->setVar('status', _SF_AN_STATUS_APPROVED);
80
-        $answerObj->setVar('faqid', $faqObj->faqid());
81
-        $answerObj->setVar('answer', $_POST['answer']);
82
-        $answerObj->setVar('uid', $uid);
78
+            // Putting the values in the answer object
79
+            $answerObj->setVar('status', _SF_AN_STATUS_APPROVED);
80
+            $answerObj->setVar('faqid', $faqObj->faqid());
81
+            $answerObj->setVar('answer', $_POST['answer']);
82
+            $answerObj->setVar('uid', $uid);
83 83
 
84
-        global $xoopsUser, $myts;
84
+            global $xoopsUser, $myts;
85 85
 
86
-        $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
87
-        include_once XOOPS_ROOT_PATH . '/header.php';
88
-        include_once __DIR__ . '/footer.php';
86
+            $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
87
+            include_once XOOPS_ROOT_PATH . '/header.php';
88
+            include_once __DIR__ . '/footer.php';
89 89
 
90
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
90
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
91 91
 
92
-        $moduleName          =& $myts->displayTarea($xoopsModule->getVar('name'));
93
-        $faq                 = $faqObj->toArray(null, $categoryObj, false);
94
-        $faq['categoryPath'] = $categoryObj->getCategoryPath(true);
95
-        $faq['answer']       = $answerObj->answer();
96
-        $faq['who_when']     = $faqObj->getWhoAndWhen();
92
+            $moduleName          =& $myts->displayTarea($xoopsModule->getVar('name'));
93
+            $faq                 = $faqObj->toArray(null, $categoryObj, false);
94
+            $faq['categoryPath'] = $categoryObj->getCategoryPath(true);
95
+            $faq['answer']       = $answerObj->answer();
96
+            $faq['who_when']     = $faqObj->getWhoAndWhen();
97 97
 
98
-        $faq['comments'] = -1;
99
-        $xoopsTpl->assign('faq', $faq);
100
-        $xoopsTpl->assign('op', 'preview');
101
-        $xoopsTpl->assign('whereInSection', $moduleName);
102
-        $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME);
98
+            $faq['comments'] = -1;
99
+            $xoopsTpl->assign('faq', $faq);
100
+            $xoopsTpl->assign('op', 'preview');
101
+            $xoopsTpl->assign('whereInSection', $moduleName);
102
+            $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME);
103 103
 
104
-        $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name())));
105
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO);
104
+            $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name())));
105
+            $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO);
106 106
 
107
-        include_once __DIR__ . '/include/submit.inc.php';
107
+            include_once __DIR__ . '/include/submit.inc.php';
108 108
 
109
-        include_once XOOPS_ROOT_PATH . '/footer.php';
109
+            include_once XOOPS_ROOT_PATH . '/footer.php';
110 110
 
111
-        exit();
112
-        break;
111
+            exit();
112
+            break;
113 113
 
114
-    case 'post':
114
+        case 'post':
115 115
 
116
-        global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
116
+            global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
117 117
 
118
-        $newFaqObj    = $faqHandler->create();
119
-        $newAnswerObj = $answerHandler->create();
118
+            $newFaqObj    = $faqHandler->create();
119
+            $newAnswerObj = $answerHandler->create();
120 120
 
121
-        if (!$xoopsUser) {
122
-            if ($xoopsModuleConfig['anonpost'] == 1) {
123
-                $uid = 0;
121
+            if (!$xoopsUser) {
122
+                if ($xoopsModuleConfig['anonpost'] == 1) {
123
+                    $uid = 0;
124
+                } else {
125
+                    redirect_header('index.php', 3, _NOPERM);
126
+                }
124 127
             } else {
125
-                redirect_header('index.php', 3, _NOPERM);
128
+                $uid = $xoopsUser->uid();
126 129
             }
127
-        } else {
128
-            $uid = $xoopsUser->uid();
129
-        }
130
-
131
-        $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
132
-
133
-        // Putting the values about the FAQ in the FAQ object
134
-        $newFaqObj->setVar('categoryid', $_POST['categoryid']);
135
-        $newFaqObj->setVar('uid', $uid);
136
-        $newFaqObj->setVar('question', $_POST['question']);
137
-        $newFaqObj->setVar('howdoi', $_POST['howdoi']);
138
-        $newFaqObj->setVar('diduno', $_POST['diduno']);
139
-        $newFaqObj->setVar('notifypub', $notifypub);
140
-        //$newFaqObj->setVar('modulelink', $_POST['modulelink']);
141
-        //$newFaqObj->setVar('contextpage', $_POST['contextpage']);
142 130
 
143
-        // Setting the status of the FAQ
144
-
145
-        // if user is admin, FAQ are automatically published
146
-        $isAdmin = sf_userIsAdmin();
147
-        if ($isAdmin) {
148
-            $newFaqObj->setVar('status', _SF_STATUS_PUBLISHED);
149
-        } elseif ($xoopsModuleConfig['autoapprove_submitted_faq'] == 1) {
150
-            $newFaqObj->setVar('status', _SF_STATUS_PUBLISHED);
151
-        } else {
152
-            $newFaqObj->setVar('status', _SF_STATUS_SUBMITTED);
153
-        }
131
+            $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
132
+
133
+            // Putting the values about the FAQ in the FAQ object
134
+            $newFaqObj->setVar('categoryid', $_POST['categoryid']);
135
+            $newFaqObj->setVar('uid', $uid);
136
+            $newFaqObj->setVar('question', $_POST['question']);
137
+            $newFaqObj->setVar('howdoi', $_POST['howdoi']);
138
+            $newFaqObj->setVar('diduno', $_POST['diduno']);
139
+            $newFaqObj->setVar('notifypub', $notifypub);
140
+            //$newFaqObj->setVar('modulelink', $_POST['modulelink']);
141
+            //$newFaqObj->setVar('contextpage', $_POST['contextpage']);
142
+
143
+            // Setting the status of the FAQ
144
+
145
+            // if user is admin, FAQ are automatically published
146
+            $isAdmin = sf_userIsAdmin();
147
+            if ($isAdmin) {
148
+                $newFaqObj->setVar('status', _SF_STATUS_PUBLISHED);
149
+            } elseif ($xoopsModuleConfig['autoapprove_submitted_faq'] == 1) {
150
+                $newFaqObj->setVar('status', _SF_STATUS_PUBLISHED);
151
+            } else {
152
+                $newFaqObj->setVar('status', _SF_STATUS_SUBMITTED);
153
+            }
154 154
 
155
-        // Storing the FAQ object in the database
156
-        if (!$newFaqObj->store()) {
157
-            redirect_header('javascript:history.go(-1)', 2, _MD_SF_SUBMIT_ERROR);
158
-        }
155
+            // Storing the FAQ object in the database
156
+            if (!$newFaqObj->store()) {
157
+                redirect_header('javascript:history.go(-1)', 2, _MD_SF_SUBMIT_ERROR);
158
+            }
159 159
 
160
-        // Putting the values in the answer object
161
-        $newAnswerObj->setVar('status', _SF_AN_STATUS_APPROVED);
162
-        $newAnswerObj->setVar('faqid', $newFaqObj->faqid());
163
-        $newAnswerObj->setVar('answer', $_POST['answer']);
164
-        $newAnswerObj->setVar('uid', $uid);
165
-
166
-        //====================================================================================
167
-        //TODO post Attachment
168
-        $attachments_tmp = array();
169
-        if (!empty($_POST['attachments_tmp'])) {
170
-            $attachments_tmp = unserialize(base64_decode($_POST['attachments_tmp']));
171
-            if (isset($_POST['delete_tmp']) && count($_POST['delete_tmp'])) {
172
-                foreach ($_POST['delete_tmp'] as $key) {
173
-                    unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0]);
174
-                    unset($attachments_tmp[$key]);
160
+            // Putting the values in the answer object
161
+            $newAnswerObj->setVar('status', _SF_AN_STATUS_APPROVED);
162
+            $newAnswerObj->setVar('faqid', $newFaqObj->faqid());
163
+            $newAnswerObj->setVar('answer', $_POST['answer']);
164
+            $newAnswerObj->setVar('uid', $uid);
165
+
166
+            //====================================================================================
167
+            //TODO post Attachment
168
+            $attachments_tmp = array();
169
+            if (!empty($_POST['attachments_tmp'])) {
170
+                $attachments_tmp = unserialize(base64_decode($_POST['attachments_tmp']));
171
+                if (isset($_POST['delete_tmp']) && count($_POST['delete_tmp'])) {
172
+                    foreach ($_POST['delete_tmp'] as $key) {
173
+                        unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0]);
174
+                        unset($attachments_tmp[$key]);
175
+                    }
175 176
                 }
176 177
             }
177
-        }
178
-        if (count($attachments_tmp)) {
179
-            foreach ($attachments_tmp as $key => $attach) {
180
-                if (rename(XOOPS_CACHE_PATH . '/' . $attachments_tmp[$key][0], XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0])) {
181
-                    $post_obj->setAttachment($attach[0], $attach[1], $attach[2]);
178
+            if (count($attachments_tmp)) {
179
+                foreach ($attachments_tmp as $key => $attach) {
180
+                    if (rename(XOOPS_CACHE_PATH . '/' . $attachments_tmp[$key][0], XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0])) {
181
+                        $post_obj->setAttachment($attach[0], $attach[1], $attach[2]);
182
+                    }
182 183
                 }
183 184
             }
184
-        }
185
-        $error_upload = '';
185
+            $error_upload = '';
186 186
 
187
-        if (isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] != ''
188
-            && $topicHandler->getPermission($forum_obj, $topic_status, 'attach')
189
-        ) {
190
-            require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/uploader.php';
191
-            $maxfilesize = $forum_obj->getVar('attach_maxkb') * 1024;
192
-            $uploaddir   = XOOPS_CACHE_PATH;
187
+            if (isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] != ''
188
+                && $topicHandler->getPermission($forum_obj, $topic_status, 'attach')
189
+            ) {
190
+                require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/uploader.php';
191
+                $maxfilesize = $forum_obj->getVar('attach_maxkb') * 1024;
192
+                $uploaddir   = XOOPS_CACHE_PATH;
193 193
 
194
-            $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int)$maxfilesize, (int)$xoopsModuleConfig['max_img_width'], (int)$xoopsModuleConfig['max_img_height']);
194
+                $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int)$maxfilesize, (int)$xoopsModuleConfig['max_img_width'], (int)$xoopsModuleConfig['max_img_height']);
195 195
 
196
-            if ($_FILES['userfile']['error'] > 0) {
197
-                switch ($_FILES['userfile']['error']) {
196
+                if ($_FILES['userfile']['error'] > 0) {
197
+                    switch ($_FILES['userfile']['error']) {
198 198
                     case 1:
199 199
                         $error_message[] = _MD_NEWBB_MAXUPLOADFILEINI;
200 200
                         break;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                     default:
205 205
                         $error_message[] = _MD_NEWBB_UPLOAD_ERRNODEF;
206 206
                         break;
207
-                }
207
+                    }
208 208
             } else {
209 209
                 $uploader->setCheckMediaTypeByExt();
210 210
 
@@ -267,30 +267,30 @@  discard block
 block discarded – undo
267 267
         redirect_header('index.php', 2, $redirect_msg);
268 268
         break;
269 269
 
270
-    case 'form':
271
-    default:
270
+        case 'form':
271
+        default:
272 272
 
273
-        global $xoopsUser, $myts;
273
+            global $xoopsUser, $myts;
274 274
 
275
-        $faqObj      = $faqHandler->create();
276
-        $answerObj   = $answerHandler->create();
277
-        $categoryObj = $categoryHandler->create();
275
+            $faqObj      = $faqHandler->create();
276
+            $answerObj   = $answerHandler->create();
277
+            $categoryObj = $categoryHandler->create();
278 278
 
279
-        $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.html';
280
-        include_once XOOPS_ROOT_PATH . '/header.php';
281
-        include_once __DIR__ . '/footer.php';
279
+            $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.html';
280
+            include_once XOOPS_ROOT_PATH . '/header.php';
281
+            include_once __DIR__ . '/footer.php';
282 282
 
283
-        $name       = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
284
-        $notifypub  = 1;
285
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
286
-        $xoopsTpl->assign('whereInSection', $moduleName);
287
-        $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME);
283
+            $name       = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
284
+            $notifypub  = 1;
285
+            $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
286
+            $xoopsTpl->assign('whereInSection', $moduleName);
287
+            $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME);
288 288
 
289
-        $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name())));
290
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO);
289
+            $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name())));
290
+            $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO);
291 291
 
292
-        include_once __DIR__ . '/include/submit.inc.php';
292
+            include_once __DIR__ . '/include/submit.inc.php';
293 293
 
294
-        include_once XOOPS_ROOT_PATH . '/footer.php';
295
-        break;
294
+            include_once XOOPS_ROOT_PATH . '/footer.php';
295
+            break;
296 296
 }
Please login to merge, or discard this patch.
include/functions.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -202,14 +202,14 @@  discard block
 block discarded – undo
202 202
     $modfootertxt = 'Module ' . $smartModule->getInfo('name') . ' - Version ' . $smartModule->getInfo('version') . '';
203 203
 
204 204
     $modfooter = "<a href='"
205
-                 . $smartModule->getInfo('support_site_url')
206
-                 . "' target='_blank'><img src='"
207
-                 . XOOPS_URL
208
-                 . "/modules/smartfaq/assets/images/sfcssbutton.gif' title='"
209
-                 . $modfootertxt
210
-                 . "' alt='"
211
-                 . $modfootertxt
212
-                 . "'/></a>";
205
+                    . $smartModule->getInfo('support_site_url')
206
+                    . "' target='_blank'><img src='"
207
+                    . XOOPS_URL
208
+                    . "/modules/smartfaq/assets/images/sfcssbutton.gif' title='"
209
+                    . $modfootertxt
210
+                    . "' alt='"
211
+                    . $modfootertxt
212
+                    . "'/></a>";
213 213
 
214 214
     return $modfooter;
215 215
 }
@@ -444,70 +444,70 @@  discard block
 block discarded – undo
444 444
     if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
445 445
         // Edit button
446 446
         $adminLinks .= "<a href='"
447
-                       . $modulePath
448
-                       . "admin/$page?op=mod&amp;faqid="
449
-                       . $faqid
450
-                       . "'><img src='"
451
-                       . $modulePath
452
-                       . "assets/images/links/edit.gif'"
453
-                       . " title='"
454
-                       . _MD_SF_EDIT
455
-                       . "' alt='"
456
-                       . _MD_SF_EDIT
457
-                       . "'/></a>";
447
+                        . $modulePath
448
+                        . "admin/$page?op=mod&amp;faqid="
449
+                        . $faqid
450
+                        . "'><img src='"
451
+                        . $modulePath
452
+                        . "assets/images/links/edit.gif'"
453
+                        . " title='"
454
+                        . _MD_SF_EDIT
455
+                        . "' alt='"
456
+                        . _MD_SF_EDIT
457
+                        . "'/></a>";
458 458
         $adminLinks .= ' ';
459 459
         // Delete button
460 460
         $adminLinks .= "<a href='"
461
-                       . $modulePath
462
-                       . "admin/$page?op=del&amp;faqid="
463
-                       . $faqid
464
-                       . "'><img src='"
465
-                       . $modulePath
466
-                       . "assets/images/links/delete.gif'"
467
-                       . " title='"
468
-                       . _MD_SF_DELETE
469
-                       . "' alt='"
470
-                       . _MD_SF_DELETE
471
-                       . "'/></a>";
461
+                        . $modulePath
462
+                        . "admin/$page?op=del&amp;faqid="
463
+                        . $faqid
464
+                        . "'><img src='"
465
+                        . $modulePath
466
+                        . "assets/images/links/delete.gif'"
467
+                        . " title='"
468
+                        . _MD_SF_DELETE
469
+                        . "' alt='"
470
+                        . _MD_SF_DELETE
471
+                        . "'/></a>";
472 472
         $adminLinks .= ' ';
473 473
     }
474 474
     // Print button
475 475
     $adminLinks .= "<a href='"
476
-                   . $modulePath
477
-                   . 'print.php?faqid='
478
-                   . $faqid
479
-                   . "'><img src='"
480
-                   . $modulePath
481
-                   . "assets/images/links/print.gif' title='"
482
-                   . _MD_SF_PRINT
483
-                   . "' alt='"
484
-                   . _MD_SF_PRINT
485
-                   . "'/></a>";
476
+                    . $modulePath
477
+                    . 'print.php?faqid='
478
+                    . $faqid
479
+                    . "'><img src='"
480
+                    . $modulePath
481
+                    . "assets/images/links/print.gif' title='"
482
+                    . _MD_SF_PRINT
483
+                    . "' alt='"
484
+                    . _MD_SF_PRINT
485
+                    . "'/></a>";
486 486
     $adminLinks .= ' ';
487 487
     // Email button
488 488
     $maillink   = 'mailto:?subject='
489
-                  . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename'])
490
-                  . '&amp;body='
491
-                  . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename'])
492
-                  . ':  '
493
-                  . $modulePath
494
-                  . 'faq.php?faqid='
495
-                  . $faqid;
489
+                    . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename'])
490
+                    . '&amp;body='
491
+                    . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename'])
492
+                    . ':  '
493
+                    . $modulePath
494
+                    . 'faq.php?faqid='
495
+                    . $faqid;
496 496
     $adminLinks .= '<a href="' . $maillink . "\"><img src='" . $modulePath . "assets/images/links/friend.gif' title='" . _MD_SF_MAIL . "' alt='" . _MD_SF_MAIL . "'/></a>";
497 497
     $adminLinks .= ' ';
498 498
     // Submit New Answer button
499 499
     if ($xoopsModuleConfig['allownewanswer'] && (is_object($xoopsUser) || $xoopsModuleConfig['anonpost'])) {
500 500
         $adminLinks .= "<a href='"
501
-                       . $modulePath
502
-                       . 'answer.php?faqid='
503
-                       . $faqid
504
-                       . "'><img src='"
505
-                       . $modulePath
506
-                       . "assets/images/links/newanswer.gif' title='"
507
-                       . _MD_SF_SUBMITANSWER
508
-                       . "' alt='"
509
-                       . _MD_SF_SUBMITANSWER
510
-                       . "'/></a>";
501
+                        . $modulePath
502
+                        . 'answer.php?faqid='
503
+                        . $faqid
504
+                        . "'><img src='"
505
+                        . $modulePath
506
+                        . "assets/images/links/newanswer.gif' title='"
507
+                        . _MD_SF_SUBMITANSWER
508
+                        . "' alt='"
509
+                        . _MD_SF_SUBMITANSWER
510
+                        . "'/></a>";
511 511
         $adminLinks .= ' ';
512 512
     }
513 513
 
Please login to merge, or discard this patch.
include/blocksadmin.inc.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -71,18 +71,18 @@
 block discarded – undo
71 71
     $myblock->setVar('title', $myts->stripSlashesGPC($btitle));
72 72
     $myblock->setVar('content', $myts->stripSlashesGPC($bcontent));
73 73
     $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='
74
-                 . _CHARSET
75
-                 . '" /><meta http-equiv="content-language" content="'
76
-                 . _LANGCODE
77
-                 . '" /><title>'
78
-                 . $xoopsConfig['sitename']
79
-                 . '</title><link rel="stylesheet" type="text/css" media="all" href="'
80
-                 . getcss($xoopsConfig['theme_set'])
81
-                 . '" /></head><body><table><tr><th>'
82
-                 . $myblock->getVar('title')
83
-                 . '</th></tr><tr><td>'
84
-                 . $myblock->getContent('S', $bctype)
85
-                 . '</td></tr></table></body></html>';
74
+                    . _CHARSET
75
+                    . '" /><meta http-equiv="content-language" content="'
76
+                    . _LANGCODE
77
+                    . '" /><title>'
78
+                    . $xoopsConfig['sitename']
79
+                    . '</title><link rel="stylesheet" type="text/css" media="all" href="'
80
+                    . getcss($xoopsConfig['theme_set'])
81
+                    . '" /></head><body><table><tr><th>'
82
+                    . $myblock->getVar('title')
83
+                    . '</th></tr><tr><td>'
84
+                    . $myblock->getContent('S', $bctype)
85
+                    . '</td></tr></table></body></html>';
86 86
 
87 87
     $dummyfile = '_dummyfile_' . time() . '.html';
88 88
     $fp        = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w');
Please login to merge, or discard this patch.
include/displayfaqs.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -51,25 +51,25 @@  discard block
 block discarded – undo
51 51
     for ($i = 0; $i < $totalFaqsOnPage; ++$i) {
52 52
         $categoryObj = $allCats[$faqsObj[$i]->categoryid()];
53 53
         $modify      = "<a href='faq.php?op=mod&amp;faqid="
54
-                       . $faqsObj[$i]->faqid()
55
-                       . "'><img src='"
56
-                       . $pathIcon16
57
-                       . '/edit.png'
58
-                       . "' title='"
59
-                       . _AM_SF_EDITART
60
-                       . "' alt='"
61
-                       . _AM_SF_EDITART
62
-                       . "' /></a>";
54
+                        . $faqsObj[$i]->faqid()
55
+                        . "'><img src='"
56
+                        . $pathIcon16
57
+                        . '/edit.png'
58
+                        . "' title='"
59
+                        . _AM_SF_EDITART
60
+                        . "' alt='"
61
+                        . _AM_SF_EDITART
62
+                        . "' /></a>";
63 63
         $delete      = "<a href='faq.php?op=del&amp;faqid="
64
-                       . $faqsObj[$i]->faqid()
65
-                       . "'><img src='"
66
-                       . $pathIcon16
67
-                       . '/delete.png'
68
-                       . "' title='"
69
-                       . _AM_SF_EDITART
70
-                       . "' alt='"
71
-                       . _AM_SF_DELETEART
72
-                       . "'/></a>";
64
+                        . $faqsObj[$i]->faqid()
65
+                        . "'><img src='"
66
+                        . $pathIcon16
67
+                        . '/delete.png'
68
+                        . "' title='"
69
+                        . _AM_SF_EDITART
70
+                        . "' alt='"
71
+                        . _AM_SF_DELETEART
72
+                        . "'/></a>";
73 73
 
74 74
         //adding name of the Question Submitter
75 75
         $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']);
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
         echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>';
101 101
         echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>';
102 102
         echo "<td class='even' align='left'><a href='"
103
-             . XOOPS_URL
104
-             . '/modules/'
105
-             . $xoopsModule->dirname()
106
-             . '/faq.php?faqid='
107
-             . $faqsObj[$i]->faqid()
108
-             . "'>"
109
-             . $faqsObj[$i]->question(100)
110
-             . '</a></td>';
103
+                . XOOPS_URL
104
+                . '/modules/'
105
+                . $xoopsModule->dirname()
106
+                . '/faq.php?faqid='
107
+                . $faqsObj[$i]->faqid()
108
+                . "'>"
109
+                . $faqsObj[$i]->question(100)
110
+                . '</a></td>';
111 111
 
112 112
         echo "<td class='even' align='center'>" . $requester . '</td>';
113 113
         echo "<td class='even' align='center'>" . $answerSubmitter . '</td>';
Please login to merge, or discard this patch.
include/submit.inc.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -82,16 +82,16 @@
 block discarded – undo
82 82
     $delete_attach_checkbox = new XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]');
83 83
     foreach ($attachments as $key => $attachment) {
84 84
         $attach = ' '
85
-                  . _DELETE
86
-                  . ' <a href='
87
-                  . XOOPS_URL
88
-                  . '/'
89
-                  . $xoopsModuleConfig['dir_attachments']
90
-                  . '/'
91
-                  . $attachment['name_saved']
92
-                  . ' rel="external">'
93
-                  . $attachment['name_display']
94
-                  . '</a><br>';
85
+                    . _DELETE
86
+                    . ' <a href='
87
+                    . XOOPS_URL
88
+                    . '/'
89
+                    . $xoopsModuleConfig['dir_attachments']
90
+                    . '/'
91
+                    . $attachment['name_saved']
92
+                    . ' rel="external">'
93
+                    . $attachment['name_display']
94
+                    . '</a><br>';
95 95
         $delete_attach_checkbox->addOption($key, $attach);
96 96
     }
97 97
     $form->addElement($delete_attach_checkbox);
Please login to merge, or discard this patch.
print.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,25 +53,25 @@
 block discarded – undo
53 53
 echo "<body bgcolor='#ffffff' text='#000000' onload='window.print()'>
54 54
      <div style='width: 650px; border: 1px solid #000; padding: 20px;'>
55 55
      <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='"
56
-     . XOOPS_URL
57
-     . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt='' /><h2 style='margin: 0;'>"
58
-     . $faqObj->question()
59
-     . "</h2></div>
56
+        . XOOPS_URL
57
+        . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt='' /><h2 style='margin: 0;'>"
58
+        . $faqObj->question()
59
+        . "</h2></div>
60 60
      <div align='center'>"
61
-     . $who_where
62
-     . "</div>
61
+        . $who_where
62
+        . "</div>
63 63
                 <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div>
64 64
                 <div></div>
65 65
                 <b><p>"
66
-     . $faqObj->question()
67
-     . '</p></b>
66
+        . $faqObj->question()
67
+        . '</p></b>
68 68
                 <p>'
69
-     . $answerObj->answer()
70
-     . "</p>
69
+        . $answerObj->answer()
70
+        . "</p>
71 71
                 <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div>
72 72
                 <p>"
73
-     . $comeFrom
74
-     . '</p>
73
+        . $comeFrom
74
+        . '</p>
75 75
             </div>
76 76
     <br>';
77 77
 
Please login to merge, or discard this patch.