@@ -19,7 +19,7 @@ |
||
19 | 19 | define('_SDU_MSG_NEWFIELD', 'Successfully added field %s'); |
20 | 20 | define('_SDU_MSG_NEWFIELD_ERR', 'Error adding field %s'); |
21 | 21 | define('_SDU_NEEDUPDATE', |
22 | - 'Your database is out-of-date. Please upgrade your database tables!<br><b>Note : The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>'); |
|
22 | + 'Your database is out-of-date. Please upgrade your database tables!<br><b>Note : The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>'); |
|
23 | 23 | define('_SDU_NOUPDATE', 'Your database is up-to-date. No updates are necessary.'); |
24 | 24 | define('_SDU_UPDATE_DB', 'Updating Database'); |
25 | 25 | define('_SDU_UPDATE_ERR', 'Errors updating to version %s'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | define('_MD_SF_CONTEXTMODULELINK', 'Contextually linked to this module'); |
28 | 28 | define('_MD_SF_CONTEXTMODULELINK_FAQ', 'Contextually linked to this module'); |
29 | 29 | define('_MD_SF_CONTEXTMODULELINK_FAQ_DSC', |
30 | - "Select the module to which this Q&A will be linked. If the Contextual Q&A block is visible on that module, the 'How do I' statement of this Q&A will be displayed."); |
|
30 | + "Select the module to which this Q&A will be linked. If the Contextual Q&A block is visible on that module, the 'How do I' statement of this Q&A will be displayed."); |
|
31 | 31 | define('_MD_SF_CONTEXTPAGE', 'Contextually linked to this URL'); |
32 | 32 | define('_MD_SF_CONTEXTPAGEDEF', 'Contextual Page'); |
33 | 33 | define('_MD_SF_CONTEXTPAGEDEF_DSC', 'Page for which this Q&A gives explanation <b>Example :</b> modules/newbb'); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | define('_MD_SF_ERRORSAVINGDB', 'ERROR: Database has NOT been Updated due to an Error!'); |
54 | 54 | define('_MD_SF_EXACTURL', 'Exact URL?'); |
55 | 55 | define('_MD_SF_EXACTURL_DSC', |
56 | - "If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed all pages that match a part of the root of the specific URL.ie modules/newbb/*.php"); |
|
56 | + "If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed all pages that match a part of the root of the specific URL.ie modules/newbb/*.php"); |
|
57 | 57 | define('_MD_SF_FAQ_NEW_ANSWER_NEED_APPROBATION', 'Your answer was submitted successfully and will be reviewed by a moderator.'); |
58 | 58 | define('_MD_SF_FAQ_NEW_ANSWER_PUBLISHED', 'Your answer was submitted successfully and will be automatically published in the Q&A section, as a replacement of the original answer.'); |
59 | 59 | define('_MD_SF_FAQCOMEFROM', 'This Q&A was found on '); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | define('_MD_SF_MAIL', 'Send Q&A'); |
78 | 78 | define('_MD_SF_MAINHEAD', 'Welcome to the'); |
79 | 79 | define('_MD_SF_MAININTRO', |
80 | - "In this area of the site, you will find the answers to the frequently asked questions. Each Q&A is placed in a category for easier finding. This is the section from where the random Q&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='" |
|
81 | - . XOOPS_URL |
|
82 | - . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
80 | + "In this area of the site, you will find the answers to the frequently asked questions. Each Q&A is placed in a category for easier finding. This is the section from where the random Q&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='" |
|
81 | + . XOOPS_URL |
|
82 | + . "/forms/askus/form.php'>Ask us a Question!</a>"); |
|
83 | 83 | define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category'); |
84 | 84 | define('_MD_SF_MAINNOFAQS', 'There are no Q&As in this category'); |
85 | 85 | define('_MD_SF_MODERATION_MAIN_HEAD', 'Moderation section of '); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | define('_MD_SF_REQUEST', 'Request a new Q&A'); |
120 | 120 | define('_MD_SF_REQUEST_ERROR', 'An error occured. Your request was not sent.'); |
121 | 121 | define('_MD_SF_REQUEST_INTRO', |
122 | - 'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'); |
|
122 | + 'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'); |
|
123 | 123 | define('_MD_SF_REQUEST_RECEIVED_NEED_APPROVAL', 'Your request has been sent and will be published in the Open Questions section upon approval by a moderator.<br>Thank you for your contribution!'); |
124 | 124 | define('_MD_SF_REQUEST_RECEIVED_AND_PUBLISHED', 'Your request has been sent and automatically published in the Open Questions section. Thank you for your contribution!'); |
125 | 125 | define('_MD_SF_REQUESTED', 'Requested'); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | define('_MD_SF_SUBMITANSWER', 'Submit answer'); |
141 | 141 | define('_MD_SF_SUBMITANSWERTO', 'Submit an answer to %s'); |
142 | 142 | define('_MD_SF_SUBMITANSWER_INTRO', |
143 | - 'please fill this form to submit an answer for this question. The site adminisrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
|
143 | + 'please fill this form to submit an answer for this question. The site adminisrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
|
144 | 144 | define('_MD_SF_SUBMITANSWERBUTTON', 'Submit the answer'); |
145 | 145 | define('_MD_SF_SUBMITAPPROVED', 'The answer you sent has been received. Since the auto-approve option is on, the answer has been accepted and the Q&A has been published.'); |
146 | 146 | define('_MD_SF_SUBMIT_FROM_ADMIN', 'Since you are an admin of the module, the Q&A was automatically published with all permissions.'); |
@@ -132,7 +132,7 @@ |
||
132 | 132 | define('_MD_SF_SPECIFIC_URL_SELECT', 'Specific URL...'); |
133 | 133 | define('_MD_SF_SENDSTORY', 'Send this Q&A to a friend'); |
134 | 134 | define('_MD_SF_SPECIFIC_URL', 'Specific URL'); |
135 | -define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>" . _MD_SF_SPECIFIC_URL_SELECT . "</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb"); |
|
135 | +define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>"._MD_SF_SPECIFIC_URL_SELECT."</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb"); |
|
136 | 136 | define('_MD_SF_SUB_INTRO', 'please fill this form to send your Q&A. The site administrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.'); |
137 | 137 | define('_MD_SF_SUB_SNEWNAME', 'Submit a Q&A'); |
138 | 138 | define('_MD_SF_SUB_SMNAME', 'Submit a Q&A'); |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | define('_AM_SF_ANSWERING', 'Answering'); |
28 | 28 | define('_AM_SF_ANSWERED', 'Answered'); |
29 | 29 | define('_AM_SF_ANSWERED_EXP', |
30 | - '<b>Answered questions</b> : Questions in the Open Questions section that have been answered by users. Once an answer has been approved for a question, this very question becomes a submitted Q&A and will require approval as well.'); |
|
30 | + '<b>Answered questions</b> : Questions in the Open Questions section that have been answered by users. Once an answer has been approved for a question, this very question becomes a submitted Q&A and will require approval as well.'); |
|
31 | 31 | define('_AM_SF_ANSWERED_MODERATE', 'Moderate the answer to this question'); |
32 | 32 | define('_AM_SF_ANSWERISDELETED', 'The answer has been deleted.'); |
33 | 33 | define('_AM_SF_ANSWERNOTFOUND', 'Error : No official answer was found'); |
34 | 34 | define('_AM_SF_APPROVE', 'Approve'); |
35 | 35 | define('_AM_SF_APPROVED', 'Approved answer'); |
36 | 36 | define('_AM_SF_APPROVED_INFO', |
37 | - 'The answer for this question has been approved. This question has now been promoted to the status of submitted Q&A and needs an approval to be published in the Q&A section.'); |
|
37 | + 'The answer for this question has been approved. This question has now been promoted to the status of submitted Q&A and needs an approval to be published in the Q&A section.'); |
|
38 | 38 | define('_AM_SF_APPROVED_MODERATE', "Moderate this Q&A's submission"); |
39 | 39 | define('_AM_SF_APPROVED_TITLE', 'Approved answer'); |
40 | 40 | define('_AM_SF_APPROVESUB', 'Approve submission'); |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | define('_AM_SF_ASKED', 'Asked'); |
52 | 52 | define('_AM_SF_ASKED_APPROVE_SUCCESS', 'The asked question was answered and the Q&A was published in the public section of the site.'); |
53 | 53 | define('_AM_SF_ASKED_EXP', |
54 | - '<b>Asked questions</b> : questions that have been asked by users. These questions have not yet been approved by a moderator. Once approved, the <i>Asked question</i> will become an <i>Open question<i> and be displayed in the <b>Open Questions</b> section.'); |
|
54 | + '<b>Asked questions</b> : questions that have been asked by users. These questions have not yet been approved by a moderator. Once approved, the <i>Asked question</i> will become an <i>Open question<i> and be displayed in the <b>Open Questions</b> section.'); |
|
55 | 55 | define('_AM_SF_ASKED_TITLE', 'Asked Question'); |
56 | 56 | define('_AM_SF_ASKED_TITLE_INFO', |
57 | - 'This is a question asked by a user. You can review the question and write the answer.<br>Uppon approval, the Q&A will be published in the public section of the site.'); |
|
57 | + 'This is a question asked by a user. You can review the question and write the answer.<br>Uppon approval, the Q&A will be published in the public section of the site.'); |
|
58 | 58 | define('_AM_SF_AUTHFAQ', 'Publish the submitted answer'); |
59 | 59 | define('_AM_SF_AUTHORIZE', 'Authorize'); |
60 | 60 | define('_AM_SF_BACK2IDX', 'Cancelled. Taking you back to the index'); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | define('_AM_SF_CATHEADER', 'Categories Management'); |
82 | 82 | define('_AM_SF_CONTEXTMODULELINK', 'Contextually linked to this module'); |
83 | 83 | define('_AM_SF_CONTEXTMODULELINK_FAQ', |
84 | - "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&A will be displayed.</span>"); |
|
84 | + "Contextually linked to this module<span style='font-size: xx-small; font-weight: normal; display: block;'>Select the module to which this Q&A will be<br>linked. If the Contextual FAQ block is visible<br>on that module, the 'How do I' statement of<br>this Q&A will be displayed.</span>"); |
|
85 | 85 | define('_AM_SF_CONTEXTOPTIONS', 'Contextual options'); |
86 | 86 | define('_AM_SF_CONTEXTPAGE', 'Contextually linked to this URL'); |
87 | 87 | define('_AM_SF_CONTEXTURLLINK', 'Link to this URL'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | define('_AM_SF_DELETE', 'Delete'); |
98 | 98 | define('_AM_SF_DELETEART', 'Delete Q&A'); |
99 | 99 | define('_AM_SF_DELETE_CAT_CONFIRM', |
100 | - 'Please note that by deleting a category, all the sub-categories and the Q&A of this category will be deleted as well, along with any comments that may have been posted related to these Q&A. Are you sure you wish to delete this category?'); |
|
100 | + 'Please note that by deleting a category, all the sub-categories and the Q&A of this category will be deleted as well, along with any comments that may have been posted related to these Q&A. Are you sure you wish to delete this category?'); |
|
101 | 101 | define('_AM_SF_DELETE_CAT_ERROR', 'An error occured while deleting this category.'); |
102 | 102 | define('_AM_SF_DELETECOL', 'Delete category'); |
103 | 103 | define('_AM_SF_DELETESUBM', 'Delete submission'); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | define('_AM_SF_ERROR_ANSWER_NOT_SAVED', 'An error occured. The answer was not saved in the database.'); |
124 | 124 | define('_AM_SF_ERROR_FAQ_NOT_SAVED', 'An error occured. The Q&A was not saved in the database.'); |
125 | 125 | define('_AM_SF_EXACTURL', |
126 | - "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"); |
|
126 | + "Exact URL?<span style='font-size: xx-small; font-weight: normal; display: block;'>If set to 'Yes', the Q&A will only display in the'Specific URL set above'. If set to 'No', the Q&A will be displayed in all pages that match a part of the root of the specific URL. ie; modules/newbb/*.php</span>"); |
|
127 | 127 | define('_AM_SF_FAQ_EDIT', 'Edit this Q&A'); |
128 | 128 | define('_AM_SF_FAQ_NEW_ANSWER_PUBLISHED', 'The original answer was replaced by this answer.'); |
129 | 129 | define('_AM_SF_FAQ_REVIEW', 'Edit this answer before approbation'); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | define('_AM_SF_HELP', 'Help'); |
136 | 136 | define('_AM_SF_HOWDOI', 'How do I...'); |
137 | 137 | define('_AM_SF_HOWDOI_FAQ', |
138 | - "How do I...<span style='font-size: xx-small; font-weight: normal; display: block;'>This will be used in the Contextual FAQ Block.<br>It should be a short version of the question.</span>"); |
|
138 | + "How do I...<span style='font-size: xx-small; font-weight: normal; display: block;'>This will be used in the Contextual FAQ Block.<br>It should be a short version of the question.</span>"); |
|
139 | 139 | define('_AM_SF_ID', 'Id'); |
140 | 140 | define('_AM_SF_IMPORT', 'Import'); |
141 | 141 | define('_AM_SF_IMPORT_ALL_QUESTIONS', 'All questions'); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | define('_AM_SF_IMPORT_ONLY_VISIBLE', 'Only visible questions '); |
159 | 159 | define('_AM_SF_IMPORT_PARENT_CATEGORY', 'SmartFAQ Parent Category'); |
160 | 160 | define('_AM_SF_IMPORT_PERMISSIONS', |
161 | - "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see these imported Q&As.<br>this Q&A.</span>"); |
|
161 | + "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see these imported Q&As.<br>this Q&A.</span>"); |
|
162 | 162 | define('_AM_SF_IMPORT_RESULT', 'Here is the result of the import.'); |
163 | 163 | define('_AM_SF_IMPORT_SETTINGS', 'Import Settings'); |
164 | 164 | define('_AM_SF_IMPORT_SUCCESS', 'The Q&A set was successfully imported in the module.'); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | define('_AM_SF_MODART', 'Modify a Q&A'); |
178 | 178 | define('_AM_SF_MODCOL', 'Modify existing category'); |
179 | 179 | define('_AM_SF_MODERATORS_DEF', |
180 | - "Moderators<span style='font-size: xx-small; font-weight: normal; display: block;'>Users that will act as moderators for this<br>category. They will be able to add, edit,<br>approve and delete questions and Q&A<br>within this category.</span>"); |
|
180 | + "Moderators<span style='font-size: xx-small; font-weight: normal; display: block;'>Users that will act as moderators for this<br>category. They will be able to add, edit,<br>approve and delete questions and Q&A<br>within this category.</span>"); |
|
181 | 181 | define('_AM_SF_MODIFY', 'Modify'); |
182 | 182 | define('_AM_SF_MODIFYCOL', 'Modify category'); |
183 | 183 | define('_AM_SF_MODIFYTHISCOL', 'Modify this category?'); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | define('_AM_SF_OFFLINE_FIELD', "Offline<span style='font-size: xx-small; font-weight: normal; display: block;'>Select 'No' to put this Q&A back<br>on line in the Q&A section.</span>"); |
215 | 215 | define('_AM_SF_OFFLINEEDITING', 'Editing an offline Q&A'); |
216 | 216 | define('_AM_SF_OFFLINEEDITING_INFO', |
217 | - "You can edit this offline Q&A. Modifications will be saved for this item. However, if you would like to display this Q&A in the Q&A section, you will need to set the <b>Offline</b> field to 'No'."); |
|
217 | + "You can edit this offline Q&A. Modifications will be saved for this item. However, if you would like to display this Q&A in the Q&A section, you will need to set the <b>Offline</b> field to 'No'."); |
|
218 | 218 | define('_AM_SF_OPEN_QUESTION', 'Open Question'); |
219 | 219 | define('_AM_SF_OPEN_QUESTIONS', 'Open Questions'); |
220 | 220 | define('_AM_SF_OPENED', 'Opened'); |
@@ -222,21 +222,21 @@ discard block |
||
222 | 222 | define('_AM_SF_OPENED_TITLE', 'Published questions in the Open Questions section'); |
223 | 223 | define('_AM_SF_OPENED_DSC', 'Here is a list of all the published questions in the Open Questions section.'); |
224 | 224 | define('_AM_SF_OPENED_EXP', |
225 | - '<b>Opened questions</b> : Questions that have been asked by a user, and approved by a moderator. These questions are displayed in the <i>Open Questions</i> section of this module, waiting for user to answer them.'); |
|
225 | + '<b>Opened questions</b> : Questions that have been asked by a user, and approved by a moderator. These questions are displayed in the <i>Open Questions</i> section of this module, waiting for user to answer them.'); |
|
226 | 226 | define('_AM_SF_OPTIONS', 'Options'); |
227 | 227 | define('_AM_SF_OPTS', 'Preferences'); |
228 | 228 | define('_AM_SF_OPEN_QUESTION_ANSWERING', 'Answering an open question'); |
229 | 229 | define('_AM_SF_OPEN_QUESTION_ANSWERING_INFO', 'You are now answering an open question, which will become a Q&A and be published in the Q&A section. '); |
230 | 230 | define('_AM_SF_OPENED_ANSWERING_SUCCESS', 'The open question has been answered and published in the Q&A section!'); |
231 | 231 | define('_AM_SF_PARENT_CATEGORY_EXP', |
232 | - "Parent category<span style='font-size: xx-small; font-weight: normal; display: block;'>If you want this new category to be a sub-category, select a parent here. If it is to be a top level category, leave this blank.</span>"); |
|
232 | + "Parent category<span style='font-size: xx-small; font-weight: normal; display: block;'>If you want this new category to be a sub-category, select a parent here. If it is to be a top level category, leave this blank.</span>"); |
|
233 | 233 | define('_AM_SF_PERMISSIONS', 'Permissions'); |
234 | 234 | define('_AM_SF_PERMISSIONS_FAQ', "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Q&A.</span>"); |
235 | 235 | define('_AM_SF_PERMISSIONS_QUESTION', "Permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see this Question.</span>"); |
236 | 236 | define('_AM_SF_PERMISSIONS_CAT_READ', |
237 | - "Read permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Category, as well as any open questions<br>and Q&A inside that category.</span>"); |
|
237 | + "Read permissions<span style='font-size: xx-small; font-weight: normal; display: block;'>Groups that will have permissions to see<br>this Category, as well as any open questions<br>and Q&A inside that category.</span>"); |
|
238 | 238 | define('_AM_SF_PERMISSIONS_APPLY_ON_FAQS', |
239 | - "Apply read permissions on Q&A<span style='font-size: xx-small; font-weight: normal; display: block;'>Apply the above Read Permissions on all<br>Q&A within that category, overriding the<br>current permissions for all these Q&A.</span>"); |
|
239 | + "Apply read permissions on Q&A<span style='font-size: xx-small; font-weight: normal; display: block;'>Apply the above Read Permissions on all<br>Q&A within that category, overriding the<br>current permissions for all these Q&A.</span>"); |
|
240 | 240 | define('_AM_SF_PERMISSIONSADMIN', 'Permissions Management'); |
241 | 241 | define('_AM_SF_PERMISSIONSVIEWMAN', 'Permissions to view categories'); |
242 | 242 | define('_AM_SF_PERMISSIONSADMINMAN', 'Permissions to moderate categories'); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | define('_AM_SF_REQUEST_QUEUE', 'The question has been successfully added to the Open Questions section.'); |
273 | 273 | define('_AM_SF_REJECTED_QUESTION', 'Rejected question'); |
274 | 274 | define('_AM_SF_REJECTED_QUESTION_EXP', |
275 | - '<b>Rejected question</b> : Questions that have been asked by users but rejected by a moderator. Rejected questions are not displayes in the Open Questions section.'); |
|
275 | + '<b>Rejected question</b> : Questions that have been asked by users but rejected by a moderator. Rejected questions are not displayes in the Open Questions section.'); |
|
276 | 276 | define('_AM_SF_REJECTED_SMARTFAQ', 'Rejected Q&A'); |
277 | 277 | define('_AM_SF_REJECTED_SMARTFAQ_EXP', '<b>Rejected Q&A</b> : Q&As that have been submitted by user, but rejected by a moderator. Rejected Q&As are not displayed in the Q&A section.'); |
278 | 278 | define('_AM_SF_REQUESTED_BY', 'Question asked by : '); |
@@ -289,8 +289,8 @@ discard block |
||
289 | 289 | define('_AM_SF_SUBMISSIONSMNGMT', 'Submitted Q&A'); |
290 | 290 | define('_AM_SF_SPECIFIC_URL_SELECT', 'Specific URL...'); |
291 | 291 | 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>" |
292 | - . _AM_SF_SPECIFIC_URL_SELECT |
|
293 | - . "</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
292 | + . _AM_SF_SPECIFIC_URL_SELECT |
|
293 | + . "</i>, please<br>specify the URL.<br>\n<b>Example :</b> modules/newbb</span>"); |
|
294 | 294 | define('_AM_SF_SUBMISSION_MODERATE', "Moderate this Q&A's submission"); |
295 | 295 | define('_AM_SF_SUBMITTED', 'Submitted'); |
296 | 296 | define('_AM_SF_SUBMITTED_EXP', '<b>Submitted Q&A</b> : Q&A that have been submitted by users. Once approved, they will be displayed in the Q&A section.'); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | define('_AM_SF_SUBMITTED_ANSWER_ACCEPTED', 'The submitted answer has been approved.'); |
299 | 299 | define('_AM_SF_SUBMITTED_ANSWER_INFO', 'Here is a list of submitted answers for that question. Select one of them to be the official answer for that question.'); |
300 | 300 | define('_AM_SF_SUBMITTED_INFO', |
301 | - 'This Q&A has been submitted by a member. You can make some modifications if you like. Upon approval, this Q&A will be displayed in the Q&A section of this site.'); |
|
301 | + 'This Q&A has been submitted by a member. You can make some modifications if you like. Upon approval, this Q&A will be displayed in the Q&A section of this site.'); |
|
302 | 302 | define('_AM_SF_SUBMITTED_APPROVE_SUCCESS', 'The submitted Q&A has been published in the Q&A section.'); |
303 | 303 | define('_AM_SF_SUBMITTED_TITLE', 'Approving a submitted Q&A'); |
304 | 304 | define('_AM_SF_FAQ_DELETE_ERROR', 'An error occured while deleting this Q&A.'); |
@@ -333,10 +333,10 @@ discard block |
||
333 | 333 | |
334 | 334 | if ($category->isNew()) { |
335 | 335 | $sql = sprintf('INSERT INTO %s (categoryid, parentid, name, description, total, weight, created) VALUES (NULL, %u, %s, %s, %u, %u, %u)', $this->db->prefix('smartfaq_categories'), |
336 | - $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
336 | + $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
337 | 337 | } else { |
338 | 338 | $sql = sprintf('UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u', $this->db->prefix('smartfaq_categories'), $parentid, |
339 | - $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
339 | + $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
340 | 340 | } |
341 | 341 | if (false != $force) { |
342 | 342 | $result = $this->db->queryF($sql); |
@@ -520,10 +520,10 @@ discard block |
||
520 | 520 | $ret = array(); |
521 | 521 | $limit = $start = 0; |
522 | 522 | $sql = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM ' |
523 | - . $this->db->prefix('smartfaq_categories') |
|
524 | - . ' AS c INNER JOIN ' |
|
525 | - . $this->db->prefix('smartfaq_faq') |
|
526 | - . ' AS f ON c.categoryid = f.categoryid'; |
|
523 | + . $this->db->prefix('smartfaq_categories') |
|
524 | + . ' AS c INNER JOIN ' |
|
525 | + . $this->db->prefix('smartfaq_faq') |
|
526 | + . ' AS f ON c.categoryid = f.categoryid'; |
|
527 | 527 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
528 | 528 | $sql .= ' ' . $criteria->renderWhere(); |
529 | 529 | if ($criteria->getSort() != '') { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $this->assignVars($id); |
48 | 48 | } else { |
49 | 49 | $categoryHandler = new sfCategoryHandler($this->db); |
50 | - $category =& $categoryHandler->get($id); |
|
50 | + $category = & $categoryHandler->get($id); |
|
51 | 51 | foreach ($category->vars as $k => $v) { |
52 | 52 | $this->assignVar($k, $v['value']); |
53 | 53 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function checkPermission() |
82 | 82 | { |
83 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
83 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
84 | 84 | |
85 | 85 | $userIsAdmin = sf_userIsAdmin(); |
86 | 86 | if ($userIsAdmin) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $filename = 'open_category.php'; |
158 | 158 | } |
159 | 159 | if ($withAllLink) { |
160 | - $ret = "<a href='" . XOOPS_URL . '/modules/smartfaq/' . $filename . '?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
160 | + $ret = "<a href='".XOOPS_URL.'/modules/smartfaq/'.$filename.'?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
161 | 161 | } else { |
162 | 162 | $ret = $this->name(); |
163 | 163 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | exit; |
170 | 170 | } |
171 | 171 | $parentid = $parentObj->parentid(); |
172 | - $ret = $parentObj->getCategoryPath(true, $open) . ' > ' . $ret; |
|
172 | + $ret = $parentObj->getCategoryPath(true, $open).' > '.$ret; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | return $ret; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $tags = array(); |
224 | 224 | $tags['MODULE_NAME'] = $myts->htmlSpecialChars($smartModule->getVar('name')); |
225 | 225 | $tags['CATEGORY_NAME'] = $this->name(); |
226 | - $tags['CATEGORY_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $this->categoryid(); |
|
226 | + $tags['CATEGORY_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$this->categoryid(); |
|
227 | 227 | |
228 | 228 | $notificationHandler = xoops_getHandler('notification'); |
229 | 229 | $notificationHandler->triggerEvent('global_faq', 0, 'category_created', $tags); |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | $category['categoryid'] = $this->categoryid(); |
240 | 240 | $category['name'] = $this->name(); |
241 | 241 | if ($open !== false) { |
242 | - $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/open_category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
242 | + $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/open_category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
243 | 243 | } else { |
244 | - $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
244 | + $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
245 | 245 | } |
246 | 246 | $category['total'] = $this->getVar('faqcount'); |
247 | 247 | $category['description'] = $this->description(); |
@@ -290,8 +290,8 @@ discard block |
||
290 | 290 | public function &get($id) |
291 | 291 | { |
292 | 292 | $false = false; |
293 | - if ((int)$id > 0) { |
|
294 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories') . ' WHERE categoryid=' . $id; |
|
293 | + if ((int) $id > 0) { |
|
294 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories').' WHERE categoryid='.$id; |
|
295 | 295 | if (!$result = $this->db->query($sql)) { |
296 | 296 | return $false; |
297 | 297 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | |
377 | 377 | // Deleteing the sub categories |
378 | - $subcats =& $this->getCategories(0, 0, $category->categoryid()); |
|
378 | + $subcats = & $this->getCategories(0, 0, $category->categoryid()); |
|
379 | 379 | foreach ($subcats as $subcat) { |
380 | 380 | $this->delete($subcat); |
381 | 381 | } |
@@ -412,11 +412,11 @@ discard block |
||
412 | 412 | { |
413 | 413 | $ret = array(); |
414 | 414 | $limit = $start = 0; |
415 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories'); |
|
415 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories'); |
|
416 | 416 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
417 | - $sql .= ' ' . $criteria->renderWhere(); |
|
417 | + $sql .= ' '.$criteria->renderWhere(); |
|
418 | 418 | if ($criteria->getSort() != '') { |
419 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
419 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
420 | 420 | } |
421 | 421 | $limit = $criteria->getLimit(); |
422 | 422 | $start = $criteria->getStart(); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $order = 'ASC', |
459 | 459 | $id_as_key = true |
460 | 460 | ) { |
461 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
461 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
462 | 462 | |
463 | 463 | $criteria = new CriteriaCompo(); |
464 | 464 | |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
473 | 473 | |
474 | 474 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
475 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
475 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
476 | 476 | } |
477 | 477 | $criteria->setStart($start); |
478 | 478 | $criteria->setLimit($limit); |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | $sort = 'weight', |
497 | 497 | $order = 'ASC' |
498 | 498 | ) { |
499 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
499 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
500 | 500 | |
501 | 501 | $criteria = new CriteriaCompo(); |
502 | 502 | |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
511 | 511 | |
512 | 512 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
513 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
513 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
514 | 514 | } |
515 | 515 | |
516 | 516 | $criteria->add(new Criteria('f.status', _SF_STATUS_OPENED)); |
@@ -525,9 +525,9 @@ discard block |
||
525 | 525 | . $this->db->prefix('smartfaq_faq') |
526 | 526 | . ' AS f ON c.categoryid = f.categoryid'; |
527 | 527 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
528 | - $sql .= ' ' . $criteria->renderWhere(); |
|
528 | + $sql .= ' '.$criteria->renderWhere(); |
|
529 | 529 | if ($criteria->getSort() != '') { |
530 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
530 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
531 | 531 | } |
532 | 532 | $limit = $criteria->getLimit(); |
533 | 533 | $start = $criteria->getStart(); |
@@ -556,9 +556,9 @@ discard block |
||
556 | 556 | */ |
557 | 557 | public function getCount($criteria = null) |
558 | 558 | { |
559 | - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('smartfaq_categories'); |
|
559 | + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_categories'); |
|
560 | 560 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
561 | - $sql .= ' ' . $criteria->renderWhere(); |
|
561 | + $sql .= ' '.$criteria->renderWhere(); |
|
562 | 562 | } |
563 | 563 | $result = $this->db->query($sql); |
564 | 564 | if (!$result) { |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
586 | 586 | |
587 | 587 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
588 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
588 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
589 | 589 | } |
590 | 590 | } |
591 | 591 | |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
609 | 609 | |
610 | 610 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
611 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
611 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
612 | 612 | } |
613 | 613 | } |
614 | 614 | |
615 | 615 | $criteria->add(new Criteria('f.status', _SF_STATUS_OPENED)); |
616 | 616 | |
617 | - $sql = 'SELECT COUNT(c.categoryid) FROM ' . $this->db->prefix('smartfaq_categories') . ' AS c INNER JOIN ' . $this->db->prefix('smartfaq_faq') . ' AS f ON c.categoryid = f.categoryid'; |
|
617 | + $sql = 'SELECT COUNT(c.categoryid) FROM '.$this->db->prefix('smartfaq_categories').' AS c INNER JOIN '.$this->db->prefix('smartfaq_faq').' AS f ON c.categoryid = f.categoryid'; |
|
618 | 618 | |
619 | 619 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
620 | - $sql .= ' ' . $criteria->renderWhere(); |
|
620 | + $sql .= ' '.$criteria->renderWhere(); |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | $result = $this->db->query($sql); |
@@ -635,13 +635,13 @@ discard block |
||
635 | 635 | */ |
636 | 636 | public function getSubCats($categories) |
637 | 637 | { |
638 | - $criteria = new CriteriaCompo(new Criteria('parentid', '(' . implode(',', array_keys($categories)) . ')'), 'IN'); |
|
638 | + $criteria = new CriteriaCompo(new Criteria('parentid', '('.implode(',', array_keys($categories)).')'), 'IN'); |
|
639 | 639 | $ret = array(); |
640 | 640 | if (!sf_userIsAdmin()) { |
641 | 641 | $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
642 | 642 | |
643 | 643 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
644 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
644 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
645 | 645 | } |
646 | 646 | $subcats = $this->getObjects($criteria, true); |
647 | 647 | foreach ($subcats as $subcat_id => $subcat) { |
@@ -659,9 +659,9 @@ discard block |
||
659 | 659 | */ |
660 | 660 | public function deleteAll($criteria = null) |
661 | 661 | { |
662 | - $sql = 'DELETE FROM ' . $this->db->prefix('smartfaq_categories'); |
|
662 | + $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_categories'); |
|
663 | 663 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
664 | - $sql .= ' ' . $criteria->renderWhere(); |
|
664 | + $sql .= ' '.$criteria->renderWhere(); |
|
665 | 665 | } |
666 | 666 | if (!$this->db->query($sql)) { |
667 | 667 | return false; |
@@ -683,10 +683,10 @@ discard block |
||
683 | 683 | **/ |
684 | 684 | public function updateAll($fieldname, $fieldvalue, $criteria = null) |
685 | 685 | { |
686 | - $set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
|
687 | - $sql = 'UPDATE ' . $this->db->prefix('smartfaq_categories') . ' SET ' . $set_clause; |
|
686 | + $set_clause = is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue); |
|
687 | + $sql = 'UPDATE '.$this->db->prefix('smartfaq_categories').' SET '.$set_clause; |
|
688 | 688 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
689 | - $sql .= ' ' . $criteria->renderWhere(); |
|
689 | + $sql .= ' '.$criteria->renderWhere(); |
|
690 | 690 | } |
691 | 691 | if (!$this->db->queryF($sql)) { |
692 | 692 | return false; |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | public function faqsCount($cat_id = 0, $status = '') |
713 | 713 | { |
714 | 714 | global $xoopsUser; |
715 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
715 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
716 | 716 | |
717 | 717 | $faqHandler = sf_gethandler('faq'); |
718 | 718 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | //Verifies that a MySQL table exists |
17 | 17 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
18 | 18 | $realname = $xoopsDB->prefix($table); |
19 | - $sql = 'SHOW TABLES FROM ' . XOOPS_DB_NAME; |
|
19 | + $sql = 'SHOW TABLES FROM '.XOOPS_DB_NAME; |
|
20 | 20 | $ret = $xoopsDB->queryF($sql); |
21 | 21 | while (list($m_table) = $xoopsDB->fetchRow($ret)) { |
22 | 22 | if ($m_table == $realname) { |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | * Include the language constants for the SmartObjectDBUpdater |
54 | 54 | */ |
55 | 55 | global $xoopsConfig; |
56 | -$common_file = XOOPS_ROOT_PATH . '/modules/smartfaq/language/' . $xoopsConfig['language'] . '/smartdbupdater.php'; |
|
56 | +$common_file = XOOPS_ROOT_PATH.'/modules/smartfaq/language/'.$xoopsConfig['language'].'/smartdbupdater.php'; |
|
57 | 57 | if (!file_exists($common_file)) { |
58 | - $common_file = XOOPS_ROOT_PATH . '/modules/smartfaq/language/english/smartdbupdater.php'; |
|
58 | + $common_file = XOOPS_ROOT_PATH.'/modules/smartfaq/language/english/smartdbupdater.php'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | include $common_file; |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | public function getExistingFieldsArray() |
153 | 153 | { |
154 | 154 | global $xoopsDB; |
155 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $this->name()); |
|
155 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$this->name()); |
|
156 | 156 | while ($existing_field = $xoopsDB->fetchArray($result)) { |
157 | 157 | $fields[$existing_field['Field']] = $existing_field['Type']; |
158 | 158 | if ($existing_field['Null'] !== 'YES') { |
159 | 159 | $fields[$existing_field['Field']] .= ' NOT NULL'; |
160 | 160 | } |
161 | 161 | if ($existing_field['Extra']) { |
162 | - $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra']; |
|
162 | + $fields[$existing_field['Field']] .= ' '.$existing_field['Extra']; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | $query = sprintf('INSERT INTO %s VALUES (%s)', $this->name(), $data); |
236 | 236 | $ret = $xoopsDB->query($query); |
237 | 237 | if (!$ret) { |
238 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>'; |
|
238 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>'; |
|
239 | 239 | } else { |
240 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>'; |
|
240 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>'; |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | |
@@ -402,9 +402,9 @@ discard block |
||
402 | 402 | |
403 | 403 | $ret = $xoopsDB->query($query); |
404 | 404 | if (!$ret) { |
405 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . '<br>'; |
|
405 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).'<br>'; |
|
406 | 406 | } else { |
407 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>'; |
|
407 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>'; |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | return $ret; |
@@ -423,11 +423,11 @@ discard block |
||
423 | 423 | $query = sprintf('DROP TABLE %s', $this->name()); |
424 | 424 | $ret = $xoopsDB->query($query); |
425 | 425 | if (!$ret) { |
426 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . '<br>'; |
|
426 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).'<br>'; |
|
427 | 427 | |
428 | 428 | return false; |
429 | 429 | } else { |
430 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>'; |
|
430 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>'; |
|
431 | 431 | |
432 | 432 | return true; |
433 | 433 | } |
@@ -451,9 +451,9 @@ discard block |
||
451 | 451 | $ret = $ret && $xoopsDB->query($query); |
452 | 452 | if ($alteredField['showerror']) { |
453 | 453 | if (!$ret) { |
454 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . '<br>'; |
|
454 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).'<br>'; |
|
455 | 455 | } else { |
456 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>'; |
|
456 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>'; |
|
457 | 457 | } |
458 | 458 | } |
459 | 459 | } |
@@ -477,9 +477,9 @@ discard block |
||
477 | 477 | //echo $query; |
478 | 478 | $ret = $ret && $xoopsDB->query($query); |
479 | 479 | if (!$ret) { |
480 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>'; |
|
480 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>'; |
|
481 | 481 | } else { |
482 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>'; |
|
482 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>'; |
|
483 | 483 | } |
484 | 484 | } |
485 | 485 | |
@@ -502,9 +502,9 @@ discard block |
||
502 | 502 | $query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']); |
503 | 503 | $ret = $ret && $xoopsDB->query($query); |
504 | 504 | if (!$ret) { |
505 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
|
505 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).'<br>'; |
|
506 | 506 | } else { |
507 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
507 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
508 | 508 | } |
509 | 509 | } |
510 | 510 | |
@@ -527,9 +527,9 @@ discard block |
||
527 | 527 | //echo $query."<br>"; |
528 | 528 | $ret = $ret && $xoopsDB->query($query); |
529 | 529 | if (!$ret) { |
530 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
|
530 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).'<br>'; |
|
531 | 531 | } else { |
532 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
532 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
@@ -553,9 +553,9 @@ discard block |
||
553 | 553 | |
554 | 554 | $ret = $ret && $xoopsDB->query($query); |
555 | 555 | if (!$ret) { |
556 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . '<br>'; |
|
556 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).'<br>'; |
|
557 | 557 | } else { |
558 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>'; |
|
558 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>'; |
|
559 | 559 | } |
560 | 560 | } |
561 | 561 | |
@@ -624,11 +624,11 @@ discard block |
||
624 | 624 | $query = sprintf('ALTER TABLE %s RENAME %s', $from, $to); |
625 | 625 | $ret = $xoopsDB->query($query); |
626 | 626 | if (!$ret) { |
627 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>'; |
|
627 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>'; |
|
628 | 628 | |
629 | 629 | return false; |
630 | 630 | } else { |
631 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>'; |
|
631 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>'; |
|
632 | 632 | |
633 | 633 | return true; |
634 | 634 | } |
@@ -474,10 +474,10 @@ |
||
474 | 474 | |
475 | 475 | if ($answerObj->isNew()) { |
476 | 476 | $sql = sprintf('INSERT INTO %s (answerid, `status`, faqid, answer, uid, datesub, notifypub) VALUES (NULL, %u, %u, %s, %u, %u, %u)', $this->db->prefix('smartfaq_answers'), $status, $faqid, |
477 | - $this->db->quoteString($answer), $uid, time(), $notifypub); |
|
477 | + $this->db->quoteString($answer), $uid, time(), $notifypub); |
|
478 | 478 | } else { |
479 | 479 | $sql = sprintf('UPDATE %s SET STATUS = %u, faqid = %s, answer = %s, uid = %u, datesub = %u, notifypub = %u WHERE answerid = %u', $this->db->prefix('smartfaq_answers'), $status, $faqid, |
480 | - $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid); |
|
480 | + $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid); |
|
481 | 481 | } |
482 | 482 | |
483 | 483 | if (false != $force) { |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | if (!$attach_key) { |
92 | 92 | return false; |
93 | 93 | } |
94 | - $this->attachment_array[(string)$attach_key]['num_download']++; |
|
94 | + $this->attachment_array[(string) $attach_key]['num_download']++; |
|
95 | 95 | |
96 | - return $this->attachment_array[(string)$attach_key]['num_download']; |
|
96 | + return $this->attachment_array[(string) $attach_key]['num_download']; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $attachment_save = base64_encode(serialize($this->attachment_array)); |
107 | 107 | } |
108 | 108 | $this->setVar('attachment', $attachment_save); |
109 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smartfaq_answers') . ' SET attachment=' . $GLOBALS['xoopsDB']->quoteString($attachment_save) . ' WHERE post_id = ' . $this->getVar('answerid'); |
|
109 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('smartfaq_answers').' SET attachment='.$GLOBALS['xoopsDB']->quoteString($attachment_save).' WHERE post_id = '.$this->getVar('answerid'); |
|
110 | 110 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
111 | 111 | //xoops_error($GLOBALS["xoopsDB"]->error()); |
112 | 112 | return false; |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | |
139 | 139 | foreach ($attach_old as $key => $attach) { |
140 | 140 | if (in_array($key, $attach_array)) { |
141 | - @unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attach['name_saved']); |
|
142 | - @unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/thumbs/' . $attach['name_saved']); // delete thumbnails |
|
141 | + @unlink(XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attach['name_saved']); |
|
142 | + @unlink(XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/thumbs/'.$attach['name_saved']); // delete thumbnails |
|
143 | 143 | continue; |
144 | 144 | } |
145 | 145 | $this->attachment_array[$key] = $attach; |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | static $counter = 0; |
166 | 166 | $this->attachment_array = $this->getAttachment(); |
167 | 167 | if ($name_saved) { |
168 | - $key = (string)(time() + ($counter++)); |
|
168 | + $key = (string) (time()+($counter++)); |
|
169 | 169 | $this->attachment_array[$key] = array( |
170 | 170 | 'name_saved' => $name_saved, |
171 | 171 | 'name_display' => isset($name_display) ? $name_display : $name_saved, |
172 | 172 | 'mimetype' => $mimetype, |
173 | - 'num_download' => isset($num_download) ? (int)$num_download : 0 |
|
173 | + 'num_download' => isset($num_download) ? (int) $num_download : 0 |
|
174 | 174 | ); |
175 | 175 | } |
176 | 176 | $attachment_save = null; |
@@ -196,24 +196,24 @@ discard block |
||
196 | 196 | if (is_array($attachments) && count($attachments) > 0) { |
197 | 197 | $iconHandler = sf_getIconHandler(); |
198 | 198 | $mime_path = $iconHandler->getPath('mime'); |
199 | - include_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/include/functions.image.php'; |
|
199 | + include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/include/functions.image.php'; |
|
200 | 200 | $image_extensions = array('jpg', 'jpeg', 'gif', 'png', 'bmp'); // need improve !!! |
201 | - $post_attachment .= '<br><strong>' . _MD_ATTACHMENT . '</strong>:'; |
|
201 | + $post_attachment .= '<br><strong>'._MD_ATTACHMENT.'</strong>:'; |
|
202 | 202 | $post_attachment .= '<br><hr size="1" noshade="noshade" /><br>'; |
203 | 203 | foreach ($attachments as $key => $att) { |
204 | 204 | $file_extension = ltrim(strrchr($att['name_saved'], '.'), '.'); |
205 | 205 | $filetype = $file_extension; |
206 | - if (file_exists(XOOPS_ROOT_PATH . '/' . $mime_path . '/' . $filetype . '.gif')) { |
|
207 | - $icon_filetype = XOOPS_URL . '/' . $mime_path . '/' . $filetype . '.gif'; |
|
206 | + if (file_exists(XOOPS_ROOT_PATH.'/'.$mime_path.'/'.$filetype.'.gif')) { |
|
207 | + $icon_filetype = XOOPS_URL.'/'.$mime_path.'/'.$filetype.'.gif'; |
|
208 | 208 | } else { |
209 | - $icon_filetype = XOOPS_URL . '/' . $mime_path . '/unknown.gif'; |
|
209 | + $icon_filetype = XOOPS_URL.'/'.$mime_path.'/unknown.gif'; |
|
210 | 210 | } |
211 | - $file_size = @filesize(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $att['name_saved']); |
|
212 | - $file_size = number_format($file_size / 1024, 2) . ' KB'; |
|
211 | + $file_size = @filesize(XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$att['name_saved']); |
|
212 | + $file_size = number_format($file_size / 1024, 2).' KB'; |
|
213 | 213 | if ($xoopsModuleConfig['media_allowed'] && in_array(strtolower($file_extension), $image_extensions)) { |
214 | - $post_attachment .= '<br><img src="' . $icon_filetype . '" alt="' . $filetype . '" /><strong> ' . $att['name_display'] . '</strong> <small>(' . $file_size . ')</small>'; |
|
215 | - $post_attachment .= '<br>' . sf_attachmentImage($att['name_saved']); |
|
216 | - $isDisplayed = true; |
|
214 | + $post_attachment .= '<br><img src="'.$icon_filetype.'" alt="'.$filetype.'" /><strong> '.$att['name_display'].'</strong> <small>('.$file_size.')</small>'; |
|
215 | + $post_attachment .= '<br>'.sf_attachmentImage($att['name_saved']); |
|
216 | + $isDisplayed = true; |
|
217 | 217 | } else { |
218 | 218 | global $xoopsUser; |
219 | 219 | if (empty($xoopsModuleConfig['show_userattach'])) { |
@@ -370,9 +370,9 @@ discard block |
||
370 | 370 | $tags = array(); |
371 | 371 | $tags['MODULE_NAME'] = $myts->displayTarea($smartModule->getVar('name')); |
372 | 372 | $tags['FAQ_NAME'] = $faqObj->question(); |
373 | - $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/faq.php?faqid=' . $faqObj->faqid(); |
|
373 | + $tags['FAQ_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/faq.php?faqid='.$faqObj->faqid(); |
|
374 | 374 | $tags['CATEGORY_NAME'] = $faqObj->getCategoryName(); |
375 | - $tags['CATEGORY_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $faqObj->categoryid(); |
|
375 | + $tags['CATEGORY_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$faqObj->categoryid(); |
|
376 | 376 | $tags['FAQ_QUESTION'] = $faqObj->question(); |
377 | 377 | |
378 | 378 | // TODO : Not sure about the 'formpreview' ... |
@@ -431,8 +431,8 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public function get($id = null, $fields = null) |
433 | 433 | { |
434 | - if ((int)$id > 0) { |
|
435 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_answers') . ' WHERE answerid=' . $id; |
|
434 | + if ((int) $id > 0) { |
|
435 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_answers').' WHERE answerid='.$id; |
|
436 | 436 | if (!$result = $this->db->query($sql)) { |
437 | 437 | return false; |
438 | 438 | } |
@@ -562,11 +562,11 @@ discard block |
||
562 | 562 | { |
563 | 563 | $ret = array(); |
564 | 564 | $limit = $start = 0; |
565 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_answers'); |
|
565 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_answers'); |
|
566 | 566 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
567 | - $sql .= ' ' . $criteria->renderWhere(); |
|
567 | + $sql .= ' '.$criteria->renderWhere(); |
|
568 | 568 | if ($criteria->getSort() != '') { |
569 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
569 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
570 | 570 | } |
571 | 571 | $limit = $criteria->getLimit(); |
572 | 572 | $start = $criteria->getStart(); |
@@ -580,9 +580,9 @@ discard block |
||
580 | 580 | $answer = new sfAnswer(); |
581 | 581 | $answer->assignVars($myrow); |
582 | 582 | if (!$id_as_key) { |
583 | - $ret[] =& $answer; |
|
583 | + $ret[] = & $answer; |
|
584 | 584 | } else { |
585 | - $ret[$myrow['answerid']] =& $answer; |
|
585 | + $ret[$myrow['answerid']] = & $answer; |
|
586 | 586 | } |
587 | 587 | unset($answer); |
588 | 588 | } |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | $criteria->setOrder($order); |
651 | 651 | $criteria->setLimit($limit); |
652 | 652 | $criteria->setStart($start); |
653 | - $ret =& $this->getObjects($criteria); |
|
653 | + $ret = & $this->getObjects($criteria); |
|
654 | 654 | |
655 | 655 | return $ret; |
656 | 656 | } |
@@ -663,9 +663,9 @@ discard block |
||
663 | 663 | */ |
664 | 664 | public function getCount(CriteriaElement $criteria = null) |
665 | 665 | { |
666 | - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('smartfaq_answers'); |
|
666 | + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_answers'); |
|
667 | 667 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
668 | - $sql .= ' ' . $criteria->renderWhere(); |
|
668 | + $sql .= ' '.$criteria->renderWhere(); |
|
669 | 669 | } |
670 | 670 | $result = $this->db->query($sql); |
671 | 671 | if (!$result) { |
@@ -684,10 +684,10 @@ discard block |
||
684 | 684 | */ |
685 | 685 | public function getCountByFAQ($criteria = null) |
686 | 686 | { |
687 | - $sql = 'SELECT faqid, COUNT(*) FROM ' . $this->db->prefix('smartfaq_answers'); |
|
687 | + $sql = 'SELECT faqid, COUNT(*) FROM '.$this->db->prefix('smartfaq_answers'); |
|
688 | 688 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
689 | - $sql .= ' ' . $criteria->renderWhere(); |
|
690 | - $sql .= ' ' . $criteria->getGroupby(); |
|
689 | + $sql .= ' '.$criteria->renderWhere(); |
|
690 | + $sql .= ' '.$criteria->getGroupby(); |
|
691 | 691 | } |
692 | 692 | |
693 | 693 | //echo "<br>$sql<br>"; |
@@ -714,9 +714,9 @@ discard block |
||
714 | 714 | */ |
715 | 715 | public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) |
716 | 716 | { |
717 | - $sql = 'DELETE FROM ' . $this->db->prefix('smartfaq_answers'); |
|
717 | + $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_answers'); |
|
718 | 718 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
719 | - $sql .= ' ' . $criteria->renderWhere(); |
|
719 | + $sql .= ' '.$criteria->renderWhere(); |
|
720 | 720 | } |
721 | 721 | if (!$this->db->query($sql)) { |
722 | 722 | return false; |
@@ -736,10 +736,10 @@ discard block |
||
736 | 736 | */ |
737 | 737 | public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) |
738 | 738 | { |
739 | - $set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
|
740 | - $sql = 'UPDATE ' . $this->db->prefix('smartfaq_answers') . ' SET ' . $set_clause; |
|
739 | + $set_clause = is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue); |
|
740 | + $sql = 'UPDATE '.$this->db->prefix('smartfaq_answers').' SET '.$set_clause; |
|
741 | 741 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
742 | - $sql .= ' ' . $criteria->renderWhere(); |
|
742 | + $sql .= ' '.$criteria->renderWhere(); |
|
743 | 743 | } |
744 | 744 | //echo "<br>" . $sql . "<br>"; |
745 | 745 | if (!$this->db->queryF($sql)) { |
@@ -756,8 +756,8 @@ discard block |
||
756 | 756 | public function getLastPublishedByFaq($faqids) |
757 | 757 | { |
758 | 758 | $ret = array(); |
759 | - $sql = 'SELECT faqid, answer, uid, datesub FROM ' . $this->db->prefix('smartfaq_answers') . ' |
|
760 | - WHERE faqid IN (' . implode(',', $faqids) . ') AND status = ' . _SF_AN_STATUS_APPROVED . ' GROUP BY faqid'; |
|
759 | + $sql = 'SELECT faqid, answer, uid, datesub FROM '.$this->db->prefix('smartfaq_answers').' |
|
760 | + WHERE faqid IN (' . implode(',', $faqids).') AND status = '._SF_AN_STATUS_APPROVED.' GROUP BY faqid'; |
|
761 | 761 | $result = $this->db->query($sql); |
762 | 762 | if (!$result) { |
763 | 763 | return $ret; |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | while ($row = $this->db->fetchArray($result)) { |
766 | 766 | $answer = new sfAnswer(); |
767 | 767 | $answer->assignVars($row); |
768 | - $ret[$row['faqid']] =& $answer; |
|
768 | + $ret[$row['faqid']] = & $answer; |
|
769 | 769 | unset($answer); |
770 | 770 | } |
771 | 771 |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -include_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
@@ -45,94 +45,94 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | switch ($op) { |
48 | - case 'post': |
|
48 | + case 'post': |
|
49 | 49 | |
50 | - global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
50 | + global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
51 | 51 | |
52 | - $newFaqObj = $faqHandler->create(); |
|
52 | + $newFaqObj = $faqHandler->create(); |
|
53 | 53 | |
54 | - if (!$xoopsUser) { |
|
55 | - if ($xoopsModuleConfig['anonpost'] == 1) { |
|
56 | - $uid = 0; |
|
54 | + if (!$xoopsUser) { |
|
55 | + if ($xoopsModuleConfig['anonpost'] == 1) { |
|
56 | + $uid = 0; |
|
57 | + } else { |
|
58 | + redirect_header('index.php', 3, _NOPERM); |
|
59 | + } |
|
57 | 60 | } else { |
58 | - redirect_header('index.php', 3, _NOPERM); |
|
61 | + $uid = $xoopsUser->uid(); |
|
59 | 62 | } |
60 | - } else { |
|
61 | - $uid = $xoopsUser->uid(); |
|
62 | - } |
|
63 | - |
|
64 | - // Putting the values about the FAQ in the FAQ object |
|
65 | - $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
66 | - $newFaqObj->setVar('uid', $uid); |
|
67 | - $newFaqObj->setVar('question', $_POST['question']); |
|
68 | - $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
69 | - $newFaqObj->setVar('notifypub', $notifypub); |
|
70 | - |
|
71 | - // Setting the status of the FAQ |
|
72 | - if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
73 | - $newFaqObj->setVar('status', _SF_STATUS_OPENED); |
|
74 | - } else { |
|
75 | - $newFaqObj->setVar('status', _SF_STATUS_ASKED); |
|
76 | - } |
|
77 | - |
|
78 | - // Storing the FAQ object in the database |
|
79 | - if (!$newFaqObj->store()) { |
|
80 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
81 | - } |
|
82 | - |
|
83 | - // Get the cateopry object related to that FAQ |
|
84 | - // If autoapprove_requested |
|
85 | - if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
86 | - // We do not not subscribe user to notification on publish since we publish it right away |
|
87 | - |
|
88 | - // Send notifications |
|
89 | - $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED)); |
|
90 | - |
|
91 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
92 | - } else { |
|
93 | - // Subscribe the user to On Published notification, if requested |
|
94 | - if ($notifypub == 1) { |
|
95 | - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
96 | - $notificationHandler = xoops_getHandler('notification'); |
|
97 | - $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
63 | + |
|
64 | + // Putting the values about the FAQ in the FAQ object |
|
65 | + $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
66 | + $newFaqObj->setVar('uid', $uid); |
|
67 | + $newFaqObj->setVar('question', $_POST['question']); |
|
68 | + $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
69 | + $newFaqObj->setVar('notifypub', $notifypub); |
|
70 | + |
|
71 | + // Setting the status of the FAQ |
|
72 | + if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
73 | + $newFaqObj->setVar('status', _SF_STATUS_OPENED); |
|
74 | + } else { |
|
75 | + $newFaqObj->setVar('status', _SF_STATUS_ASKED); |
|
76 | + } |
|
77 | + |
|
78 | + // Storing the FAQ object in the database |
|
79 | + if (!$newFaqObj->store()) { |
|
80 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
98 | 81 | } |
99 | - // Send notifications |
|
100 | - $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED)); |
|
101 | 82 | |
102 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
103 | - } |
|
83 | + // Get the cateopry object related to that FAQ |
|
84 | + // If autoapprove_requested |
|
85 | + if ($xoopsModuleConfig['autoapprove_request'] == 1) { |
|
86 | + // We do not not subscribe user to notification on publish since we publish it right away |
|
87 | + |
|
88 | + // Send notifications |
|
89 | + $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED)); |
|
90 | + |
|
91 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
92 | + } else { |
|
93 | + // Subscribe the user to On Published notification, if requested |
|
94 | + if ($notifypub == 1) { |
|
95 | + include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
96 | + $notificationHandler = xoops_getHandler('notification'); |
|
97 | + $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
98 | + } |
|
99 | + // Send notifications |
|
100 | + $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED)); |
|
101 | + |
|
102 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
103 | + } |
|
104 | 104 | |
105 | - //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
106 | - redirect_header('index.php', 2, $redirect_msg); |
|
107 | - break; |
|
105 | + //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
106 | + redirect_header('index.php', 2, $redirect_msg); |
|
107 | + break; |
|
108 | 108 | |
109 | - case 'form': |
|
110 | - default: |
|
109 | + case 'form': |
|
110 | + default: |
|
111 | 111 | |
112 | - global $xoopsUser, $myts; |
|
112 | + global $xoopsUser, $myts; |
|
113 | 113 | |
114 | - $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
115 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | - include_once __DIR__ . '/footer.php'; |
|
114 | + $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
115 | + include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | + include_once __DIR__ . '/footer.php'; |
|
117 | 117 | |
118 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
118 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
119 | 119 | |
120 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | - $xoopsTpl->assign('whereInSection', $moduleName); |
|
122 | - $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
120 | + $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | + $xoopsTpl->assign('whereInSection', $moduleName); |
|
122 | + $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
123 | 123 | |
124 | - $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
125 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
124 | + $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
125 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
126 | 126 | |
127 | - include_once __DIR__ . '/include/request.inc.php'; |
|
127 | + include_once __DIR__ . '/include/request.inc.php'; |
|
128 | 128 | |
129 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
129 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
130 | 130 | |
131 | - $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
131 | + $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
132 | 132 | |
133 | - include_once __DIR__ . '/include/request.inc.php'; |
|
133 | + include_once __DIR__ . '/include/request.inc.php'; |
|
134 | 134 | |
135 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
135 | + include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
136 | 136 | |
137 | - break; |
|
137 | + break; |
|
138 | 138 | } |
@@ -6,8 +6,8 @@ discard block |
||
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 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Storing the FAQ object in the database |
79 | 79 | if (!$newFaqObj->store()) { |
80 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
80 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.sf_formatErrors($newFaqObj->getErrors())); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | // Get the cateopry object related to that FAQ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } else { |
93 | 93 | // Subscribe the user to On Published notification, if requested |
94 | 94 | if ($notifypub == 1) { |
95 | - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
95 | + include_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
96 | 96 | $notificationHandler = xoops_getHandler('notification'); |
97 | 97 | $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
98 | 98 | } |
@@ -112,27 +112,27 @@ discard block |
||
112 | 112 | global $xoopsUser, $myts; |
113 | 113 | |
114 | 114 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
115 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
116 | - include_once __DIR__ . '/footer.php'; |
|
115 | + include_once XOOPS_ROOT_PATH.'/header.php'; |
|
116 | + include_once __DIR__.'/footer.php'; |
|
117 | 117 | |
118 | 118 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
119 | 119 | |
120 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
120 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
121 | 121 | $xoopsTpl->assign('whereInSection', $moduleName); |
122 | 122 | $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
123 | 123 | |
124 | 124 | $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
125 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
125 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
126 | 126 | |
127 | - include_once __DIR__ . '/include/request.inc.php'; |
|
127 | + include_once __DIR__.'/include/request.inc.php'; |
|
128 | 128 | |
129 | 129 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
130 | 130 | |
131 | 131 | $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
132 | 132 | |
133 | - include_once __DIR__ . '/include/request.inc.php'; |
|
133 | + include_once __DIR__.'/include/request.inc.php'; |
|
134 | 134 | |
135 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
135 | + include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
136 | 136 | |
137 | 137 | break; |
138 | 138 | } |