This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
0 ignored issues
–
show
|
|||
2 | |||
3 | /** |
||
4 | * |
||
5 | * Module: SmartPartner |
||
6 | * Author: The SmartFactory <www.smartfactory.ca> |
||
7 | * Licence: GNU |
||
8 | */ |
||
9 | |||
10 | // This must contain the name of the folder in which reside SmartPartner |
||
11 | if (!defined('SMARTPARTNER_DIRNAME')) { |
||
12 | define('SMARTPARTNER_DIRNAME', 'smartpartner'); |
||
13 | } |
||
14 | |||
15 | $modversion['name'] = _MI_SPARTNER_PARTNERS_NAME; |
||
16 | $modversion['version'] = 2.01; |
||
17 | $modversion['author'] = 'XOOPS Development Team'; |
||
18 | $modversion['description'] = _MI_SPARTNER_PARTNERS_DESC; |
||
19 | $modversion['credits'] = "Based on Raul Recio (AKA UNFOR)'s XoopsPartners module"; |
||
20 | $modversion['help'] = 'page=help'; |
||
21 | $modversion['license'] = 'GNU GPL 2.0 or later'; |
||
22 | $modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html'; |
||
23 | $modversion['official'] = 0; //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported |
||
24 | $modversion['image'] = 'assets/images/logo_module.png'; |
||
25 | //$modversion['dirname'] = SMARTPARTNER_DIRNAME; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
56% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
26 | $modversion['dirname'] = basename(__DIR__); |
||
27 | |||
28 | // Added by marcan for the About page in admin section |
||
29 | $modversion['modFooter'] = 'smartpartner_modFooter'; |
||
30 | $modversion['developer_lead'] = 'marcan [Marc-Andre Lanciault]'; |
||
31 | $modversion['developer_contributor'] = |
||
32 | 'Andy Cleff, Raul Recio, chapi, Marco, Mariuss, outch, M0nty, Christian, Philou, M4d3L, solo, GiJOE, Predator, phppp, AmiCalmant, hsalazar, Aidan Lister, fx2024, Zabou'; |
||
33 | $modversion['developer_website_url'] = 'http://www.smartfactory.ca'; |
||
34 | $modversion['developer_website_name'] = 'SmartFactory.ca'; |
||
35 | $modversion['developer_email'] = 'marcan@smartfactory'; |
||
36 | $modversion['status_version'] = 'RC 1'; |
||
37 | $modversion['status'] = 'Release Candidate'; |
||
38 | $modversion['date'] = '2007-09-19'; |
||
39 | |||
40 | $modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; |
||
41 | $modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; |
||
42 | $modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; |
||
43 | //about |
||
44 | $modversion['module_status'] = 'RC 1'; |
||
45 | $modversion['release_date'] = '2016/03/29'; |
||
46 | $modversion['release_file'] = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt'; |
||
47 | $modversion['module_website_url'] = 'www.xoops.org'; |
||
48 | $modversion['module_website_name'] = 'XOOPS'; |
||
49 | $modversion['min_php'] = '5.5'; |
||
50 | $modversion['min_xoops'] = '2.5.8'; |
||
51 | $modversion['min_admin'] = '1.1'; |
||
52 | $modversion['min_db'] = array( |
||
53 | 'mysql' => '5.0.7', |
||
54 | 'mysqli' => '5.0.7' |
||
55 | ); |
||
56 | |||
57 | $modversion['warning'] = _MI_SPARTNER_WARNING_RC; |
||
58 | |||
59 | $modversion['people']['developers'][] = 'marcan (Marc-Andr� Lanciault)'; |
||
60 | $modversion['people']['developers'][] = 'felix (Felix Tousignant)'; |
||
61 | |||
62 | $modversion['people']['testers'][] = 'Andy Cleff'; |
||
63 | |||
64 | //$modversion['people']['translators'][] = "translator 1"; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
79% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
65 | |||
66 | //$modversion['people']['documenters'][] = "documenter 1"; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
79% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
67 | |||
68 | //$modversion['people']['other'][] = "other 1"; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
79% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
69 | |||
70 | $modversion['demo_site_url'] = 'http://www.smartfactory.ca/modules/smartpartner/'; |
||
71 | $modversion['demo_site_name'] = 'SmartFactory.ca'; |
||
72 | $modversion['support_site_url'] = 'http://dev.xoops.org/modules/xfmod/project/?group_id=1109'; |
||
73 | $modversion['support_site_name'] = 'SmartPartner on XOOPS Developpers Forge'; |
||
74 | $modversion['submit_bug'] = 'http://dev.xoops.org/modules/xfmod/tracker/?func=add&group_id=1109&atid=581'; |
||
75 | $modversion['submit_feature'] = 'http://dev.xoops.org/modules/xfmod/tracker/?func=add&group_id=1109&atid=584'; |
||
76 | |||
77 | $modversion['author_word'] = " |
||
78 | <b>The SmartFactory</b> would like to thank everyone involved in this project.<br> |
||
79 | <br> |
||
80 | A big thanks to chapi, Marco, Mariuss, oucth, Christian, Philou, solo, yoyo2021 and AmiCalmant for their feedback on the module.<br> |
||
81 | <br> |
||
82 | Thanks to hsalazar who originally created the admin interface the SmartModules are using. A lot of modules are now using it and it's because of your work. Thank you Horacio !<br> |
||
83 | <br> |
||
84 | Thanks to GiJoe for the blocks and groups management pages. Your code is very usefull to a lot of developers !<br> |
||
85 | <br> |
||
86 | Thanks to Zabou for supporting me ;-)<br> |
||
87 | <br> |
||
88 | Enjoy <b>SmartPartner</b> ! |
||
89 | "; |
||
90 | |||
91 | // Tables |
||
92 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
||
93 | $modversion['tables'][0] = 'smartpartner_partner'; |
||
94 | $modversion['tables'][1] = 'smartpartner_categories'; |
||
95 | $modversion['tables'][2] = 'smartpartner_meta'; |
||
96 | $modversion['tables'][3] = 'smartpartner_partner_cat_link'; |
||
97 | $modversion['tables'][4] = 'smartpartner_offer'; |
||
98 | $modversion['tables'][5] = 'smartpartner_files'; |
||
99 | $modversion['tables'][6] = 'smartpartner_mimetypes'; |
||
100 | // Admin things |
||
101 | $modversion['hasAdmin'] = 1; |
||
102 | $modversion['system_menu'] = 1; |
||
103 | $modversion['adminindex'] = 'admin/index.php'; |
||
104 | $modversion['adminmenu'] = 'admin/menu.php'; |
||
105 | |||
106 | $modversion['onInstall'] = 'include/onupdate.inc.php'; |
||
107 | $modversion['onUpdate'] = 'include/onupdate.inc.php'; |
||
108 | |||
109 | // Blocks |
||
110 | $modversion['blocks'][1]['file'] = 'partners_list.php'; |
||
111 | $modversion['blocks'][1]['name'] = _MI_SPARTNER_BLOCK_PARTNERS_LIST; |
||
112 | $modversion['blocks'][1]['description'] = _MI_SPARTNER_BLOCK_PARTNERS_LIST_DESC; |
||
113 | $modversion['blocks'][1]['show_func'] = 'b_partners_list_show'; |
||
114 | $modversion['blocks'][1]['edit_func'] = 'b_partners_list_edit'; |
||
115 | $modversion['blocks'][1]['options'] = '1|1|5|1|hits|DESC|1'; |
||
116 | $modversion['blocks'][1]['template'] = 'partners_block_list.tpl'; |
||
117 | |||
118 | $modversion['blocks'][2]['file'] = 'scrolling_partner.php'; |
||
119 | $modversion['blocks'][2]['name'] = _MI_SPARTNER_BLOCK_SCROLLING_PARTNER; |
||
120 | $modversion['blocks'][2]['description'] = _MI_SPARTNER_BLOCK_SCROLLING_PARTNER_DESC; |
||
121 | $modversion['blocks'][2]['show_func'] = 'b_scrolling_partner_show'; |
||
122 | $modversion['blocks'][2]['edit_func'] = 'b_scrolling_partner_edit'; |
||
123 | $modversion['blocks'][2]['options'] = '0|300|150|2|5'; |
||
124 | $modversion['blocks'][2]['template'] = 'scrolling_partner.tpl'; |
||
125 | |||
126 | $modversion['blocks'][3]['file'] = 'categories_list.php'; |
||
127 | $modversion['blocks'][3]['name'] = _MI_SPARTNER_BLOCK_CATEGORIES_LIST; |
||
128 | $modversion['blocks'][3]['description'] = _MI_SPARTNER_BLOCK_CATEGORIES_LIST_DESC; |
||
129 | $modversion['blocks'][3]['show_func'] = 'b_categories_list_show'; |
||
130 | $modversion['blocks'][3]['edit_func'] = 'b_categories_list_edit'; |
||
131 | $modversion['blocks'][3]['options'] = 'name|ASC|1'; |
||
132 | $modversion['blocks'][3]['template'] = 'categories_list.tpl'; |
||
133 | |||
134 | $modversion['blocks'][4]['file'] = 'recent_partners.php'; |
||
135 | $modversion['blocks'][4]['name'] = _MI_SPARTNER_BLOCK_PARTNERS_RECENT; |
||
136 | $modversion['blocks'][4]['description'] = _MI_SPARTNER_BLOCK_PARTNERS_RECENT_DESC; |
||
137 | $modversion['blocks'][4]['show_func'] = 'b_recent_partners_show'; |
||
138 | $modversion['blocks'][4]['edit_func'] = 'b_recent_partners_edit'; |
||
139 | $modversion['blocks'][4]['options'] = '1|1|5'; |
||
140 | $modversion['blocks'][4]['template'] = 'recent_partners.tpl'; |
||
141 | |||
142 | $modversion['blocks'][5]['file'] = 'recent_offers.php'; |
||
143 | $modversion['blocks'][5]['name'] = _MI_SPARTNER_BLOCK_OFFERS_RECENT; |
||
144 | $modversion['blocks'][5]['description'] = _MI_SPARTNER_BLOCK_OFFERS_RECENT_DESC; |
||
145 | $modversion['blocks'][5]['show_func'] = 'b_recent_offers_show'; |
||
146 | $modversion['blocks'][5]['edit_func'] = 'b_recent_offers_edit'; |
||
147 | $modversion['blocks'][5]['options'] = '1|1|5'; |
||
148 | $modversion['blocks'][5]['template'] = 'recent_offers.tpl'; |
||
149 | |||
150 | $modversion['blocks'][6]['file'] = 'random_offer.php'; |
||
151 | $modversion['blocks'][6]['name'] = _MI_SPARTNER_BLOCK_OFFERS_RANDOM; |
||
152 | $modversion['blocks'][6]['description'] = _MI_SPARTNER_BLOCK_OFFERS_RANDOM_DESC; |
||
153 | $modversion['blocks'][6]['show_func'] = 'b_random_offer_show'; |
||
154 | $modversion['blocks'][6]['edit_func'] = 'b_random_offer_edit'; |
||
155 | $modversion['blocks'][6]['options'] = '1|1|5'; |
||
156 | $modversion['blocks'][6]['template'] = 'random_offer.tpl'; |
||
157 | /* |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
74% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
158 | $modversion['blocks'][2]['file'] = "random_partner.php"; |
||
159 | $modversion['blocks'][2]['name'] = _MI_SPARTNER_BLOCK_RANDOM_PARTNER; |
||
160 | $modversion['blocks'][2]['description'] = _MI_SPARTNER_BLOCK_RANDOM_PARTNER_DESC; |
||
161 | $modversion['blocks'][2]['show_func'] = "b_random_partner_show"; |
||
162 | $modversion['blocks'][2]['edit_func'] = "b_random_partner_edit"; |
||
163 | $modversion['blocks'][2]['options'] = "1|1|1"; |
||
164 | $modversion['blocks'][2]['template'] = 'random_partner.tpl';*/ |
||
165 | |||
166 | // Search |
||
167 | $modversion['hasSearch'] = 1; |
||
168 | $modversion['search']['file'] = 'include/search.inc.php'; |
||
169 | $modversion['search']['func'] = 'smartpartner_search'; |
||
170 | |||
171 | // Menu |
||
172 | $modversion['hasMain'] = 1; |
||
173 | |||
174 | // Page Awareness |
||
175 | $modversion['pages'][1]['name'] = _MI_SPARTNER_PAGE_PARTNER; |
||
176 | $modversion['pages'][1]['url'] = 'partner.php'; |
||
177 | $modversion['pages'][2]['name'] = _MI_SPARTNER_PAGE_INDEX; |
||
178 | $modversion['pages'][2]['url'] = 'index.php'; |
||
179 | |||
180 | // Templates |
||
181 | $i = 1; |
||
182 | |||
183 | $modversion['templates'][$i]['file'] = 'smartpartner_header.tpl'; |
||
184 | $modversion['templates'][$i]['description'] = 'Module header'; |
||
185 | ++$i; |
||
186 | |||
187 | $modversion['templates'][$i]['file'] = 'smartpartner_footer.tpl'; |
||
188 | $modversion['templates'][$i]['description'] = 'Module footer'; |
||
189 | ++$i; |
||
190 | |||
191 | $modversion['templates'][$i]['file'] = 'smartpartner_index.tpl'; |
||
192 | $modversion['templates'][$i]['description'] = 'Partners main page'; |
||
193 | ++$i; |
||
194 | |||
195 | $modversion['templates'][$i]['file'] = 'smartpartner_partner.tpl'; |
||
196 | $modversion['templates'][$i]['description'] = "Full partner's page"; |
||
197 | ++$i; |
||
198 | |||
199 | $modversion['templates'][$i]['file'] = 'smartpartner_join.tpl'; |
||
200 | $modversion['templates'][$i]['description'] = 'Apply to be a partner form'; |
||
201 | ++$i; |
||
202 | |||
203 | $modversion['templates'][$i]['file'] = 'smartpartner_pdf.tpl'; |
||
204 | $modversion['templates'][$i]['description'] = 'Create a PDF page'; |
||
205 | ++$i; |
||
206 | |||
207 | $modversion['templates'][$i]['file'] = 'smartpartner_offer.tpl'; |
||
208 | $modversion['templates'][$i]['description'] = 'Displays offers'; |
||
209 | ++$i; |
||
210 | |||
211 | //config categoories |
||
212 | $modversion['configcat'][1]['nameid'] = 'format_options'; |
||
213 | $modversion['configcat'][1]['name'] = '_MI_SPARTNER_CAT_FOR_OPT'; |
||
214 | $modversion['configcat'][1]['description'] = '_MI_SPARTNER_CAT_FOR_OPT_DSC'; |
||
215 | |||
216 | $modversion['configcat'][2]['nameid'] = 'permissions'; |
||
217 | $modversion['configcat'][2]['name'] = '_MI_SPARTNER_CAT_PERM'; |
||
218 | $modversion['configcat'][2]['description'] = '_MI_SPARTNER_CAT_PERM_DSC'; |
||
219 | |||
220 | $modversion['configcat'][3]['nameid'] = 'other'; |
||
221 | $modversion['configcat'][3]['name'] = '_MI_SPARTNER_CAT_OTHER'; |
||
222 | $modversion['configcat'][3]['description'] = '_MI_SPARTNER_CAT_OTHER_DSC'; |
||
223 | |||
224 | // Config options |
||
225 | $i = 0; |
||
226 | ++$i; |
||
227 | $modversion['config'][$i]['name'] = 'allowsubmit'; |
||
228 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_ALLOWSUBMIT'; |
||
229 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_ALLOWSUBMITDSC'; |
||
230 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
231 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
232 | $modversion['config'][$i]['default'] = 0; |
||
233 | $modversion['config'][$i]['category'] = 'permissions'; |
||
234 | |||
235 | ++$i; |
||
236 | $modversion['config'][$i]['name'] = 'anonpost'; |
||
237 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_ANONPOST'; |
||
238 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_ANONPOSTDSC'; |
||
239 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
240 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
241 | $modversion['config'][$i]['default'] = 0; |
||
242 | $modversion['config'][$i]['category'] = 'permissions'; |
||
243 | |||
244 | ++$i; |
||
245 | $modversion['config'][$i]['name'] = 'autoapprove_submitted'; |
||
246 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_AUTOAPPROVE'; |
||
247 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_AUTOAPPROVE_DSC'; |
||
248 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
249 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
250 | $modversion['config'][$i]['default'] = 0; |
||
251 | $modversion['config'][$i]['category'] = 'permissions'; |
||
252 | |||
253 | ++$i; |
||
254 | $modversion['config'][$i]['name'] = 'useimagenavpage'; |
||
255 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_USEIMAGENAVPAGE'; |
||
256 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_USEIMAGENAVPAGEDSC'; |
||
257 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
258 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
259 | $modversion['config'][$i]['default'] = 0; |
||
260 | $modversion['config'][$i]['category'] = 'format_options'; |
||
261 | |||
262 | ++$i; |
||
263 | $modversion['config'][$i]['name'] = 'maximum_imagesize'; |
||
264 | $modversion['config'][$i]['title'] = '_MI_SSPARTNER_MAX_SIZE'; |
||
265 | $modversion['config'][$i]['description'] = '_MI_SSPARTNER_MAX_SIZEDSC'; |
||
266 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
267 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
268 | $modversion['config'][$i]['default'] = '1000000'; |
||
269 | |||
270 | ++$i; |
||
271 | $modversion['config'][$i]['name'] = 'img_max_width'; |
||
272 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_IMG_MAX_WIDTH'; |
||
273 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_IMG_MAX_WIDTH_DSC'; |
||
274 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
275 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
276 | $modversion['config'][$i]['default'] = '150'; |
||
277 | $modversion['config'][$i]['category'] = 'format_options'; |
||
278 | |||
279 | ++$i; |
||
280 | $modversion['config'][$i]['name'] = 'img_max_height'; |
||
281 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_IMG_MAX_HEIGHT'; |
||
282 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_IMG_MAX_HEIGHT_DSC'; |
||
283 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
284 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
285 | $modversion['config'][$i]['default'] = '150'; |
||
286 | $modversion['config'][$i]['category'] = 'format_options'; |
||
287 | |||
288 | ++$i; |
||
289 | $modversion['config'][$i]['name'] = 'reclick_time'; |
||
290 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_RECLICK'; |
||
291 | $modversion['config'][$i]['description'] = ''; |
||
292 | $modversion['config'][$i]['formtype'] = 'select'; |
||
293 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
294 | $modversion['config'][$i]['default'] = 86400; |
||
295 | $modversion['config'][$i]['options'] = |
||
296 | array('_MI_SPARTNER_HOUR' => '3600', '_MI_SPARTNER_3HOURS' => '10800', '_MI_SPARTNER_5HOURS' => '18000', '_MI_SPARTNER_10HOURS' => '36000', '_MI_SPARTNER_DAY' => '86400'); |
||
297 | $modversion['config'][$i]['category'] = 'other'; |
||
298 | |||
299 | ++$i; |
||
300 | $modversion['config'][$i]['name'] = 'percat_user'; |
||
301 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_PERCAT_USER'; |
||
302 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_PERCAT_USER_DSC'; |
||
303 | $modversion['config'][$i]['formtype'] = 'select'; |
||
304 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
305 | $modversion['config'][$i]['default'] = 20; |
||
306 | $modversion['config'][$i]['options'] = array('2' => 2, '3' => 3, '5' => 5, '10' => 10, '20' => 20); |
||
307 | $modversion['config'][$i]['category'] = 'format_options'; |
||
308 | |||
309 | ++$i; |
||
310 | $modversion['config'][$i]['name'] = 'offer_sort'; |
||
311 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_SORT'; |
||
312 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_SORT_DSC'; |
||
313 | $modversion['config'][$i]['formtype'] = 'select'; |
||
314 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
315 | $modversion['config'][$i]['options'] = array( |
||
316 | _MI_SPARTNER_SORT_WEIGHT => 'weight', |
||
317 | _MI_SPARTNER_SORT_DATE_PUB => 'date_pub', |
||
318 | _MI_SPARTNER_SORT_DATE_END => 'date_end', |
||
319 | _MI_SPARTNER_SORT_ALPHA => 'title' |
||
320 | ); |
||
321 | $modversion['config'][$i]['default'] = 'date_pub'; |
||
322 | $modversion['config'][$i]['category'] = 'format_options'; |
||
323 | |||
324 | ++$i; |
||
325 | $modversion['config'][$i]['name'] = 'offer_order'; |
||
326 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_ORDER'; |
||
327 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_ORDER_DSC'; |
||
328 | $modversion['config'][$i]['formtype'] = 'select'; |
||
329 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
330 | $modversion['config'][$i]['options'] = array( |
||
331 | _MI_SPARTNER_ORDER_ASC => 'ASC', |
||
332 | _MI_SPARTNER_ORDER_DESC => 'DESC' |
||
333 | ); |
||
334 | $modversion['config'][$i]['default'] = 'DESC'; |
||
335 | $modversion['config'][$i]['category'] = 'format_options'; |
||
336 | |||
337 | ++$i; |
||
338 | $modversion['config'][$i]['name'] = 'updated_period'; |
||
339 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_UPDATE_PERIOD'; |
||
340 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_UPDATE_PERIODDSC'; |
||
341 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
342 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
343 | $modversion['config'][$i]['default'] = '7'; |
||
344 | $modversion['config'][$i]['category'] = 'format_options'; |
||
345 | |||
346 | ++$i; |
||
347 | $modversion['config'][$i]['name'] = 'partview_msg'; |
||
348 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_PARTVIEW_MSG'; |
||
349 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_PARTVIEW_MSG_DSC'; |
||
350 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
351 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
352 | $modversion['config'][$i]['default'] = _MI_SPARTNER_PARTVIEW_MSG_DEF; |
||
353 | $modversion['config'][$i]['category'] = 'other'; |
||
354 | /* |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
61% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
355 | //temporarly disabled. To make this preference work, |
||
356 | // index.php have to use the page navigator |
||
357 | ++$i; |
||
358 | $modversion['config'][$i]['name'] = 'perpage_user'; |
||
359 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_PERPAGE_USER'; |
||
360 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_PERPAGE_USER_DSC'; |
||
361 | $modversion['config'][$i]['formtype'] = 'select'; |
||
362 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
363 | $modversion['config'][$i]['default'] = 5; |
||
364 | $modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50); |
||
365 | $modversion['config'][$i]['category'] = 'format_options'; |
||
366 | */ |
||
367 | |||
368 | ++$i; |
||
369 | $modversion['config'][$i]['name'] = 'perpage_admin'; |
||
370 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_PERPAGE_ADMIN'; |
||
371 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_PERPAGE_ADMIN_DSC'; |
||
372 | $modversion['config'][$i]['formtype'] = 'select'; |
||
373 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
374 | $modversion['config'][$i]['default'] = 5; |
||
375 | $modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50); |
||
376 | $modversion['config'][$i]['category'] = 'format_options'; |
||
377 | |||
378 | ++$i; |
||
379 | $modversion['config'][$i]['name'] = 'orphan_first'; |
||
380 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_ORPHAN_FIRST'; |
||
381 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_ORPHAN_FIRST_DSC'; |
||
382 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
383 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
384 | $modversion['config'][$i]['default'] = 0; |
||
385 | $modversion['config'][$i]['category'] = 'format_options'; |
||
386 | |||
387 | ++$i; |
||
388 | $modversion['config'][$i]['name'] = 'index_sortby'; |
||
389 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_INDEX_SORTBY'; |
||
390 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_INDEX_SORTBY_DSC'; |
||
391 | $modversion['config'][$i]['formtype'] = 'select'; |
||
392 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
393 | $modversion['config'][$i]['default'] = 'weight'; |
||
394 | $modversion['config'][$i]['options'] = array('_MI_SPARTNER_ID' => 'id', '_MI_SPARTNER_HITS' => 'hits', '_MI_SPARTNER_TITLE' => 'title', '_MI_SPARTNER_WEIGHT' => 'weight'); |
||
395 | $modversion['config'][$i]['category'] = 'format_options'; |
||
396 | |||
397 | ++$i; |
||
398 | $modversion['config'][$i]['name'] = 'welcomemsg'; |
||
399 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_WELCOMEMSG'; |
||
400 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_WELCOMEMSG_DSC'; |
||
401 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
402 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
403 | $modversion['config'][$i]['default'] = _MI_SPARTNER_WELCOMEMSG_DEF; |
||
404 | $modversion['config'][$i]['category'] = 'other'; |
||
405 | |||
406 | ++$i; |
||
407 | $modversion['config'][$i]['name'] = 'allowed_ext'; |
||
408 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_ALLOWED_EXT'; |
||
409 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_ALLOWED_EXT_DSC'; |
||
410 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
411 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
412 | $modversion['config'][$i]['default'] = 'doc|pdf|xls|ppt'; |
||
413 | $modversion['config'][$i]['category'] = 'other'; |
||
414 | |||
415 | ++$i; |
||
416 | $modversion['config'][$i]['name'] = 'maximum_filesize'; |
||
417 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_MAX_SIZE'; |
||
418 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_MAX_SIZEDSC'; |
||
419 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
420 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
421 | $modversion['config'][$i]['default'] = '1000000'; |
||
422 | $memberHandler = xoops_getHandler('member'); |
||
423 | $group_list = $memberHandler->getGroupList(); |
||
424 | foreach ($group_list as $key => $group) { |
||
425 | $groups[$group] = $key; |
||
426 | } |
||
427 | ++$i; |
||
428 | $modversion['config'][$i]['name'] = 'default_full_view'; |
||
429 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_DEF_FULL'; |
||
430 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_DEF_FULL_DSC'; |
||
431 | $modversion['config'][$i]['formtype'] = 'select_multi'; |
||
432 | $modversion['config'][$i]['valuetype'] = 'array'; |
||
433 | $modversion['config'][$i]['options'] = $groups; |
||
434 | $modversion['config'][$i]['default'] = array(1, 2); |
||
435 | $modversion['config'][$i]['category'] = 'other'; |
||
436 | |||
437 | ++$i; |
||
438 | $modversion['config'][$i]['name'] = 'default_part_view'; |
||
439 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_DEF_PART'; |
||
440 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_DEF_PART_DSC'; |
||
441 | $modversion['config'][$i]['formtype'] = 'select_multi'; |
||
442 | $modversion['config'][$i]['valuetype'] = 'array'; |
||
443 | $modversion['config'][$i]['options'] = $groups; |
||
444 | $modversion['config'][$i]['default'] = array(3); |
||
445 | $modversion['config'][$i]['category'] = 'other'; |
||
446 | |||
447 | ++$i; |
||
448 | $modversion['config'][$i]['name'] = 'stats_group'; |
||
449 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_STATS_GROUP'; |
||
450 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_STATS_GROUP_DSC'; |
||
451 | $modversion['config'][$i]['formtype'] = 'select_multi'; |
||
452 | $modversion['config'][$i]['valuetype'] = 'array'; |
||
453 | $modversion['config'][$i]['options'] = $groups; |
||
454 | $modversion['config'][$i]['default'] = $groups; |
||
455 | $modversion['config'][$i]['category'] = 'other'; |
||
456 | |||
457 | ++$i; |
||
458 | $modversion['config'][$i]['name'] = 'highlight_color'; |
||
459 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_HIGHLIGHT_COLOR'; |
||
460 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_HIGHLIGHT_COLORDSC'; |
||
461 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
462 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
463 | $modversion['config'][$i]['default'] = '#FFFF80'; |
||
464 | $modversion['config'][$i]['category'] = 'format_options'; |
||
465 | |||
466 | ++$i; |
||
467 | $modversion['config'][$i]['name'] = 'hide_module_name'; |
||
468 | $modversion['config'][$i]['title'] = '_MI_SPARTNER_HIDE_MOD_NAME'; |
||
469 | $modversion['config'][$i]['description'] = '_MI_SPARTNER_HIDE_MOD_NAMEDSC'; |
||
470 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
471 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
472 | $modversion['config'][$i]['default'] = '0'; |
||
473 | $modversion['config'][$i]['category'] = 'format_options'; |
||
474 | |||
475 | // Notification |
||
476 | $modversion['hasNotification'] = 1; |
||
477 | $modversion['notification']['lookup_file'] = 'include/notification.inc.php'; |
||
478 | $modversion['notification']['lookup_func'] = 'smartpartner_notify_iteminfo'; |
||
479 | |||
480 | $modversion['notification']['category'][1]['name'] = 'global_partner'; |
||
481 | $modversion['notification']['category'][1]['title'] = _MI_SPARTNER_PARTNER_NOTIFY; |
||
482 | $modversion['notification']['category'][1]['description'] = _MI_SPARTNER_PARTNER_NOTIFY_DSC; |
||
483 | $modversion['notification']['category'][1]['subscribe_from'] = array('index.php'); |
||
484 | |||
485 | $modversion['notification']['category'][2]['name'] = 'partner'; |
||
486 | $modversion['notification']['category'][2]['title'] = _MI_SPARTNER_PARTNER_NOTIFY; |
||
487 | $modversion['notification']['category'][2]['description'] = _MI_SPARTNER_PARTNER_NOTIFY_DSC; |
||
488 | $modversion['notification']['category'][2]['subscribe_from'] = array('partner.php'); |
||
489 | $modversion['notification']['category'][2]['item_name'] = 'id'; |
||
490 | |||
491 | $modversion['notification']['event'][1]['name'] = 'submitted'; |
||
492 | $modversion['notification']['event'][1]['category'] = 'global_partner'; |
||
493 | $modversion['notification']['event'][1]['admin_only'] = 1; |
||
494 | $modversion['notification']['event'][1]['title'] = _MI_SPARTNER_GLOBAL_PARTNER_SUBMITTED_NOTIFY; |
||
495 | $modversion['notification']['event'][1]['caption'] = _MI_SPARTNER_GLOBAL_PARTNER_SUBMITTED_NOTIFY_CAP; |
||
496 | $modversion['notification']['event'][1]['description'] = _MI_SPARTNER_GLOBAL_PARTNER_SUBMITTED_NOTIFY_DSC; |
||
497 | $modversion['notification']['event'][1]['mail_template'] = 'global_partner_submitted'; |
||
498 | $modversion['notification']['event'][1]['mail_subject'] = _MI_SPARTNER_GLOBAL_PARTNER_SUBMITTED_NOTIFY_SBJ; |
||
499 | |||
500 | $modversion['notification']['event'][2]['name'] = 'approved'; |
||
501 | $modversion['notification']['event'][2]['category'] = 'partner'; |
||
502 | $modversion['notification']['event'][2]['invisible'] = 1; |
||
503 | $modversion['notification']['event'][2]['title'] = _MI_SPARTNER_PARTNER_APPROVED_NOTIFY; |
||
504 | $modversion['notification']['event'][2]['caption'] = _MI_SPARTNER_PARTNER_APPROVED_NOTIFY_CAP; |
||
505 | $modversion['notification']['event'][2]['description'] = _MI_SPARTNER_PARTNER_APPROVED_NOTIFY_DSC; |
||
506 | $modversion['notification']['event'][2]['mail_template'] = 'partner_approved'; |
||
507 | $modversion['notification']['event'][2]['mail_subject'] = _MI_SPARTNER_PARTNER_APPROVED_NOTIFY_SBJ; |
||
508 | |||
509 | $modversion['notification']['event'][3]['name'] = 'new_partner'; |
||
510 | $modversion['notification']['event'][3]['category'] = 'global_partner'; |
||
511 | $modversion['notification']['event'][3]['title'] = _MI_SPARTNER_GLOBAL_PARTNER_NEW_NOTIFY; |
||
512 | $modversion['notification']['event'][3]['caption'] = _MI_SPARTNER_GLOBAL_PARTNER_NEW_NOTIFY_CAP; |
||
513 | $modversion['notification']['event'][3]['description'] = _MI_SPARTNER_GLOBAL_PARTNER_NEW_NOTIFY_DSC; |
||
514 | $modversion['notification']['event'][3]['mail_template'] = 'global_partner_new'; |
||
515 | $modversion['notification']['event'][3]['mail_subject'] = _MI_SPARTNER_GLOBAL_PARTNER_NEW_NOTIFY_SBJ; |
||
516 | |||
517 | $modversion['notification']['event'][4]['name'] = 'new_offer'; |
||
518 | $modversion['notification']['event'][4]['category'] = 'global_partner'; |
||
519 | $modversion['notification']['event'][4]['title'] = _MI_SPARTNER_GLOBAL_OFFER_NEW_NOTIFY; |
||
520 | $modversion['notification']['event'][4]['caption'] = _MI_SPARTNER_GLOBAL_OFFER_NEW_NOTIFY_CAP; |
||
521 | $modversion['notification']['event'][4]['description'] = _MI_SPARTNER_GLOBAL_OFFER_NEW_NOTIFY_DSC; |
||
522 | $modversion['notification']['event'][4]['mail_template'] = 'global_offer_new'; |
||
523 | $modversion['notification']['event'][4]['mail_subject'] = _MI_SPARTNER_GLOBAL_OFFER_NEW_NOTIFY_SBJ; |
||
524 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.