Issues (411)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

xoops_version.php (1 issue)

Labels
Severity
1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * Wfdownloads module
14
 *
15
 * @copyright       XOOPS Project (https://xoops.org)
16
 * @license         GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
17
 * @package         wfdownload
18
 * @since           3.23
19
 * @author          Xoops Development Team
20
 */
21
22
use XoopsModules\Wfdownloads\{Helper
23
};
24
use Xmf\Request;
25
26
/** @var Helper $helper */
27
28
require_once __DIR__ . '/preloads/autoloader.php';
29
30
$helper = Helper::getInstance();
31
32
$moduleDirName      = basename(__DIR__);
33
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
34
35
defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
36
37
$modversion['version']       = 3.30;
38
$modversion['module_status'] = 'Beta 4';
39
$modversion['releasedate']   = '2020-12-06';
40
$modversion['name']          = _MI_WFDOWNLOADS_NAME;
41
$modversion['description']   = _MI_WFDOWNLOADS_DESC;
42
$modversion['author']        = 'XOOPS Development Team';
43
$modversion['credits']       = 'This module was originally based on Mydownloads, and refactored by Catzwolf and the WF-Projects team. Then it became a project of The SmartFactory who continued the excellent work started by the WF-Projects team.';
44
$modversion['help']          = 'page=help';
45
$modversion['license']       = 'GNU GPL 2.0 or later';
46
$modversion['license_url']   = 'https://www.gnu.org/licenses/gpl-2.0.html';
47
$modversion['official']      = false;
48
$modversion['dirname']       = basename(__DIR__);
49
50
require_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php';
51
52
// Path and name of the module’s logo
53
$modversion['image'] = 'assets/images/logoModule.png';
54
55
// Install, update, unistall
56
$modversion['onInstall'] = 'include/oninstall.php';
57
//$modversion['onUpdate']    = 'include/onupdate.php';
58
$modversion['onUninstall'] = 'include/onuninstall.php';
59
60
$modversion['date']                = '2014-11-22';
61
$modversion['release_date']        = '2016/05/22';
62
$modversion['status']              = 'RC5';
63
$modversion['teammembers']         = 'Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff';
64
$modversion['module_website_url']  = 'https://xoops.org/';
65
$modversion['module_website_name'] = 'XOOPS';
66
$modversion['min_php']             = '7.2';
67
$modversion['min_xoops']           = '2.5.10';
68
$modversion['min_admin']           = '1.2';
69
$modversion['min_db']              = ['mysql' => '5.5'];
70
$modversion['modicons16']          = 'assets/images/icons/16';
71
$modversion['modicons32']          = 'assets/images/icons/32';
72
73
// ------------------- Help files ------------------- //
74
$modversion['helpsection'] = [
75
    ['name' => _MI_WFDOWNLOADS_HELP_OVERVIEW, 'link' => 'page=help'],
76
    ['name' => _MI_WFDOWNLOADS_HELP_DISCLAIMER, 'link' => 'page=disclaimer'],
77
    ['name' => _MI_WFDOWNLOADS_HELP_LICENSE, 'link' => 'page=license'],
78
    ['name' => _MI_WFDOWNLOADS_HELP_SUPPORT, 'link' => 'page=support'],
79
    ['name' => _MI_WFDOWNLOADS_HELP_INSTALL, 'link' => 'page=install'],
80
    ['name' => _MI_WFDOWNLOADS_HELP_TIPSTRICKS, 'link' => 'page=tips_tricks'],
81
    ['name' => _MI_WFDOWNLOADS_HELP_IMPORT, 'link' => 'page=help3'],
82
    ['name' => _MI_WFDOWNLOADS_HELP_UPDATE1, 'link' => 'page=help4'],
83
    ['name' => _MI_WFDOWNLOADS_HELP_UPDATE2, 'link' => 'page=help5'],
84
    ['name' => _MI_WFDOWNLOADS_HELP_UPDATE3, 'link' => 'page=help6'],
85
];
86
87
/*
88
* added by Liquid. Based on code by Marcan
89
*/
90
$modversion['author_realname']     = 'The SmartFactory';
91
$modversion['author_website_url']  = 'http://www.smartfactory.ca';
92
$modversion['author_website_name'] = 'The SmartFactory';
93
$modversion['author_email']        = '[email protected]';
94
$modversion['demo_site_url']       = 'http://smartfactory.ca/modules/wfdownloads/';
95
$modversion['demo_site_name']      = 'SmartFactory.ca';
96
$modversion['support_site_url']    = 'http://smartfactory.ca/modules/newbb/viewforum.php?forum=12';
97
$modversion['support_site_name']   = 'SmartFactory.ca';
98
$modversion['submit_bug']          = 'http://dev.xoops.org/modules/xfmod/tracker/?group_id=1289&atid=1325';
99
$modversion['submit_feature']      = 'http://dev.xoops.org/modules/xfmod/tracker/?group_id=1289&atid=1328';
100
101
$modversion['warning']        = _MI_WFDOWNLOADS_WARNINGTEXT;
102
$modversion['author_credits'] = _MI_WFDOWNLOADS_AUTHOR_CREDITSTEXT;
103
104
// Admin things
105
$modversion['hasAdmin']   = true;
106
$modversion['adminindex'] = 'admin/index.php';
107
$modversion['adminmenu']  = 'admin/menu.php';
108
// If you want your module has a sub menu in system menu set it to 1
109
$modversion['system_menu'] = true;
110
111
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
112
// All tables should not have any prefix!
113
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
114
// Tables created by sql file (without prefix!)
115
116
$modversion['tables'] = [
117
    $modversion['dirname'] . '_broken',
118
    $modversion['dirname'] . '_cat',
119
    $modversion['dirname'] . '_downloads',
120
    $modversion['dirname'] . '_mod',
121
    $modversion['dirname'] . '_votedata',
122
    $modversion['dirname'] . '_indexpage',
123
    $modversion['dirname'] . '_reviews',
124
    $modversion['dirname'] . '_mimetypes',
125
    $modversion['dirname'] . '_meta',
126
    $modversion['dirname'] . '_mirrors',
127
    $modversion['dirname'] . '_ip_log',
128
];
129
130
// Search
131
$modversion['hasSearch']      = true;
132
$modversion['search']['file'] = 'include/search.inc.php';
133
$modversion['search']['func'] = $modversion['dirname'] . '_search';
134
135
// Menu
136
$modversion['hasMain']     = true;
137
$modversion['system_menu'] = true;
138
139
global $xoopsModule;
140
// check if submission is allowed
141
$isSubmissionAllowed = false;
142
if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname'] && $xoopsModule->isactive()) {
143
    if (is_object($GLOBALS['xoopsUser'])
144
        && (_WFDOWNLOADS_SUBMISSIONS_DOWNLOAD == $helper->getConfig('submissions')
145
            || _WFDOWNLOADS_SUBMISSIONS_BOTH == $helper->getConfig('submissions'))) {
146
        // if user is a registered user
147
        $groups = $GLOBALS['xoopsUser']->getGroups();
148
        if (count(array_intersect($helper->getConfig('submitarts'), $groups)) > 0) {
0 ignored issues
show
It seems like $helper->getConfig('submitarts') can also be of type null; however, parameter $array1 of array_intersect() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

148
        if (count(array_intersect(/** @scrutinizer ignore-type */ $helper->getConfig('submitarts'), $groups)) > 0) {
Loading history...
149
            $isSubmissionAllowed = true;
150
        }
151
    } else {
152
        // if user is anonymous
153
        if (_WFDOWNLOADS_ANONPOST_DOWNLOAD == $helper->getConfig('anonpost')
154
            || _WFDOWNLOADS_ANONPOST_BOTH == $helper->getConfig('anonpost')) {
155
            $isSubmissionAllowed = true;
156
        }
157
    }
158
}
159
$i = 0;
160
if ($isSubmissionAllowed) {
161
    ++$i;
162
    $modversion['sub'][$i]['name'] = _MI_WFDOWNLOADS_SMNAME1;
163
    $category_suffix               = Request::hasVar('cid', 'GET') ? '?cid=' . Request::getInt('cid', 0, 'GET') : ''; //Added by Lankford on 2008/2/20
164
    $modversion['sub'][$i]['url']  = "submit.php{$category_suffix}";
165
}
166
167
// ------------------- Menu -------------------
168
$modversion['sub'][] = [
169
    'name' => _MI_WFDOWNLOADS_SMNAME2,
170
    'url'  => 'topten.php?list=hit',
171
];
172
$modversion['sub'][] = [
173
    'name' => _MI_WFDOWNLOADS_SMNAME3,
174
    'url'  => 'topten.php?list=rate',
175
];
176
177
// Blocks
178
$i                                       = 0;
179
$modversion['blocks'][$i]['file']        = 'top.php';
180
$modversion['blocks'][$i]['name']        = _MI_WFDOWNLOADS_BNAME1;
181
$modversion['blocks'][$i]['description'] = 'Shows recently added download files';
182
$modversion['blocks'][$i]['show_func']   = $modversion['dirname'] . '_top_show';
183
$modversion['blocks'][$i]['edit_func']   = $modversion['dirname'] . '_top_edit';
184
$modversion['blocks'][$i]['options']     = 'published|10|19';
185
$modversion['blocks'][$i]['template']    = $modversion['dirname'] . '_mb_new.tpl';
186
++$i;
187
$modversion['blocks'][$i]['file']        = 'top.php';
188
$modversion['blocks'][$i]['name']        = _MI_WFDOWNLOADS_BNAME2;
189
$modversion['blocks'][$i]['description'] = 'Shows most downloaded files';
190
$modversion['blocks'][$i]['show_func']   = $modversion['dirname'] . '_top_show';
191
$modversion['blocks'][$i]['edit_func']   = $modversion['dirname'] . '_top_edit';
192
$modversion['blocks'][$i]['options']     = 'hits|10|19';
193
$modversion['blocks'][$i]['template']    = $modversion['dirname'] . '_mb_top.tpl';
194
++$i;
195
$modversion['blocks'][$i]['file']        = 'top_by_cat.php';
196
$modversion['blocks'][$i]['name']        = _MI_WFDOWNLOADS_BNAME3;
197
$modversion['blocks'][$i]['description'] = 'Shows most downloaded files by top categories';
198
$modversion['blocks'][$i]['show_func']   = $modversion['dirname'] . '_top_by_cat_show';
199
$modversion['blocks'][$i]['edit_func']   = $modversion['dirname'] . '_top_by_cat_edit';
200
$modversion['blocks'][$i]['options']     = 'hits|10|19';
201
$modversion['blocks'][$i]['template']    = $modversion['dirname'] . '_mb_top_by_cat.tpl';
202
203
// Comments
204
$modversion['hasComments']             = true;
205
$modversion['comments']['itemName']    = 'lid';
206
$modversion['comments']['pageName']    = 'singlefile.php';
207
$modversion['comments']['extraParams'] = ['cid'];
208
// Comment callback functions
209
$modversion['comments']['callbackFile']        = 'include/comment_functions.php';
210
$modversion['comments']['callback']['approve'] = $modversion['dirname'] . '_com_approve';
211
$modversion['comments']['callback']['update']  = $modversion['dirname'] . '_com_update';
212
213
// Templates
214
$modversion['templates'] = [
215
    ['file' => $moduleDirName . '_' . 'header.tpl', 'description' => 'Header info'],
216
    ['file' => $moduleDirName . '_' . 'footer.tpl', 'description' => 'Footer info'],
217
    ['file' => $moduleDirName . '_' . 'brokenfile.tpl', 'description' => ''],
218
    ['file' => $moduleDirName . '_' . 'download.tpl', 'description' => ''],
219
    ['file' => $moduleDirName . '_' . 'index.tpl', 'description' => ''],
220
    ['file' => $moduleDirName . '_' . 'ratefile.tpl', 'description' => ''],
221
    ['file' => $moduleDirName . '_' . 'singlefile.tpl', 'description' => ''],
222
    ['file' => $moduleDirName . '_' . 'topten.tpl', 'description' => ''],
223
    ['file' => $moduleDirName . '_' . 'viewcat.tpl', 'description' => ''],
224
    ['file' => $moduleDirName . '_' . 'newlistindex.tpl', 'description' => ''],
225
    ['file' => $moduleDirName . '_' . 'reviews.tpl', 'description' => ''],
226
    ['file' => $moduleDirName . '_' . 'mirrors.tpl', 'description' => ''],
227
    ['file' => $moduleDirName . '_' . 'disclaimer.tpl', 'description' => ''],
228
229
    //display templates
230
    ['file' => $moduleDirName . '_' . 'categories_table.tpl', 'description' => '_MI_WFDOWNLOADS_CATEGORIES_TABLE_DSC'],
231
232
    ['file' => $moduleDirName . '_' . 'display_catview.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_CATVIEW_DSC'],
233
    ['file' => $moduleDirName . '_' . 'display_list.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_LIST_DSC'],
234
    ['file' => $moduleDirName . '_' . 'display_summary.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_SUMMARY_DSC'],
235
    ['file' => $moduleDirName . '_' . 'display_full.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_FULL_DSC'],
236
    ['file' => $moduleDirName . '_' . 'display_wfsection.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_WFSECTION_DSC'],
237
    ['file' => $moduleDirName . '_' . 'display_legacy.tpl', 'description' => '_MI_WFDOWNLOADS_DISPLAY_LEGACY_DSC'],
238
239
    // Admin templates
240
    ['file' => $moduleDirName . '_' . 'submit.tpl', 'description' => ''],
241
    ['file' => $moduleDirName . '_' . 'am_categorieslist.tpl', 'type' => 'admin', 'description' => ''],
242
    ['file' => $moduleDirName . '_' . 'am_downloadslist.tpl', 'type' => 'admin', 'description' => ''],
243
    ['file' => $moduleDirName . '_' . 'am_ip_logslist.tpl', 'type' => 'admin', 'description' => ''],
244
    ['file' => $moduleDirName . '_' . 'am_reportsmodificationslist.tpl', 'type' => 'admin', 'description' => ''],
245
    ['file' => $moduleDirName . '_' . 'am_ratingslist.tpl', 'type' => 'admin', 'description' => ''],
246
    ['file' => $moduleDirName . '_' . 'am_reviewslist.tpl', 'type' => 'admin', 'description' => ''],
247
    ['file' => $moduleDirName . '_' . 'am_mirrorslist.tpl', 'type' => 'admin', 'description' => ''],
248
    ['file' => $moduleDirName . '_' . 'am_mimetypeslist.tpl', 'type' => 'admin', 'description' => ''],
249
    ['file' => $moduleDirName . '_' . 'am_permissions.tpl', 'type' => 'admin', 'description' => ''],
250
    // Common templates
251
    ['file' => $moduleDirName . '_' . 'co_breadcrumb.tpl', 'description' => ''],
252
    ['file' => $moduleDirName . '_' . 'co_letterschoice.tpl', 'description' => ''],
253
    ['file' => $moduleDirName . '_' . 'letterschoice.tpl', 'description' => ''],
254
255
    ['file' => $moduleDirName . '_' . 'header0.tpl', 'description' => 'Header info'],
256
    ['file' => $moduleDirName . '_' . 'download0.tpl', 'description' => ''],
257
];
258
// ------------------- Preferences -------------------
259
260
xoops_load('XoopsEditorHandler');
261
$editorHandler          = XoopsEditorHandler::getInstance();
262
$editorList             = array_flip($editorHandler->getList());
263
$modversion['config'][] = [
264
    'name'        => 'editor_options',
265
    'title'       => '_MI_WFDOWNLOADS_EDITOR',
266
    'description' => '_MI_WFDOWNLOADS_EDITORCHOICE',
267
    'formtype'    => 'select',
268
    'valuetype'   => 'text',
269
    'options'     => $editorList,
270
    'default'     => 'dhtmltextarea',
271
];
272
273
$modversion['config'][] = [
274
    'name'        => 'displayicons',
275
    'title'       => '_MI_WFDOWNLOADS_ICONDISPLAY',
276
    'description' => '_MI_WFDOWNLOADS_DISPLAYICONDSC',
277
    'formtype'    => 'select',
278
    'valuetype'   => 'int',
279
    'options'     => [
280
        '_MI_WFDOWNLOADS_DISPLAYICON1' => _WFDOWNLOADS_DISPLAYICONS_ICON,
281
        '_MI_WFDOWNLOADS_DISPLAYICON2' => _WFDOWNLOADS_DISPLAYICONS_TEXT,
282
        '_MI_WFDOWNLOADS_DISPLAYICON3' => _WFDOWNLOADS_DISPLAYICONS_NO,
283
    ],
284
    'default'     => _WFDOWNLOADS_DISPLAYICONS_ICON,
285
];
286
287
$modversion['config'][] = [
288
    'name'        => 'popular',
289
    'title'       => '_MI_WFDOWNLOADS_POPULAR',
290
    'description' => '_MI_WFDOWNLOADS_POPULARDSC',
291
    'formtype'    => 'select',
292
    'valuetype'   => 'int',
293
    'options'     => ['5' => 5, '10' => 10, '50' => 50, '100' => 100, '200' => 200, '500' => 500, '1000' => 1000],
294
    'default'     => 100,
295
];
296
297
$modversion['config'][] = [
298
    'name'        => 'daysnew',
299
    'title'       => '_MI_WFDOWNLOADS_DAYSNEW',
300
    'description' => '_MI_WFDOWNLOADS_DAYSNEWDSC',
301
    'formtype'    => 'textbox',
302
    'valuetype'   => 'int',
303
    'default'     => 10,
304
];
305
306
$modversion['config'][] = [
307
    'name'        => 'daysupdated',
308
    'title'       => '_MI_WFDOWNLOADS_DAYSUPDATED',
309
    'description' => '_MI_WFDOWNLOADS_DAYSUPDATEDDSC',
310
    'formtype'    => 'textbox',
311
    'valuetype'   => 'int',
312
    'default'     => 10,
313
];
314
315
$modversion['config'][] = [
316
    'name'        => 'perpage',
317
    'title'       => '_MI_WFDOWNLOADS_PERPAGE',
318
    'description' => '_MI_WFDOWNLOADS_PERPAGEDSC',
319
    'formtype'    => 'select',
320
    'valuetype'   => 'int',
321
    'options'     => ['5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50],
322
    'default'     => 10,
323
];
324
325
$modversion['config'][] = [
326
    'name'        => 'admin_perpage',
327
    'title'       => '_MI_WFDOWNLOADS_ADMINPAGE',
328
    'description' => '_MI_WFDOWNLOADS_ADMINPAGEDESC',
329
    'formtype'    => 'select',
330
    'valuetype'   => 'int',
331
    'options'     => ['5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50],
332
    'default'     => 10,
333
];
334
335
$modversion['config'][] = [
336
    'name'        => 'dateformat',
337
    'title'       => '_MI_WFDOWNLOADS_DATEFORMAT',
338
    'description' => '_MI_WFDOWNLOADS_DATEFORMATDSC',
339
    'formtype'    => 'textbox',
340
    'valuetype'   => 'text',
341
    'default'     => _DATESTRING,
342
]; //'D, d-M-Y');
343
344
// Category View Display (Publisher)
345
$modversion['config'][] = [
346
    'name'        => 'displaycategory_configs',
347
    'title'       => '_MI_WFDOWNLOADS_DISPLAY_CONFIGS',
348
    'description' => '_MI_WFDOWNLOADS_DISPLAY_CONFIGS',
349
    'formtype'    => 'line_break',
350
    'valuetype'   => 'textbox',
351
    'default'     => 'odd',
352
];
353
354
$modversion['config'][] = [
355
    'name'        => 'idxcat_items_display_type',
356
    'title'       => '_MI_WFDOWNLOADS_DISTYPE',
357
    'description' => '_MI_WFDOWNLOADS_DISTYPE_DSC',
358
    'formtype'    => 'select',
359
    'valuetype'   => 'text',
360
    'options'     => [
361
        _MI_WFDOWNLOADS_DISPLAYTYPE_CATVIEW   => 'catview',
362
        _MI_WFDOWNLOADS_DISPLAYTYPE_SUMMARY   => 'summary',
363
        _MI_WFDOWNLOADS_DISPLAYTYPE_FULL      => 'full',
364
        _MI_WFDOWNLOADS_DISPLAYTYPE_LIST      => 'list',
365
        _MI_WFDOWNLOADS_DISPLAYTYPE_WFSECTION => 'wfsection',
366
        _MI_WFDOWNLOADS_DISPLAYTYPE_LEGACY    => 'legacy',
367
    ],
368
    'default'     => 'catview',
369
    'category'    => 'indexcat',
370
];
371
372
$modversion['config'][] = [
373
    'name'        => 'showAlphabet',
374
    'title'       => '_MI_WFDOWNLOADS_ALPHABET_SHOW',
375
    'description' => '_MI_WFDOWNLOADS_ALPHABET_SHOW_DESC',
376
    'formtype'    => 'yesno',
377
    'valuetype'   => 'int',
378
    'default'     => false,
379
];
380
381
$modversion['config'][] = [
382
    'name'        => 'showNewArrivals',
383
    'title'       => '_MI_WFDOWNLOADS_NEW_ITEMS',
384
    'description' => '_MI_WFDOWNLOADS_NEW_ITEMS_DESC',
385
    'formtype'    => 'yesno',
386
    'valuetype'   => 'int',
387
    'default'     => false,
388
];
389
390
// Upload configs
391
$modversion['config'][] = [
392
    'name'        => 'upload_configs',
393
    'title'       => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
394
    'description' => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
395
    'formtype'    => 'line_break',
396
    'valuetype'   => 'textbox',
397
    'default'     => 'odd',
398
];
399
400
$modversion['config'][] = [
401
    'name'        => 'submissions',
402
    'title'       => '_MI_WFDOWNLOADS_ALLOWSUBMISS',
403
    'description' => '_MI_WFDOWNLOADS_ALLOWSUBMISSDSC',
404
    'formtype'    => 'select',
405
    'valuetype'   => 'int',
406
    'options'     => [
407
        '_MI_WFDOWNLOADS_ALLOWSUBMISS1' => _WFDOWNLOADS_SUBMISSIONS_NONE,
408
        '_MI_WFDOWNLOADS_ALLOWSUBMISS2' => _WFDOWNLOADS_SUBMISSIONS_DOWNLOAD,
409
        '_MI_WFDOWNLOADS_ALLOWSUBMISS3' => _WFDOWNLOADS_SUBMISSIONS_MIRROR,
410
        '_MI_WFDOWNLOADS_ALLOWSUBMISS4' => _WFDOWNLOADS_SUBMISSIONS_BOTH,
411
    ],
412
    'default'     => _WFDOWNLOADS_SUBMISSIONS_NONE,
413
];
414
415
$modversion['config'][] = [
416
    'name'        => 'anonpost',
417
    'title'       => '_MI_WFDOWNLOADS_ANONPOST',
418
    'description' => '_MI_WFDOWNLOADS_ANONPOSTDSC',
419
    'formtype'    => 'select',
420
    'valuetype'   => 'int',
421
    'options'     => [
422
        '_MI_WFDOWNLOADS_ANONPOST1' => _WFDOWNLOADS_ANONPOST_NONE,
423
        '_MI_WFDOWNLOADS_ANONPOST2' => _WFDOWNLOADS_ANONPOST_DOWNLOAD,
424
        '_MI_WFDOWNLOADS_ANONPOST3' => _WFDOWNLOADS_ANONPOST_MIRROR,
425
        '_MI_WFDOWNLOADS_ANONPOST4' => _WFDOWNLOADS_ANONPOST_BOTH,
426
    ],
427
    'default'     => _WFDOWNLOADS_ANONPOST_NONE,
428
];
429
430
$modversion['config'][] = [
431
    'name'        => 'autoapprove',
432
    'title'       => '_MI_WFDOWNLOADS_AUTOAPPROVE',
433
    'description' => '_MI_WFDOWNLOADS_AUTOAPPROVEDSC',
434
    'formtype'    => 'select',
435
    'valuetype'   => 'int',
436
    'options'     => [
437
        '_MI_WFDOWNLOADS_AUTOAPPROVE1' => _WFDOWNLOADS_AUTOAPPROVE_NONE,
438
        '_MI_WFDOWNLOADS_AUTOAPPROVE2' => _WFDOWNLOADS_AUTOAPPROVE_DOWNLOAD,
439
        '_MI_WFDOWNLOADS_AUTOAPPROVE3' => _WFDOWNLOADS_AUTOAPPROVE_MIRROR,
440
        '_MI_WFDOWNLOADS_AUTOAPPROVE4' => _WFDOWNLOADS_AUTOAPPROVE_BOTH,
441
    ],
442
    'default'     => _WFDOWNLOADS_AUTOAPPROVE_NONE,
443
];
444
445
$modversion['config'][] = [
446
    'name'        => 'submitarts',
447
    'title'       => '_MI_WFDOWNLOADS_SUBMITART',
448
    'description' => '_MI_WFDOWNLOADS_SUBMITARTDSC',
449
    'formtype'    => 'group_multi',
450
    'valuetype'   => 'array',
451
    'default'     => '1',
452
];
453
454
$modversion['config'][] = [
455
    'name'        => 'useruploads',
456
    'title'       => '_MI_WFDOWNLOADS_ALLOWUPLOADS',
457
    'description' => '_MI_WFDOWNLOADS_ALLOWUPLOADSDSC',
458
    'formtype'    => 'yesno',
459
    'valuetype'   => 'int',
460
    'default'     => false,
461
];
462
463
$modversion['config'][] = [
464
    'name'        => 'useruploadsgroup',
465
    'title'       => '_MI_WFDOWNLOADS_ALLOWUPLOADSGROUP',
466
    'description' => '_MI_WFDOWNLOADS_ALLOWUPLOADSGROUPDSC',
467
    'formtype'    => 'group_multi',
468
    'valuetype'   => 'array',
469
    'default'     => '1',
470
];
471
472
$modversion['config'][] = [
473
    'name'        => 'upload_minposts',
474
    'title'       => '_MI_WFDOWNLOADS_UPLOADMINPOSTS',
475
    'description' => '_MI_WFDOWNLOADS_UPLOADMINPOSTSDSC',
476
    'formtype'    => 'textbox',
477
    'valuetype'   => 'int',
478
    'default'     => 0,
479
];
480
481
$modversion['config'][] = [
482
    'name'        => 'showdisclaimer',
483
    'title'       => '_MI_WFDOWNLOADS_SHOWDISCLAIMER',
484
    'description' => '_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC',
485
    'formtype'    => 'yesno',
486
    'valuetype'   => 'int',
487
    'default'     => false,
488
];
489
490
$modversion['config'][] = [
491
    'name'        => 'disclaimer',
492
    'title'       => '_MI_WFDOWNLOADS_DISCLAIMER',
493
    'description' => '_MI_WFDOWNLOADS_DISCLAIMERDSC',
494
    'formtype'    => 'textarea',
495
    'valuetype'   => 'text',
496
    'default'     => _MI_WFDOWNLOADS_DISCLAIMER_DEFAULT,
497
];
498
499
// Download configs
500
$modversion['config'][] = [
501
    'name'        => 'download_configs',
502
    'title'       => '_MI_WFDOWNLOADS_DOWNLOAD_CONFIGS',
503
    'description' => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
504
    'formtype'    => 'line_break',
505
    'valuetype'   => 'textbox',
506
    'default'     => 'odd',
507
];
508
509
$modversion['config'][] = [
510
    'name'        => 'download_minposts',
511
    'title'       => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',
512
    'description' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTSDSC',
513
    'formtype'    => 'textbox',
514
    'valuetype'   => 'int',
515
    'default'     => 0,
516
];
517
518
$modversion['config'][] = [
519
    'name'        => 'showDowndisclaimer',
520
    'title'       => '_MI_WFDOWNLOADS_SHOWDOWNDISCL',
521
    'description' => '_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC',
522
    'formtype'    => 'yesno',
523
    'valuetype'   => 'int',
524
    'default'     => false,
525
];
526
527
$modversion['config'][] = [
528
    'name'        => 'downdisclaimer',
529
    'title'       => '_MI_WFDOWNLOADS_DOWNDISCLAIMER',
530
    'description' => '_MI_WFDOWNLOADS_DOWNDISCLAIMERDSC',
531
    'formtype'    => 'textarea',
532
    'valuetype'   => 'text',
533
    'default'     => _MI_WFDOWNLOADS_DOWNDISCLAIMER_DEFAULT,
534
];
535
536
// Images/screenshots/thumbs configs
537
$modversion['config'][] = [
538
    'name'        => 'images_configs',
539
    'title'       => '_MI_WFDOWNLOADS_IMAGES_CONFIGS',
540
    'description' => '_MI_WFDOWNLOADS_IMAGES_CONFIGSDSC',
541
    'formtype'    => 'line_break',
542
    'valuetype'   => 'textbox',
543
    'default'     => 'odd',
544
];
545
546
$modversion['config'][] = [
547
    'name'        => 'screenshot',
548
    'title'       => '_MI_WFDOWNLOADS_USESHOTS',
549
    'description' => '_MI_WFDOWNLOADS_USESHOTSDSC',
550
    'formtype'    => 'yesno',
551
    'valuetype'   => 'int',
552
    'default'     => true,
553
];
554
555
$modversion['config'][] = [
556
    'name'        => 'screenshots',
557
    'title'       => '_MI_WFDOWNLOADS_SCREENSHOTS',
558
    'description' => '_MI_WFDOWNLOADS_SCREENSHOTSDSC',
559
    'formtype'    => 'textbox',
560
    'valuetype'   => 'text',
561
    'default'     => 'uploads/' . $modversion['dirname'] . '/images/screenshots',
562
];
563
564
$modversion['config'][] = [
565
    'name'        => 'max_screenshot',
566
    'title'       => '_MI_WFDOWNLOADS_MAXSHOTS',
567
    'description' => '_MI_WFDOWNLOADS_MAXSHOTSDSC',
568
    'formtype'    => 'select',
569
    'valuetype'   => 'int',
570
    'options'     => ['1' => 1, '2' => 2, '3' => 3, '4' => 4],
571
    'default'     => 4,
572
];
573
574
$modversion['config'][] = [
575
    'name'        => 'catimage',
576
    'title'       => '_MI_WFDOWNLOADS_CATEGORYIMG',
577
    'description' => '_MI_WFDOWNLOADS_CATEGORYIMGDSC',
578
    'formtype'    => 'textbox',
579
    'valuetype'   => 'text',
580
    'default'     => 'uploads/' . $modversion['dirname'] . '/images/category',
581
];
582
583
$modversion['config'][] = [
584
    'name'        => 'cat_imgwidth',
585
    'title'       => '_MI_WFDOWNLOADS_CAT_IMGWIDTH',
586
    'description' => '_MI_WFDOWNLOADS_CAT_IMGWIDTHDSC',
587
    'formtype'    => 'textbox',
588
    'valuetype'   => 'int',
589
    'default'     => 64,
590
]; // =1024/16
591
592
$modversion['config'][] = [
593
    'name'        => 'cat_imgheight',
594
    'title'       => '_MI_WFDOWNLOADS_CAT_IMGHEIGHT',
595
    'description' => '_MI_WFDOWNLOADS_CAT_IMGHEIGHTDSC',
596
    'formtype'    => 'textbox',
597
    'valuetype'   => 'int',
598
    'default'     => 48,
599
]; // =768/16
600
601
$modversion['config'][] = [
602
    'name'        => 'mainimagedir',
603
    'title'       => '_MI_WFDOWNLOADS_MAINIMGDIR',
604
    'description' => '_MI_WFDOWNLOADS_MAINIMGDIRDSC',
605
    'formtype'    => 'textbox',
606
    'valuetype'   => 'text',
607
    'default'     => 'uploads/' . $modversion['dirname'] . '/images',
608
];
609
610
$modversion['config'][] = [
611
    'name'        => 'usethumbs',
612
    'title'       => '_MI_WFDOWNLOADS_USETHUMBS',
613
    'description' => '_MI_WFDOWNLOADS_USETHUMBSDSC',
614
    'formtype'    => 'yesno',
615
    'valuetype'   => 'int',
616
    'default'     => true,
617
];
618
619
$modversion['config'][] = [
620
    'name'        => 'shotwidth',
621
    'title'       => '_MI_WFDOWNLOADS_SHOTWIDTH',
622
    'description' => '_MI_WFDOWNLOADS_SHOTWIDTHDSC',
623
    'formtype'    => 'textbox',
624
    'valuetype'   => 'int',
625
    'default'     => 64,
626
]; // =1024/16
627
628
$modversion['config'][] = [
629
    'name'        => 'shotheight',
630
    'title'       => '_MI_WFDOWNLOADS_SHOTHEIGHT',
631
    'description' => '_MI_WFDOWNLOADS_SHOTHEIGHTDSC',
632
    'formtype'    => 'textbox',
633
    'valuetype'   => 'int',
634
    'default'     => 48,
635
]; // =768/16
636
637
$modversion['config'][] = [
638
    'name'        => 'keepaspect',
639
    'title'       => '_MI_WFDOWNLOADS_KEEPASPECT',
640
    'description' => '_MI_WFDOWNLOADS_KEEPASPECTDSC',
641
    'formtype'    => 'yesno',
642
    'valuetype'   => 'int',
643
    'default'     => true,
644
];
645
646
$modversion['config'][] = [
647
    'name'        => 'imagequality',
648
    'title'       => '_MI_WFDOWNLOADS_QUALITY',
649
    'description' => '_MI_WFDOWNLOADS_QUALITYDSC',
650
    'formtype'    => 'textbox',
651
    'valuetype'   => 'int',
652
    'default'     => 100,
653
];
654
655
$modversion['config'][] = [
656
    'name'        => 'updatethumbs',
657
    'title'       => '_MI_WFDOWNLOADS_IMGUPDATE',
658
    'description' => '_MI_WFDOWNLOADS_IMGUPDATEDSC',
659
    'formtype'    => 'yesno',
660
    'valuetype'   => 'int',
661
    'default'     => true,
662
];
663
664
// Files configs
665
$modversion['config'][] = [
666
    'name'        => 'filesuploads_configs',
667
    'title'       => '_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGS',
668
    'description' => '_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGSDSC',
669
    'formtype'    => 'line_break',
670
    'valuetype'   => 'textbox',
671
    'default'     => 'odd',
672
];
673
674
$modversion['config'][] = [
675
    'name'        => 'maxfilesize',
676
    'title'       => '_MI_WFDOWNLOADS_MAXFILESIZE',
677
    'description' => '_MI_WFDOWNLOADS_MAXFILESIZEDSC',
678
    'formtype'    => 'textbox',
679
    'valuetype'   => 'int',
680
    'default'     => 2097152,
681
]; // 2MB
682
683
$modversion['config'][] = [
684
    'name'        => 'uploaddir',
685
    'title'       => '_MI_WFDOWNLOADS_UPLOADDIR',
686
    'description' => '_MI_WFDOWNLOADS_UPLOADDIRDSC',
687
    'formtype'    => 'textbox',
688
    'valuetype'   => 'text',
689
    'default'     => XOOPS_ROOT_PATH . '/uploads/' . $modversion['dirname'],
690
];
691
692
$modversion['config'][] = [
693
    'name'        => 'maximgwidth',
694
    'title'       => '_MI_WFDOWNLOADS_IMGWIDTH',
695
    'description' => '_MI_WFDOWNLOADS_IMGWIDTHDSC',
696
    'formtype'    => 'textbox',
697
    'valuetype'   => 'int',
698
    'default'     => 1024,
699
];
700
701
$modversion['config'][] = [
702
    'name'        => 'maximgheight',
703
    'title'       => '_MI_WFDOWNLOADS_IMGHEIGHT',
704
    'description' => '_MI_WFDOWNLOADS_IMGHEIGHTDSC',
705
    'formtype'    => 'textbox',
706
    'valuetype'   => 'int',
707
    'default'     => 768,
708
];
709
710
$modversion['config'][] = [
711
    'name'        => 'batchdir',
712
    'title'       => '_MI_WFDOWNLOADS_BATCHDIR',
713
    'description' => '_MI_WFDOWNLOADS_BATCHDIRDSC',
714
    'formtype'    => 'textbox',
715
    'valuetype'   => 'text',
716
    'default'     => XOOPS_ROOT_PATH . '/uploads/' . $modversion['dirname'] . '/batch',
717
];
718
719
// extra systems configs
720
$modversion['config'][] = [
721
    'name'        => 'extrasystems_configs',
722
    'title'       => '_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMS',
723
    'description' => '_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMSDSC',
724
    'formtype'    => 'line_break',
725
    'valuetype'   => 'textbox',
726
    'default'     => 'odd',
727
];
728
729
$modversion['config'][] = [
730
    'name'        => 'enable_reviews',
731
    'title'       => '_MI_WFDOWNLOADS_REVIEW_ENABLE',
732
    'description' => '_MI_WFDOWNLOADS_REVIEW_ENABLEDSC',
733
    'formtype'    => 'yesno',
734
    'valuetype'   => 'int',
735
    'default'     => true,
736
];
737
738
$modversion['config'][] = [
739
    'name'        => 'rev_anonpost',
740
    'title'       => '_MI_WFDOWNLOADS_REVIEWANONPOST',
741
    'description' => '_MI_WFDOWNLOADS_REVIEWANONPOSTDSC',
742
    'formtype'    => 'yesno',
743
    'valuetype'   => 'int',
744
    'default'     => false,
745
];
746
747
$modversion['config'][] = [
748
    'name'        => 'rev_approve',
749
    'title'       => '_MI_WFDOWNLOADS_REVIEWAPPROVE',
750
    'description' => '_MI_WFDOWNLOADS_REVIEWAPPROVEDSC',
751
    'formtype'    => 'yesno',
752
    'valuetype'   => 'int',
753
    'default'     => false,
754
];
755
756
$modversion['config'][] = [
757
    'name'        => 'enable_ratings',
758
    'title'       => '_MI_WFDOWNLOADS_RATING_ENABLE',
759
    'description' => '_MI_WFDOWNLOADS_RATING_ENABLEDSC',
760
    'formtype'    => 'yesno',
761
    'valuetype'   => 'int',
762
    'default'     => true,
763
];
764
765
$modversion['config'][] = [
766
    'name'        => 'enable_brokenreports',
767
    'title'       => '_MI_WFDOWNLOADS_BROKENREPORT_ENABLE',
768
    'description' => '_MI_WFDOWNLOADS_BROKENREPORT_ENABLEDSC',
769
    'formtype'    => 'yesno',
770
    'valuetype'   => 'int',
771
    'default'     => true,
772
];
773
774
$modversion['config'][] = [
775
    'name'        => 'enablerss',
776
    'title'       => '_MI_WFDOWNLOADS_ENABLERSS',
777
    'description' => '_MI_WFDOWNLOADS_ENABLERSSDSC',
778
    'formtype'    => 'yesno',
779
    'valuetype'   => 'int',
780
    'default'     => false,
781
];
782
783
$modversion['config'][] = [
784
    'name'        => 'enable_mirrors',
785
    'title'       => '_MI_WFDOWNLOADS_MIRROR_ENABLE',
786
    'description' => '_MI_WFDOWNLOADS_MIRROR_ENABLEDSC',
787
    'formtype'    => 'yesno',
788
    'valuetype'   => 'int',
789
    'default'     => true,
790
];
791
792
$modversion['config'][] = [
793
    'name'        => 'enable_onlinechk',
794
    'title'       => '_MI_WFDOWNLOADS_MIRROR_ENABLEONCHK',
795
    'description' => '_MI_WFDOWNLOADS_MIRROR_ENABLEONCHKDSC',
796
    'formtype'    => 'yesno',
797
    'valuetype'   => 'int',
798
    'default'     => true,
799
];
800
801
$modversion['config'][] = [
802
    'name'        => 'copyright',
803
    'title'       => '_MI_WFDOWNLOADS_COPYRIGHT',
804
    'description' => '_MI_WFDOWNLOADS_COPYRIGHTDSC',
805
    'formtype'    => 'yesno',
806
    'valuetype'   => 'int',
807
    'default'     => true,
808
];
809
810
// Various configs
811
$modversion['config'][] = [
812
    'name'        => 'various_configs',
813
    'title'       => '_MI_WFDOWNLOADS_VARIOUS_CONFIGS',
814
    'description' => '_MI_WFDOWNLOADS_VARIOUS_CONFIGSDSC',
815
    'formtype'    => 'line_break',
816
    'valuetype'   => 'textbox',
817
    'default'     => 'odd',
818
];
819
820
$modversion['config'][] = [
821
    'name'        => 'check_host',
822
    'title'       => '_MI_WFDOWNLOADS_CHECKHOST',
823
    'description' => '_MI_WFDOWNLOADS_CHECKHOSTDSC',
824
    'formtype'    => 'yesno',
825
    'valuetype'   => 'int',
826
    'default'     => false,
827
];
828
829
$modversion['config'][] = [
830
    'name'        => 'referers',
831
    'title'       => '_MI_WFDOWNLOADS_REFERERS',
832
    'description' => '_MI_WFDOWNLOADS_REFERERSDSC',
833
    'formtype'    => 'textarea',
834
    'valuetype'   => 'array',
835
];
836
837
$modversion['config'][] = [
838
    'name'        => 'subcats',
839
    'title'       => '_MI_WFDOWNLOADS_SUBCATS',
840
    'description' => '_MI_WFDOWNLOADS_SUBCATSDSC',
841
    'formtype'    => 'yesno',
842
    'valuetype'   => 'int',
843
    'default'     => false,
844
];
845
846
$modversion['config'][] = [
847
    'name'        => 'subcatssortby',
848
    'title'       => '_MI_WFDOWNLOADS_SUBCATSSORTBY',
849
    'description' => '_MI_WFDOWNLOADS_SUBCATSSORTBYDSC',
850
    'formtype'    => 'select',
851
    'valuetype'   => 'text',
852
    'options'     => [
853
        '_MI_WFDOWNLOADS_SUBCATSSORTBYCID'    => 'cid',
854
        '_MI_WFDOWNLOADS_SUBCATSSORTBYTITLE'  => 'title',
855
        '_MI_WFDOWNLOADS_SUBCATSSORTBYWEIGHT' => 'weight',
856
    ],
857
    'default'     => 'weight',
858
];
859
860
$qa                     = ' (A)';
861
$qd                     = ' (D)';
862
$modversion['config'][] = [
863
    'name'        => 'filexorder',
864
    'title'       => '_MI_WFDOWNLOADS_ARTICLESSORT',
865
    'description' => '_MI_WFDOWNLOADS_ARTICLESSORTDSC',
866
    'formtype'    => 'select',
867
    'valuetype'   => 'text',
868
    'options'     => [
869
        _MI_WFDOWNLOADS_TITLE . $qa      => 'title ASC',
870
        _MI_WFDOWNLOADS_TITLE . $qd      => 'title DESC',
871
        _MI_WFDOWNLOADS_SUBMITTED2 . $qa => 'published ASC',
872
        _MI_WFDOWNLOADS_SUBMITTED2 . $qd => 'published DESC',
873
        _MI_WFDOWNLOADS_RATING . $qa     => 'rating ASC',
874
        _MI_WFDOWNLOADS_RATING . $qd     => 'rating DESC',
875
        _MI_WFDOWNLOADS_POPULARITY . $qa => 'hits ASC',
876
        _MI_WFDOWNLOADS_POPULARITY . $qd => 'hits DESC',
877
    ],
878
    'default'     => 'title ASC',
879
];
880
881
$modversion['config'][] = [
882
    'name'        => 'autosummary',
883
    'title'       => '_MI_WFDOWNLOADS_AUTOSUMMARY',
884
    'description' => '_MI_WFDOWNLOADS_AUTOSUMMARYDESC',
885
    'formtype'    => 'select',
886
    'valuetype'   => 'int',
887
    'options'     => [
888
        '_MI_WFDOWNLOADS_AUTOSUMMARY1' => _WFDOWNLOADS_AUTOSUMMARY_NO,
889
        '_MI_WFDOWNLOADS_AUTOSUMMARY2' => _WFDOWNLOADS_AUTOSUMMARY_IFBLANK,
890
        '_MI_WFDOWNLOADS_AUTOSUMMARY3' => _WFDOWNLOADS_AUTOSUMMARY_YES,
891
    ],
892
    'default'     => _WFDOWNLOADS_AUTOSUMMARY_NO,
893
];
894
895
$modversion['config'][] = [
896
    'name'        => 'autosumlength',
897
    'title'       => '_MI_WFDOWNLOADS_AUTOSUMMARYLENGTH',
898
    'description' => '_MI_WFDOWNLOADS_AUTOSUMMARYLENGTHDESC',
899
    'formtype'    => 'textbox',
900
    'valuetype'   => 'int',
901
    'default'     => 200,
902
];
903
904
$modversion['config'][] = [
905
    'name'        => 'autosumplaintext',
906
    'title'       => '_MI_WFDOWNLOADS_AUTOSUMMARYPLAINTEXT',
907
    'description' => '_MI_WFDOWNLOADS_AUTOSUMMARYPLAINTEXTDESC',
908
    'formtype'    => 'yesno',
909
    'valuetype'   => 'int',
910
    'default'     => true,
911
];
912
913
$modversion['config'][] = [
914
    'name'        => 'platform',
915
    'title'       => '_MI_WFDOWNLOADS_PLATFORM',
916
    'description' => '_MI_WFDOWNLOADS_PLATFORMDSC',
917
    'formtype'    => 'textarea',
918
    'valuetype'   => 'array',
919
    'default'     => 'None|Windows|Unix|Mac|XOOPS 2.5.5|XOOPS 2.5.6|XOOPS 2.5.7|XOOPS 2.5.8|XOOPS 2.5.9|XOOPS 2.5.10|XOOPS 2.5.11|XOOPS 2.6.0|Other',
920
];
921
922
$license   = [];
923
$license[] = 'None';
924
$license[] = 'Apache License (v. 1.1) ';
925
$license[] = 'Apple Public Source License (v. 2.0)';
926
$license[] = 'Berkeley Database License ';
927
$license[] = 'BSD License (Original)';
928
$license[] = 'Common Public License';
929
$license[] = 'FreeBSD Copyright (Modifizierte BSD-Lizenz) ';
930
$license[] = 'GNU Emacs General Public License';
931
$license[] = 'GNU Free Documentation License (FDL) (v. 1.2)';
932
$license[] = 'GNU General Public License (GPL) (v. 1.0)';
933
$license[] = 'GNU General Public License (GPL) (v. 2.0)';
934
$license[] = 'GNU General Public License (GPL) (v. 3.0)';
935
$license[] = 'GNU Lesser General Public License (LGPL) (v. 2.1)';
936
$license[] = 'GNU Library General Public License (LGPL) (v. 2.0)';
937
$license[] = 'Microsoft Shared Source License';
938
$license[] = 'MIT License';
939
$license[] = 'Mozilla Public License (v. 1.1)';
940
$license[] = 'Open Software License (OSL) (v. 1.0)';
941
$license[] = 'Open Software License (OSL) (v. 1.1)';
942
$license[] = 'Open Software License (OSL) (v. 2.0)';
943
$license[] = 'Open Public License';
944
$license[] = 'Open RTLinux Patent License (v. 1.0)';
945
$license[] = 'PHP License (v. 3.0)';
946
$license[] = 'W3C Software Notice and License';
947
$license[] = 'Wide Open License (WOL)';
948
$license[] = 'X.Net License';
949
$license[] = 'X Window System License';
950
951
$modversion['config'][] = [
952
    'name'        => 'license',
953
    'title'       => '_MI_WFDOWNLOADS_LICENSE',
954
    'description' => '_MI_WFDOWNLOADS_LICENSEDSC',
955
    'formtype'    => 'textarea',
956
    'valuetype'   => 'array',
957
    'default'     => $license,
958
];
959
960
$modversion['config'][] = [
961
    'name'        => 'limitations',
962
    'title'       => '_MI_WFDOWNLOADS_LIMITS',
963
    'description' => '_MI_WFDOWNLOADS_LIMITSDSC',
964
    'formtype'    => 'textarea',
965
    'valuetype'   => 'array',
966
    'default'     => 'None|Trial|14 day limitation|None Save',
967
];
968
969
$modversion['config'][] = [
970
    'name'        => 'versiontypes',
971
    'title'       => '_MI_WFDOWNLOADS_VERSIONTYPES',
972
    'description' => '_MI_WFDOWNLOADS_VERSIONTYPESDSC',
973
    'formtype'    => 'textarea',
974
    'valuetype'   => 'array',
975
    'default'     => 'None|Alpha|Beta|RC|Final',
976
];
977
978
$modversion['config'][] = [
979
    'name'        => 'shortTitles',
980
    'title'       => '_MI_WFDOWNLOADS_SHORTTITLES',
981
    'description' => '_MI_WFDOWNLOADS_SHORTTITLES_DESC',
982
    'formtype'    => 'yesno',
983
    'valuetype'   => 'int',
984
    'default'     => 0,
985
];
986
987
/*
988
// Swish-e support EXPERIMENTAL
989
// Swish-e configs
990
$modversion['config'][] = array(
991
    'name'        => 'swishe_configs',
992
    'title'       => '_MI_WFDOWNLOADS_SWISHE_CONFIGS',
993
    'description' => '_MI_WFDOWNLOADS_SWISHE_CONFIGSDSC',
994
    'formtype'    => 'line_break',
995
    'valuetype'   => 'textbox',
996
    'default'     => 'odd'
997
);
998
999
$modversion['config'][] = array(
1000
    'name'        => 'enable_swishe',
1001
    'title'       => '_MI_WFDOWNLOADS_SWISHE_ENABLE',
1002
    'description' => '_MI_WFDOWNLOADS_SWISHE_ENABLEDSC',
1003
    'formtype'    => 'yesno',
1004
    'valuetype'   => 'int',
1005
    'default'     => false
1006
);
1007
1008
$modversion['config'][] = array(
1009
    'name'        => 'swishe_exe_path',
1010
    'title'       => '_MI_WFDOWNLOADS_SWISHE_EXEPATH',
1011
    'description' => '_MI_WFDOWNLOADS_SWISHE_EXEPATHDSC',
1012
    'formtype'    => 'textbox',
1013
    'valuetype'   => 'text',
1014
    'default'     => XOOPS_ROOT_PATH . '/uploads/' . $modversion['dirname'] . '/swishe'
1015
);
1016
1017
$modversion['config'][] = array(
1018
    'name'        => 'swishe_search_limit',
1019
    'title'       => '_MI_WFDOWNLOADS_SWISHE_SEARCHLIMIT',
1020
    'description' => '_MI_WFDOWNLOADS_SWISHE_SEARCHLIMITDSC',
1021
    'formtype'    => 'textbox',
1022
    'valuetype'   => 'int',
1023
    'default'     => 0
1024
);
1025
// Swish-e support EXPERIMENTAL
1026
*/
1027
1028
/**
1029
 * Make Sample button visible?
1030
 */
1031
$modversion['config'][] = [
1032
    'name'        => 'displaySampleButton',
1033
    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
1034
    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
1035
    'formtype'    => 'yesno',
1036
    'valuetype'   => 'int',
1037
    'default'     => 1,
1038
];
1039
1040
/**
1041
 * Show Developer Tools?
1042
 */
1043
$modversion['config'][] = [
1044
    'name'        => 'displayDeveloperTools',
1045
    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS',
1046
    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC',
1047
    'formtype'    => 'yesno',
1048
    'valuetype'   => 'int',
1049
    'default'     => 0,
1050
];
1051
1052
// ------------------- Notifications -------------------
1053
$modversion['hasNotification']             = true;
1054
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
1055
$modversion['notification']['lookup_func'] = $modversion['dirname'] . '_notify_iteminfo';
1056
1057
$i                                                            = 0;
1058
$modversion['notification']['category'][$i]['name']           = 'global';
1059
$modversion['notification']['category'][$i]['title']          = _MI_WFDOWNLOADS_GLOBAL_NOTIFY;
1060
$modversion['notification']['category'][$i]['description']    = _MI_WFDOWNLOADS_GLOBAL_NOTIFYDSC;
1061
$modversion['notification']['category'][$i]['item_name']      = '';
1062
$modversion['notification']['category'][$i]['subscribe_from'] = ['index.php', 'viewcat.php', 'singlefile.php'];
1063
++$i;
1064
$modversion['notification']['category'][$i]['name']           = 'category';
1065
$modversion['notification']['category'][$i]['title']          = _MI_WFDOWNLOADS_CATEGORY_NOTIFY;
1066
$modversion['notification']['category'][$i]['description']    = _MI_WFDOWNLOADS_CATEGORY_NOTIFYDSC;
1067
$modversion['notification']['category'][$i]['subscribe_from'] = ['viewcat.php', 'singlefile.php'];
1068
$modversion['notification']['category'][$i]['item_name']      = 'cid';
1069
$modversion['notification']['category'][$i]['allow_bookmark'] = true;
1070
++$i;
1071
$modversion['notification']['category'][$i]['name']           = 'file';
1072
$modversion['notification']['category'][$i]['title']          = _MI_WFDOWNLOADS_FILE_NOTIFY;
1073
$modversion['notification']['category'][$i]['description']    = _MI_WFDOWNLOADS_FILE_NOTIFYDSC;
1074
$modversion['notification']['category'][$i]['subscribe_from'] = 'singlefile.php';
1075
$modversion['notification']['category'][$i]['item_name']      = 'lid';
1076
$modversion['notification']['category'][$i]['allow_bookmark'] = true;
1077
1078
$i                                                        = 0;
1079
$modversion['notification']['event'][$i]['name']          = 'new_category';
1080
$modversion['notification']['event'][$i]['category']      = 'global';
1081
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFY;
1082
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYCAP;
1083
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYDSC;
1084
$modversion['notification']['event'][$i]['mail_template'] = 'global_newcategory_notify';
1085
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYSBJ;
1086
++$i;
1087
$modversion['notification']['event'][$i]['name']          = 'file_modify';
1088
$modversion['notification']['event'][$i]['category']      = 'global';
1089
$modversion['notification']['event'][$i]['admin_only']    = true;
1090
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFY;
1091
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYCAP;
1092
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYDSC;
1093
$modversion['notification']['event'][$i]['mail_template'] = 'global_filemodify_notify';
1094
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYSBJ;
1095
++$i;
1096
$modversion['notification']['event'][$i]['name']          = 'file_broken';
1097
$modversion['notification']['event'][$i]['category']      = 'global';
1098
$modversion['notification']['event'][$i]['admin_only']    = true;
1099
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFY;
1100
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYCAP;
1101
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYDSC;
1102
$modversion['notification']['event'][$i]['mail_template'] = 'global_filebroken_notify';
1103
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYSBJ;
1104
++$i;
1105
$modversion['notification']['event'][$i]['name']          = 'file_submit';
1106
$modversion['notification']['event'][$i]['category']      = 'global';
1107
$modversion['notification']['event'][$i]['admin_only']    = true;
1108
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFY;
1109
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYCAP;
1110
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYDSC;
1111
$modversion['notification']['event'][$i]['mail_template'] = 'global_filesubmit_notify';
1112
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYSBJ;
1113
++$i;
1114
$modversion['notification']['event'][$i]['name']          = 'new_file';
1115
$modversion['notification']['event'][$i]['category']      = 'global';
1116
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFY;
1117
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYCAP;
1118
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYDSC;
1119
$modversion['notification']['event'][$i]['mail_template'] = 'global_newfile_notify';
1120
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYSBJ;
1121
++$i;
1122
$modversion['notification']['event'][$i]['name']          = 'file_submit';
1123
$modversion['notification']['event'][$i]['category']      = 'category';
1124
$modversion['notification']['event'][$i]['admin_only']    = true;
1125
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFY;
1126
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYCAP;
1127
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYDSC;
1128
$modversion['notification']['event'][$i]['mail_template'] = 'category_filesubmit_notify';
1129
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYSBJ;
1130
++$i;
1131
$modversion['notification']['event'][$i]['name']          = 'new_file';
1132
$modversion['notification']['event'][$i]['category']      = 'category';
1133
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFY;
1134
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYCAP;
1135
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYDSC;
1136
$modversion['notification']['event'][$i]['mail_template'] = 'category_newfile_notify';
1137
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYSBJ;
1138
++$i;
1139
$modversion['notification']['event'][$i]['name']          = 'approve';
1140
$modversion['notification']['event'][$i]['category']      = 'file';
1141
$modversion['notification']['event'][$i]['invisible']     = true;
1142
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_FILE_APPROVE_NOTIFY;
1143
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYCAP;
1144
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYDSC;
1145
$modversion['notification']['event'][$i]['mail_template'] = 'file_approve_notify';
1146
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYSBJ;
1147
++$i;
1148
$modversion['notification']['event'][$i]['name']          = 'filemodified';
1149
$modversion['notification']['event'][$i]['category']      = 'file';
1150
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFY;
1151
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYCAP;
1152
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYDSC;
1153
$modversion['notification']['event'][$i]['mail_template'] = 'file_filemodified_notify';
1154
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYSBJ;
1155
++$i;
1156
$modversion['notification']['event'][$i]['name']          = 'filemodified';
1157
$modversion['notification']['event'][$i]['category']      = 'category';
1158
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFY;
1159
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYCAP;
1160
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYDSC;
1161
$modversion['notification']['event'][$i]['mail_template'] = 'category_filemodified_notify';
1162
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYSBJ;
1163
++$i;
1164
$modversion['notification']['event'][$i]['name']          = 'filemodified';
1165
$modversion['notification']['event'][$i]['category']      = 'global';
1166
$modversion['notification']['event'][$i]['title']         = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFY;
1167
$modversion['notification']['event'][$i]['caption']       = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYCAP;
1168
$modversion['notification']['event'][$i]['description']   = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYDSC;
1169
$modversion['notification']['event'][$i]['mail_template'] = 'global_filemodified_notify';
1170
$modversion['notification']['event'][$i]['mail_subject']  = _MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYSBJ;
1171