Completed
Push — master ( 8e5652...4e30dc )
by Michael
02:28
created
admin/index.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Smartfaq\Constants;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
23
-require_once __DIR__ . '/admin_header.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23
+require_once __DIR__.'/admin_header.php';
24 24
 
25 25
 xoops_cp_header();
26 26
 
@@ -76,34 +76,34 @@  discard block
 block discarded – undo
76 76
 $adminObject->addInfoBox(_AM_SF_INVENTORY);
77 77
 
78 78
 if ($totalcategories > 0) {
79
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' . '</infolabel>', $totalcategories), '', 'Green');
79
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALCAT.'</a><b>'.'</infolabel>', $totalcategories), '', 'Green');
80 80
 } else {
81
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALCAT . '</infolabel>', $totalcategories), '', 'Green');
81
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALCAT.'</infolabel>', $totalcategories), '', 'Green');
82 82
 }
83 83
 if ($totalasked > 0) {
84
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' . '</infolabel>', $totalasked), '', 'Green');
84
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALASKED.'</a><b>'.'</infolabel>', $totalasked), '', 'Green');
85 85
 } else {
86
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALASKED . '</infolabel>', $totalasked), '', 'Green');
86
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALASKED.'</infolabel>', $totalasked), '', 'Green');
87 87
 }
88 88
 if ($totalopened > 0) {
89
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' . '</infolabel>', $totalopened), '', 'Red');
89
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="question.php">'._AM_SF_TOTALOPENED.'</a><b>'.'</infolabel>', $totalopened), '', 'Red');
90 90
 } else {
91
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALOPENED . '</infolabel>', $totalopened), '', 'Green');
91
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALOPENED.'</infolabel>', $totalopened), '', 'Green');
92 92
 }
93 93
 if ($totalsubmitted > 0) {
94
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted), '', 'Green');
94
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALSUBMITTED.'</a><b>'.'</infolabel>', $totalsubmitted), '', 'Green');
95 95
 } else {
96
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALSUBMITTED . '</infolabel>', $totalsubmitted), '', 'Green');
96
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALSUBMITTED.'</infolabel>', $totalsubmitted), '', 'Green');
97 97
 }
98 98
 if ($totalpublished > 0) {
99
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="faq.php">' . _AM_SF_TOTALPUBLISHED . '</a><b>' . '</infolabel>', $totalpublished), '', 'Green');
99
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="faq.php">'._AM_SF_TOTALPUBLISHED.'</a><b>'.'</infolabel>', $totalpublished), '', 'Green');
100 100
 } else {
101
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALPUBLISHED . '</infolabel>', $totalpublished), '', 'Green');
101
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALPUBLISHED.'</infolabel>', $totalpublished), '', 'Green');
102 102
 }
103 103
 if ($totalnewanswers > 0) {
104
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALNEWANSWERS . '</a><b>' . '</infolabel>', $totalnewanswers), '', 'Red');
104
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALNEWANSWERS.'</a><b>'.'</infolabel>', $totalnewanswers), '', 'Red');
105 105
 } else {
106
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALNEWANSWERS . '</infolabel>', $totalnewanswers), '', 'Green');
106
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALNEWANSWERS.'</infolabel>', $totalnewanswers), '', 'Green');
107 107
 }
108 108
 
109 109
 //----------------------
@@ -111,4 +111,4 @@  discard block
 block discarded – undo
111 111
 $adminObject->displayNavigation(basename(__FILE__));
112 112
 $adminObject->displayIndex();
113 113
 
114
-require_once __DIR__ . '/admin_footer.php';
114
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/about2.php 1 patch
Spacing   +35 added lines, -35 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
-require_once __DIR__ . '/admin_header.php';
9
+require_once __DIR__.'/admin_header.php';
10 10
 $myts = \MyTextSanitizer::getInstance();
11 11
 
12 12
 global $xoopsModule;
@@ -39,46 +39,46 @@  discard block
 block discarded – undo
39 39
 echo "</table>";
40 40
 */
41 41
 // Left headings...
42
-echo "<img src='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'></a>";
43
-echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . ' version ' . $versioninfo->getInfo('version') . ' (' . $versioninfo->getInfo('status_version') . ')</div>';
42
+echo "<img src='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'.$versioninfo->getInfo('image')."' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'></a>";
43
+echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>".$versioninfo->getInfo('name').' version '.$versioninfo->getInfo('version').' ('.$versioninfo->getInfo('status_version').')</div>';
44 44
 if ('' != $versioninfo->getInfo('author_realname')) {
45
-    $author_name = $versioninfo->getInfo('author') . ' (' . $versioninfo->getInfo('author_realname') . ')';
45
+    $author_name = $versioninfo->getInfo('author').' ('.$versioninfo->getInfo('author_realname').')';
46 46
 } else {
47 47
     $author_name = $versioninfo->getInfo('author');
48 48
 }
49 49
 
50
-echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . ' ' . $author_name;
50
+echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>"._AM_SF_BY.' '.$author_name;
51 51
 echo '</div>';
52
-echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n";
52
+echo "<div style = 'line-height: 16px; display: block;'>".$versioninfo->getInfo('license')."</div>\n";
53 53
 
54 54
 // Developers Information
55 55
 echo "<br><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
56 56
 echo '<tr>';
57
-echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . '</b></td>';
57
+echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_AUTHOR_INFO.'</b></td>';
58 58
 echo '</tr>';
59 59
 
60 60
 if ('' != $versioninfo->getInfo('developer_lead')) {
61 61
     echo '<tr>';
62
-    echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . '</td>';
63
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . '</td>';
62
+    echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_LEAD.'</td>';
63
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_lead').'</td>';
64 64
     echo '</tr>';
65 65
 }
66 66
 if ('' != $versioninfo->getInfo('developer_contributor')) {
67 67
     echo '<tr>';
68
-    echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . '</td>';
69
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . '</td>';
68
+    echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_CONTRIBUTOR.'</td>';
69
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_contributor').'</td>';
70 70
     echo '</tr>';
71 71
 }
72 72
 if ('' != $versioninfo->getInfo('developer_website_url')) {
73 73
     echo '<tr>';
74
-    echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . '</td>';
75
-    echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . '</a></td>';
74
+    echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_WEBSITE.'</td>';
75
+    echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('developer_website_url')."' target='blank'>".$versioninfo->getInfo('developer_website_name').'</a></td>';
76 76
     echo '</tr>';
77 77
 }
78 78
 if ('' != $versioninfo->getInfo('developer_email')) {
79 79
     echo '<tr>';
80
-    echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . '</td>';
81
-    echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . '</a></td>';
80
+    echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_EMAIL.'</td>';
81
+    echo "<td class='even' align='left'><a href='mailto:".$versioninfo->getInfo('developer_email')."'>".$versioninfo->getInfo('developer_email').'</a></td>';
82 82
     echo '</tr>';
83 83
 }
84 84
 
@@ -87,47 +87,47 @@  discard block
 block discarded – undo
87 87
 // Module Developpment information
88 88
 echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
89 89
 echo '<tr>';
90
-echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . '</b></td>';
90
+echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_MODULE_INFO.'</b></td>';
91 91
 echo '</tr>';
92 92
 
93 93
 if ('' != $versioninfo->getInfo('date')) {
94 94
     echo '<tr>';
95
-    echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . '</td>';
96
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . '</td>';
95
+    echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_RELEASE_DATE.'</td>';
96
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('date').'</td>';
97 97
     echo '</tr>';
98 98
 }
99 99
 
100 100
 if ('' != $versioninfo->getInfo('status')) {
101 101
     echo '<tr>';
102
-    echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . '</td>';
103
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . '</td>';
102
+    echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_STATUS.'</td>';
103
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('status').'</td>';
104 104
     echo '</tr>';
105 105
 }
106 106
 
107 107
 if ('' != $versioninfo->getInfo('demo_site_url')) {
108 108
     echo '<tr>';
109
-    echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . '</td>';
110
-    echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . '</a></td>';
109
+    echo "<td class='head' align='left'>"._MI_SF_MODULE_DEMO.'</td>';
110
+    echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('demo_site_url')."' target='blank'>".$versioninfo->getInfo('demo_site_name').'</a></td>';
111 111
     echo '</tr>';
112 112
 }
113 113
 
114 114
 if ('' != $versioninfo->getInfo('support_site_url')) {
115 115
     echo '<tr>';
116
-    echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . '</td>';
117
-    echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . '</a></td>';
116
+    echo "<td class='head' align='left'>"._MI_SF_MODULE_SUPPORT.'</td>';
117
+    echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('support_site_url')."' target='blank'>".$versioninfo->getInfo('support_site_name').'</a></td>';
118 118
     echo '</tr>';
119 119
 }
120 120
 
121 121
 if ('' != $versioninfo->getInfo('submit_bug')) {
122 122
     echo '<tr>';
123
-    echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . '</td>';
124
-    echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . 'Submit a Bug in SmartFAQ Bug Tracker' . '</a></td>';
123
+    echo "<td class='head' align='left'>"._MI_SF_MODULE_BUG.'</td>';
124
+    echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_bug')."' target='blank'>".'Submit a Bug in SmartFAQ Bug Tracker'.'</a></td>';
125 125
     echo '</tr>';
126 126
 }
127 127
 if ('' != $versioninfo->getInfo('submit_feature')) {
128 128
     echo '<tr>';
129
-    echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . '</td>';
130
-    echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . 'Request a feature in the SmartFAQ Feature Tracker' . '</a></td>';
129
+    echo "<td class='head' align='left'>"._MI_SF_MODULE_FEATURE.'</td>';
130
+    echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_feature')."' target='blank'>".'Request a feature in the SmartFAQ Feature Tracker'.'</a></td>';
131 131
     echo '</tr>';
132 132
 }
133 133
 
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
     echo "<br>\n";
138 138
     echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
139 139
     echo '<tr>';
140
-    echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . '</b></td>';
140
+    echo "<td class='bg3' align='left'><b>"._MI_SF_MODULE_DISCLAIMER.'</b></td>';
141 141
     echo '</tr>';
142 142
 
143 143
     echo '<tr>';
144
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . '</td>';
144
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('warning').'</td>';
145 145
     echo '</tr>';
146 146
 
147 147
     echo '</table>';
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
     echo "<br>\n";
152 152
     echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
153 153
     echo '<tr>';
154
-    echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . '</b></td>';
154
+    echo "<td class='bg3' align='left'><b>"._MI_SF_AUTHOR_WORD.'</b></td>';
155 155
     echo '</tr>';
156 156
 
157 157
     echo '<tr>';
158
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . '</td>';
158
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('author_word').'</td>';
159 159
     echo '</tr>';
160 160
 
161 161
     echo '</table>';
@@ -166,11 +166,11 @@  discard block
 block discarded – undo
166 166
     echo "<br>\n";
167 167
     echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
168 168
     echo '<tr>';
169
-    echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . '</b></td>';
169
+    echo "<td class='bg3' align='left'><b>"._MI_SF_VERSION_HISTORY.'</b></td>';
170 170
     echo '</tr>';
171 171
 
172 172
     echo '<tr>';
173
-    echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . '</td>';
173
+    echo "<td class='even' align='left'>".$versioninfo->getInfo('version_history').'</td>';
174 174
     echo '</tr>';
175 175
 
176 176
     echo '</table>';
@@ -180,4 +180,4 @@  discard block
 block discarded – undo
180 180
 //$modfooter = Smartfaq\Utility::modFooter();
181 181
 //echo "<div align='center'>" . $modfooter . "</div>";
182 182
 //xoops_cp_footer();
183
-require_once __DIR__ . '/admin_footer.php';
183
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/admin_header.php';
21 21
 xoops_cp_header();
22 22
 
23 23
 $adminObject->displayNavigation(basename(__FILE__));
24 24
 $adminObject::setPaypal('[email protected]');
25 25
 $adminObject->displayAbout(false);
26 26
 
27
-require_once __DIR__ . '/admin_footer.php';
27
+require_once __DIR__.'/admin_footer.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
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 use XoopsModules\Smartfaq;
11 11
 use XoopsModules\Smartfaq\Constants;
12 12
 
13
-require_once __DIR__ . '/header.php';
13
+require_once __DIR__.'/header.php';
14 14
 
15 15
 global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule;
16 16
 
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
 
134 134
         // Storing the FAQ object in the database
135 135
         if (!$faqObj->store()) {
136
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors()));
136
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors()));
137 137
         }
138 138
 
139 139
         // Storing the answer object in the database
140 140
         if (!$newAnswerObj->store()) {
141
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR . Smartfaq\Utility::formatErrors($newAnswerObj->getErrors()));
141
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_SUBMIT_ERROR.Smartfaq\Utility::formatErrors($newAnswerObj->getErrors()));
142 142
         }
143 143
 
144 144
         /** @var \XoopsNotificationHandler $notificationHandler */
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             case 2:
156 156
                 // Answer for an open question submitted, auto-approved; became Q&A, need approbation
157 157
                 if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) {
158
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
158
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
159 159
                     $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
160 160
                 }
161 161
                 // Send notifications
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             case 3:
166 166
                 // Answer submitted, needs approbation
167 167
                 if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) {
168
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
168
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
169 169
                     $notificationHandler->subscribe('question', $newAnswerObj->answerid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
170 170
                 }
171 171
                 // Send notifications
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                 // New answer submitted for a published Q&A, need approbation
181 181
                 // Send notifications
182 182
                 if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) {
183
-                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
183
+                    require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
184 184
                     $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
185 185
                 }
186 186
 
@@ -216,20 +216,20 @@  discard block
 block discarded – undo
216 216
         }
217 217
 
218 218
         $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
219
-        require_once XOOPS_ROOT_PATH . '/header.php';
220
-        require_once __DIR__ . '/footer.php';
219
+        require_once XOOPS_ROOT_PATH.'/header.php';
220
+        require_once __DIR__.'/footer.php';
221 221
 
222 222
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
223 223
 
224
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
224
+        $moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
225 225
         $xoopsTpl->assign('whereInSection', $moduleName);
226 226
         $xoopsTpl->assign('lang_submit', _MD_SF_SUBMITANSWER);
227 227
 
228 228
         $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUBMITANSWERTO, ucwords($xoopsModule->name())));
229
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUBMITANSWER_INTRO);
229
+        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUBMITANSWER_INTRO);
230 230
 
231
-        require_once __DIR__ . '/include/answer.inc.php';
231
+        require_once __DIR__.'/include/answer.inc.php';
232 232
 
233
-        require_once XOOPS_ROOT_PATH . '/footer.php';
233
+        require_once XOOPS_ROOT_PATH.'/footer.php';
234 234
         break;
235 235
 }
Please login to merge, or discard this patch.
category.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@  discard block
 block discarded – undo
8 8
 
9 9
 use XoopsModules\Smartfaq;
10 10
 
11
-require_once __DIR__ . '/header.php';
11
+require_once __DIR__.'/header.php';
12 12
 
13
-$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
13
+$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0;
14 14
 
15 15
 // Creating the category handler object
16 16
 /** @var \XoopsModules\Smartfaq\CategoryHandler $categoryHandler */
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 }
36 36
 $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl';
37 37
 
38
-require_once XOOPS_ROOT_PATH . '/header.php';
39
-require_once __DIR__ . '/footer.php';
38
+require_once XOOPS_ROOT_PATH.'/header.php';
39
+require_once __DIR__.'/footer.php';
40 40
 
41 41
 // At which record shall we start
42
-$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
42
+$start = isset($_GET['start']) ? (int) $_GET['start'] : 0;
43 43
 
44 44
 // Creating the faq handler object
45 45
 /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
     // Get the last smartfaq
75 75
     $last_qnaObj = $faqHandler->getLastPublishedByCat();
76 76
 }
77
-$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize'];
77
+$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize'];
78 78
 // Creating the sub-categories objects that belong to the selected category
79
-$subcatsObj    =& $categoryHandler->getCategories(0, 0, $categoryid);
79
+$subcatsObj    = & $categoryHandler->getCategories(0, 0, $categoryid);
80 80
 $total_subcats = count($subcatsObj);
81 81
 $total_faqs    = 0;
82 82
 if (0 != $total_subcats) {
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
         if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) {
87 87
             if (isset($last_qnaObj[$subcat_id])) {
88 88
                 $subcatsObj[$i]->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid'));
89
-                $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>');
89
+                $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>');
90 90
             }
91 91
         }
92 92
         $subcatsObj[$i]->setVar('faqcount', $totalQnas[$subcat_id]);
93 93
         $subcats[$subcat_id] = $subcatsObj[$i]->toArray();
94
-        $total_faqs          += $totalQnas[$subcat_id];
94
+        $total_faqs += $totalQnas[$subcat_id];
95 95
         //}replacé ligne 92
96 96
     }
97 97
     $xoopsTpl->assign('subcats', $subcats);
98 98
 }
99 99
 $thiscategory_faqcount = isset($totalQnas[$categoryid]) ? $totalQnas[$categoryid] : 0;
100
-$category['total']     = $thiscategory_faqcount + $total_faqs;
100
+$category['total']     = $thiscategory_faqcount+$total_faqs;
101 101
 
102 102
 if (count($faqsObj) > 0) {
103 103
     $userids = [];
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     }
115 115
 
116 116
     $memberHandler = xoops_getHandler('member');
117
-    $users         = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
117
+    $users         = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
118 118
     // Adding the Q&As of the selected category
119 119
     foreach ($faqsObj as $iValue) {
120 120
         $faq = $iValue->toArray(null, $categoryObj);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
     if (isset($last_qnaObj) && $last_qnaObj) {
142 142
         $category['last_faqid']         = $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid');
143
-        $category['last_question_link'] = "<a href='faq.php?faqid=" . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid') . "'>" . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize) . '</a>';
143
+        $category['last_question_link'] = "<a href='faq.php?faqid=".$last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')."'>".$last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize).'</a>';
144 144
     }
145 145
 }
146 146
 
@@ -165,26 +165,26 @@  discard block
 block discarded – undo
165 165
 $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS);
166 166
 
167 167
 // The Navigation Bar
168
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
169
-$pagenav = new \XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid'));
168
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
169
+$pagenav = new \XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid'));
170 170
 if (1 == $xoopsModuleConfig['useimagenavpage']) {
171
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
171
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
172 172
 } else {
173
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
173
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
174 174
 }
175 175
 
176 176
 $xoopsTpl->assign('category', $category);
177 177
 
178 178
 // Page Title Hack by marcan
179 179
 $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
180
-$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']);
180
+$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']);
181 181
 // End Page Title Hack by marcan
182 182
 
183 183
 //code to include smartie
184
-if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) {
185
-    require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php';
184
+if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) {
185
+    require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php';
186 186
     $xoopsTpl->assign('smarttie', 1);
187 187
 }
188 188
 //end code for smarttie
189 189
 
190
-require_once XOOPS_ROOT_PATH . '/footer.php';
190
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
12 12
 
13
-require_once __DIR__ . '/preloads/autoloader.php';
13
+require_once __DIR__.'/preloads/autoloader.php';
14 14
 
15 15
 $moduleDirName = basename(__DIR__);
16 16
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 //$modversion['icons32']             = '../../Frameworks/moduleclasses/icons/32';
33 33
 $modversion['modicons16']          = 'assets/images/icons/16';
34 34
 $modversion['modicons32']          = 'assets/images/icons/32';
35
-$modversion['release_file']        = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt';
35
+$modversion['release_file']        = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt';
36 36
 $modversion['module_website_url']  = 'www.xoops.org';
37 37
 $modversion['module_website_name'] = 'XOOPS';
38 38
 $modversion['min_php']             = '5.5';
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 
103 103
 // Tables created by sql file (without prefix!)
104 104
 $modversion['tables'] = [
105
-    $moduleDirName . '_' . 'categories',
106
-    $moduleDirName . '_' . 'faq',
107
-    $moduleDirName . '_' . 'answers'
105
+    $moduleDirName.'_'.'categories',
106
+    $moduleDirName.'_'.'faq',
107
+    $moduleDirName.'_'.'answers'
108 108
 ];
109 109
 
110 110
 // Search
Please login to merge, or discard this patch.
include/onupdate.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     ob_start();
29 29
 
30
-    echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>';
30
+    echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>';
31 31
 
32 32
     // Adding partialview field
33 33
     $table = new Smartfaq\SmartDbTable('smartfaq_faq');
Please login to merge, or discard this patch.
include/oninstall.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
  */
31 31
 function xoops_module_pre_install_smartfaq(\XoopsModule $module)
32 32
 {
33
-    include __DIR__ . '/../preloads/autoloader.php';
33
+    include __DIR__.'/../preloads/autoloader.php';
34 34
     /** @var \XoopsModules\Smartfaq\Utility $utility */
35 35
     $utility = new \XoopsModules\Smartfaq\Utility();
36 36
     $xoopsSuccess = $utility::checkVerXoops($module);
37 37
     $phpSuccess   = $utility::checkVerPhp($module);
38 38
 
39
-    if (false !== $xoopsSuccess && false !==  $phpSuccess) {
40
-        $moduleTables =& $module->getInfo('tables');
39
+    if (false !== $xoopsSuccess && false !== $phpSuccess) {
40
+        $moduleTables = & $module->getInfo('tables');
41 41
         foreach ($moduleTables as $table) {
42
-            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
42
+            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';');
43 43
         }
44 44
     }
45 45
 
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
  */
56 56
 function xoops_module_install_smartfaq(\XoopsModule $module)
57 57
 {
58
-    require_once  __DIR__ . '/../../../mainfile.php';
59
-    require_once  __DIR__ . '/../include/config.php';
58
+    require_once  __DIR__.'/../../../mainfile.php';
59
+    require_once  __DIR__.'/../include/config.php';
60 60
 
61 61
     $moduleDirName = basename(dirname(__DIR__));
62 62
 
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     $moduleId2    = $helper->getModule()->mid();
74 74
     $gpermHandler = xoops_getHandler('groupperm');
75 75
     // access rights ------------------------------------------
76
-    $gpermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
77
-    $gpermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
78
-    $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
79
-    $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId);
80
-    $gpermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
76
+    $gpermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
77
+    $gpermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
78
+    $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
79
+    $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId);
80
+    $gpermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
81 81
 
82 82
     //  ---  CREATE FOLDERS ---------------
83 83
     if (count($configurator->uploadFolders) > 0) {
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 
90 90
     //  ---  COPY blank.png FILES ---------------
91 91
     if (count($configurator->copyBlankFiles) > 0) {
92
-        $file = __DIR__ . '/../assets/images/blank.png';
92
+        $file = __DIR__.'/../assets/images/blank.png';
93 93
         foreach (array_keys($configurator->copyBlankFiles) as $i) {
94
-            $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
94
+            $dest = $configurator->copyBlankFiles[$i].'/blank.png';
95 95
             $utilityClass::copyFile($file, $dest);
96 96
         }
97 97
     }
98 98
     //delete .html entries from the tpl table
99
-    $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $xoopsModule->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
99
+    $sql = 'DELETE FROM '.$xoopsDB->prefix('tplfile')." WHERE `tpl_module` = '".$xoopsModule->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'";
100 100
     $xoopsDB->queryF($sql);
101 101
 
102 102
     return true;
Please login to merge, or discard this patch.
include/request.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 global $_POST;
14 14
 
15
-require_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
16
-require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
17
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
15
+require_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
16
+require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
17
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
18 18
 
19 19
 $form = new \XoopsThemeForm(_MD_SF_REQUEST, 'form', xoops_getenv('PHP_SELF'), 'post', true);
20 20
 // CATEGORY
Please login to merge, or discard this patch.