|
From: <luc...@us...> - 2013-03-13 20:16:58
|
Revision: 11221
http://sourceforge.net/p/xoops/svn/11221
Author: luciorota
Date: 2013-03-13 20:16:55 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
fixed minor bugs in update procedure
v3.21FINAL -> v3.22RC1
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/include/update.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/update.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/update.php 2013-03-13 18:35:25 UTC (rev 11220)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/update.php 2013-03-13 20:16:55 UTC (rev 11221)
@@ -34,12 +34,11 @@
function xoops_module_update_wfdownloads($module) {
ob_start();
invert_nohtm_dohtml_values();
- update_tables_to_300();
+ update_tables_to_322();
$feedback = ob_get_clean();
if (method_exists($module, "setMessage")) {
$module->setMessage($feedback);
- }
- else {
+ } else {
echo $feedback;
}
wfdownloads_SetMeta("version", "3.2.010"); //Set meta version to current
@@ -50,214 +49,225 @@
// This function updates any existing table of a 2.x version to the format used
// in the release of WF-Downloads 3.00
// =========================================================================================
-function update_tables_to_300()
-{
- $dbupdater = new WfdownloadsDbupdater();
+function update_tables_to_322() {
+ $dbupdater = new WfdownloadsDbupdater();
- if (!wfdownloads_TableExists('wfdownloads_meta')) {
- // Create table wfdownloads_meta
+ if (!wfdownloads_TableExists('wfdownloads_meta')) {
+ // Create table wfdownloads_meta
$table = new WfdownloadsTable('wfdownloads_meta');
- $table->setStructure( "CREATE TABLE %s (
- metakey varchar(50) NOT NULL default '',
- metavalue varchar(255) NOT NULL default '',
- PRIMARY KEY (metakey))
- TYPE=MyISAM;");
-
+ $table->setStructure("CREATE TABLE %s (
+ metakey varchar(50) NOT NULL default '',
+ metavalue varchar(255) NOT NULL default '',
+ PRIMARY KEY (metakey))
+ ENGINE=MyISAM;");
$table->setData(sprintf("'version', %s", round($GLOBALS['xoopsModule']->getVar('version') / 100, 2)));
if ($dbupdater->updateTable($table)) {
echo "wfdownloads_meta table created<br />";
}
- }
+ }
+
if (!wfdownloads_TableExists('wfdownloads_mirrors')) {
- // Create table wfdownloads_mirror
+ // Create table wfdownloads_mirror
$table = new WfdownloadsTable('wfdownloads_mirrors');
- $table->setStructure( "CREATE TABLE %s (
- mirror_id int(11) unsigned NOT NULL auto_increment,
- lid int(11) NOT NULL default '0',
- title varchar(255) NOT NULL default '',
- homeurl varchar(100) NOT NULL default '',
- location varchar(255) NOT NULL default '',
- continent varchar(255) NOT NULL default '',
- downurl varchar(255) NOT NULL default '',
- submit int(11) NOT NULL default '0',
- date int(11) NOT NULL default '0',
- uid int(10) NOT NULL default '0',
- PRIMARY KEY (mirror_id),
- KEY categoryid (lid))
- TYPE=MyISAM;");
+ $table->setStructure("CREATE TABLE %s (
+ mirror_id int(11) unsigned NOT NULL auto_increment,
+ lid int(11) NOT NULL default '0',
+ title varchar(255) NOT NULL default '',
+ homeurl varchar(100) NOT NULL default '',
+ location varchar(255) NOT NULL default '',
+ continent varchar(255) NOT NULL default '',
+ downurl varchar(255) NOT NULL default '',
+ submit int(11) NOT NULL default '0',
+ date int(11) NOT NULL default '0',
+ uid int(10) NOT NULL default '0',
+ PRIMARY KEY (mirror_id),
+ KEY categoryid (lid))
+ ENGINE=MyISAM;");
+ if ($dbupdater->updateTable($table)) {
+ echo "wfdownloads_mirrors table created<br />";
+ }
+ }
+ if (!wfdownloads_TableExists('wfdownloads_ip_log')) {
+ // Create table wfdownloads_ip_log
+ $table = new WfdownloadsTable('wfdownloads_ip_log');
+ $table->setStructure("CREATE TABLE %s (
+ ip_logid int(11) NOT NULL auto_increment,
+ lid int(11) NOT NULL default '0',
+ uid int(11) NOT NULL default '0',
+ date int(11) NOT NULL default '0',
+ ip_address varchar(20) NOT NULL default '',
+ PRIMARY KEY (ip_logid)
+ ENGINE=MyISAM;");
if ($dbupdater->updateTable($table)) {
echo "wfdownloads_mirrors table created<br />";
}
- }
+ }
- $download_fields = array(
- "lid" => array("Type" => "int(11) unsigned NOT NULL auto_increment", "Default" => false),
- "cid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
- "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "url" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "filename" => array("Type" => "varchar(150) NOT NULL default ''", "Default" => true),
- "filetype" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
- "homepage" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
- "version" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
- "size" => array("Type" => "int(8) NOT NULL default '0'", "Default" => true),
- "platform" => array("Type" => "varchar(50) NOT NULL default ''", "Default" => true),
- "screenshot" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot2" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot3" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot4" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "submitter" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "publisher" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "status" => array("Type" => "tinyint(2) NOT NULL default '0'", "Default" => true),
- "date" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
- "hits" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "rating" => array("Type" => "double(6,4) NOT NULL default '0.0000'", "Default" => true),
- "votes" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "comments" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "license" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "mirror" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "price" => array("Type" => "varchar(10) NOT NULL default 'Free'", "Default" => true),
- "paypalemail" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "features" => array("Type" => "text NOT NULL", "Default" => false),
- "requirements" =>array("Type" => "text NOT NULL", "Default" => false),
- "homepagetitle" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "forumid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "limitations" =>array("Type" => "varchar(255) NOT NULL default '30 day trial'", "Default" => true),
- "versiontypes" =>array("Type" => "varchar(255) NOT NULL default 'None'", "Default" => true),
- "dhistory" => array("Type" => "text NOT NULL", "Default" => false),
- "published" => array("Type" => "int(11) NOT NULL default '1089662528'", "Default" => true),
- "expired" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
- "updated" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "offline" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
- "description" =>array("Type" => "text NOT NULL", "Default" => false),
- "ipaddress" => array("Type" => "varchar(120) NOT NULL default '0'", "Default" => true),
- "notifypub" => array("Type" => "int(1) NOT NULL default '0'", "Default" => true),
- "summary" => array("Type" => "text NOT NULL", "Default" => false),
- "formulize_idreq" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true));
-
- $renamed_fields = array(
- "logourl" => "screenshot"
- );
-
- echo "<br /><B>Checking Download table</B><br />";
- $download_handler = xoops_getmodulehandler('download', 'wfdownloads');
- $download_table = new WfdownloadsTable("wfdownloads_downloads");
- $fields = get_table_info($download_handler->table, $download_fields);
- // Check for renamed fields
+ $download_fields = array(
+ "lid" => array("Type" => "int(11) unsigned NOT NULL auto_increment", "Default" => false),
+ "cid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
+ "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "url" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "filename" => array("Type" => "varchar(150) NOT NULL default ''", "Default" => true),
+ "filetype" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
+ "homepage" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
+ "version" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
+ "size" => array("Type" => "int(8) NOT NULL default '0'", "Default" => true),
+ "platform" => array("Type" => "varchar(50) NOT NULL default ''", "Default" => true),
+ "screenshot" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot2" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot3" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot4" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "submitter" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "publisher" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "status" => array("Type" => "tinyint(2) NOT NULL default '0'", "Default" => true),
+ "date" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "hits" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "rating" => array("Type" => "double(6,4) NOT NULL default '0.0000'", "Default" => true),
+ "votes" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "comments" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "license" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "mirror" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "price" => array("Type" => "varchar(10) NOT NULL default 'Free'", "Default" => true),
+ "paypalemail" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "features" => array("Type" => "text NOT NULL", "Default" => false),
+ "requirements" => array("Type" => "text NOT NULL", "Default" => false),
+ "homepagetitle" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "forumid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "limitations" => array("Type" => "varchar(255) NOT NULL default '30 day trial'", "Default" => true),
+ "versiontypes" => array("Type" => "varchar(255) NOT NULL default 'None'", "Default" => true),
+ "dhistory" => array("Type" => "text NOT NULL", "Default" => false),
+ "published" => array("Type" => "int(11) NOT NULL default '1089662528'", "Default" => true),
+ "expired" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "updated" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "offline" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
+ "description" => array("Type" => "text NOT NULL", "Default" => false),
+ "ipaddress" => array("Type" => "varchar(120) NOT NULL default '0'", "Default" => true),
+ "notifypub" => array("Type" => "int(1) NOT NULL default '0'", "Default" => true),
+ "summary" => array("Type" => "text NOT NULL", "Default" => false),
+ "formulize_idreq" =>array("Type" => "int(5) NOT NULL default '0'", "Default" => true)
+ );
+ $renamed_fields = array(
+ "logourl" => "screenshot"
+ );
+ echo "<br /><B>Checking Download table</B><br />";
+ $download_handler = xoops_getmodulehandler('download', 'wfdownloads');
+ $download_table = new WfdownloadsTable("wfdownloads_downloads");
+ $fields = get_table_info($download_handler->table, $download_fields);
+ // Check for renamed fields
rename_fields($download_table, $renamed_fields, $fields, $download_fields);
- update_table($download_fields, $fields, $download_table);
+ update_table($download_fields, $fields, $download_table);
if ($dbupdater->updateTable($download_table)) {
echo "Downloads table updated<br />";
}
- unset($fields);
+ unset($fields);
- $mod_fields = array(
- "requestid" => array("Type" => "int(11) NOT NULL auto_increment", "Default" => false),
- "lid" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "cid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
- "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "url" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "filename" => array("Type" => "varchar(150) NOT NULL default ''", "Default" => true),
- "filetype" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
- "homepage" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "version" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
- "size" => array("Type" => "int(8) NOT NULL default '0'", "Default" => true),
- "platform" => array("Type" => "varchar(50) NOT NULL default ''", "Default" => true),
- "screenshot" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot2" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot3" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "screenshot4" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "submitter" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "publisher" => array("Type" => "text NOT NULL", "Default" => false),
- "status" => array("Type" => "tinyint(2) NOT NULL default '0'", "Default" => true),
- "date" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
- "hits" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "rating" => array("Type" => "double(6,4) NOT NULL default '0.0000'", "Default" => true),
- "votes" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "comments" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
- "license" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "mirror" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "price" => array("Type" => "varchar(10) NOT NULL default 'Free'", "Default" => true),
- "paypalemail" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "features" => array("Type" => "text NOT NULL", "Default" => false),
- "requirements" =>array("Type" => "text NOT NULL", "Default" => false),
- "homepagetitle" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "forumid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "limitations" =>array("Type" => "varchar(255) NOT NULL default '30 day trial'", "Default" => true),
- "versiontypes" =>array("Type" => "varchar(255) NOT NULL default 'None'", "Default" => true),
- "dhistory" => array("Type" => "text NOT NULL", "Default" => false),
- "published" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
- "expired" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
- "updated" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "offline" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
- "summary" => array("Type" => "text NOT NULL", "Default" => false),
- "description" =>array("Type" => "text NOT NULL", "Default" => false),
- "modifysubmitter" =>array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "requestdate" =>array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "formulize_idreq" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true));
+ $mod_fields = array(
+ "requestid" => array("Type" => "int(11) NOT NULL auto_increment", "Default" => false),
+ "lid" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "cid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
+ "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "url" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "filename" => array("Type" => "varchar(150) NOT NULL default ''", "Default" => true),
+ "filetype" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
+ "homepage" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "version" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
+ "size" => array("Type" => "int(8) NOT NULL default '0'", "Default" => true),
+ "platform" => array("Type" => "varchar(50) NOT NULL default ''", "Default" => true),
+ "screenshot" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot2" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot3" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot4" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "submitter" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "publisher" => array("Type" => "text NOT NULL", "Default" => false),
+ "status" => array("Type" => "tinyint(2) NOT NULL default '0'", "Default" => true),
+ "date" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "hits" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "rating" => array("Type" => "double(6,4) NOT NULL default '0.0000'", "Default" => true),
+ "votes" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "comments" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "license" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "mirror" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "price" => array("Type" => "varchar(10) NOT NULL default 'Free'", "Default" => true),
+ "paypalemail" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "features" => array("Type" => "text NOT NULL", "Default" => false),
+ "requirements" =>array("Type" => "text NOT NULL", "Default" => false),
+ "homepagetitle" =>array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "forumid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "limitations" =>array("Type" => "varchar(255) NOT NULL default '30 day trial'", "Default" => true),
+ "versiontypes" =>array("Type" => "varchar(255) NOT NULL default 'None'", "Default" => true),
+ "dhistory" => array("Type" => "text NOT NULL", "Default" => false),
+ "published" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "expired" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "updated" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "offline" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
+ "summary" => array("Type" => "text NOT NULL", "Default" => false),
+ "description" =>array("Type" => "text NOT NULL", "Default" => false),
+ "modifysubmitter" =>array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "requestdate" =>array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "formulize_idreq" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true)
+ );
+ $renamed_fields = array(
+ "logourl" => "screenshot"
+ );
+ echo "<br /><B>Checking Modified Downloads table</B><br />";
+ $mod_handler = xoops_getmodulehandler('modification', 'wfdownloads');
+ $mod_table = new WfdownloadsTable("wfdownloads_mod");
+ $fields = get_table_info($mod_handler->table, $mod_fields);
+ rename_fields($mod_table, $renamed_fields, $fields, $mod_fields);
+ update_table($mod_fields, $fields, $mod_table);
+ if ($dbupdater->updateTable($mod_table)) {
+ echo "Modified Downloads table updated <br />";
+ }
+ unset($fields);
- $renamed_fields = array(
- "logourl" => "screenshot"
- );
+ $cat_fields = array(
+ "cid" => array("Type" => "int(5) unsigned NOT NULL auto_increment", "Default" => false),
+ "pid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
+ "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "imgurl" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "description" => array("Type" => "text NOT NULL default ''", "Default" => true),
+ "total" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "summary" => array("Type" => "text NOT NULL", "Default" => false),
+ "spotlighttop" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "spotlighthis" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "dohtml" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
+ "dosmiley" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
+ "doxcode" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
+ "doimage" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
+ "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
+ "weight" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "formulize_fid" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true)
+ );
+ echo "<br /><B>Checking Category table</B><br />";
+ $cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
+ $cat_table = new WfdownloadsTable("wfdownloads_cat");
+ $fields = get_table_info($cat_handler->table, $cat_fields);
+ update_table($cat_fields, $fields, $cat_table);
+ if ($dbupdater->updateTable($cat_table)) {
+ echo "Category table updated<br />";
+ }
+ unset($fields);
- echo "<br /><B>Checking Modified Downloads table</B><br />";
- $mod_handler = xoops_getmodulehandler('modification', 'wfdownloads');
- $mod_table = new WfdownloadsTable("wfdownloads_mod");
- $fields = get_table_info($mod_handler->table, $mod_fields);
- rename_fields($mod_table, $renamed_fields, $fields, $mod_fields);
- update_table($mod_fields, $fields, $mod_table);
- if ($dbupdater->updateTable($mod_table)) {
- echo "Modified Downloads table updated <br />";
- }
- unset($fields);
-
-
- $cat_fields = array(
- "cid" => array("Type" => "int(5) unsigned NOT NULL auto_increment", "Default" => false),
- "pid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
- "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "imgurl" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
- "description" => array("Type" => "text NOT NULL default ''", "Default" => true),
- "total" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "summary" => array("Type" => "text NOT NULL", "Default" => false),
- "spotlighttop" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "spotlighthis" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "dohtml" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
- "dosmiley" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
- "doxcode" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
- "doimage" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
- "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true),
- "weight" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "formulize_fid" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true)
- );
- echo "<br /><B>Checking Category table</B><br />";
- $cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
- $cat_table = new WfdownloadsTable("wfdownloads_cat");
- $fields = get_table_info($cat_handler->table, $cat_fields);
- update_table($cat_fields, $fields, $cat_table);
- if ($dbupdater->updateTable($cat_table)) {
- echo "Category table updated<br />";
- }
- unset($fields);
-
- $broken_fields = array(
- "reportid" => array("Type" => "int(5) NOT NULL auto_increment", "Default" => false),
- "lid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "sender" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
- "ip" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
- "date" => array("Type" => "varchar(11) NOT NULL default '0'", "Default" => true),
- "confirmed" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
- "acknowledged" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true)
- );
- echo "<br /><B>Checking Broken Report table</B><br />";
- $broken_handler = xoops_getmodulehandler('report', 'wfdownloads');
- $broken_table = new WfdownloadsTable("wfdownloads_broken");
- $fields = get_table_info($broken_handler->table, $broken_fields);
- update_table($broken_fields, $fields, $broken_table);
- if ($dbupdater->updateTable($broken_table)) {
- echo "Broken Reports table updated<br />";
- }
- unset($fields);
+ $broken_fields = array(
+ "reportid" => array("Type" => "int(5) NOT NULL auto_increment", "Default" => false),
+ "lid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "sender" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "ip" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
+ "date" => array("Type" => "varchar(11) NOT NULL default '0'", "Default" => true),
+ "confirmed" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
+ "acknowledged" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true)
+ );
+ echo "<br /><B>Checking Broken Report table</B><br />";
+ $broken_handler = xoops_getmodulehandler('report', 'wfdownloads');
+ $broken_table = new WfdownloadsTable("wfdownloads_broken");
+ $fields = get_table_info($broken_handler->table, $broken_fields);
+ update_table($broken_fields, $fields, $broken_table);
+ if ($dbupdater->updateTable($broken_table)) {
+ echo "Broken Reports table updated<br />";
+ }
+ unset($fields);
}
// =========================================================================================
@@ -265,19 +275,18 @@
// the wfdownloads_cat table into dohtml, dosmilies and so on. Therefore the logic will change
// 0=yes 1=no and the currently stored value need to be changed accordingly
// =========================================================================================
-function invert_nohtm_dohtml_values()
-{
+function invert_nohtm_dohtml_values() {
$ret = array();
- global $xoopsDB;
- $cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
- $result = $xoopsDB->query("SHOW COLUMNS FROM ".$cat_handler->table);
- while ($existing_field = $xoopsDB->fetchArray($result)) {
- $fields[$existing_field['Field']] = $existing_field['Type'];
- }
- if (in_array("nohtml", array_keys($fields))) {
- $dbupdater = new WfdownloadsDbupdater();
- //Invert column values
- // alter options in wfdownloads_cat
+ global $xoopsDB;
+ $cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
+ $result = $xoopsDB->query("SHOW COLUMNS FROM ".$cat_handler->table);
+ while ($existing_field = $xoopsDB->fetchArray($result)) {
+ $fields[$existing_field['Field']] = $existing_field['Type'];
+ }
+ if (in_array("nohtml", array_keys($fields))) {
+ $dbupdater = new WfdownloadsDbupdater();
+ //Invert column values
+ // alter options in wfdownloads_cat
$table = new WfdownloadsTable('wfdownloads_cat');
$table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
$table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
@@ -292,22 +301,22 @@
// every value will be 1, follow me?
$table->addUpdatedWhere('dohtml', 2,'=1');
$table->addUpdatedWhere('dohtml', 1,'=0');
- $table->addUpdatedWhere('dohtml', 0,'=2');
+ $table->addUpdatedWhere('dohtml', 0,'=2');
- $table->addUpdatedWhere('dosmiley', 2,'=1');
- $table->addUpdatedWhere('dosmiley', 1,'=0');
- $table->addUpdatedWhere('dosmiley', 0,'=2');
+ $table->addUpdatedWhere('dosmiley', 2,'=1');
+ $table->addUpdatedWhere('dosmiley', 1,'=0');
+ $table->addUpdatedWhere('dosmiley', 0,'=2');
- $table->addUpdatedWhere('doxcode', 2,'=1');
- $table->addUpdatedWhere('doxcode', 1,'=0');
- $table->addUpdatedWhere('doxcode', 0,'=2');
+ $table->addUpdatedWhere('doxcode', 2,'=1');
+ $table->addUpdatedWhere('doxcode', 1,'=0');
+ $table->addUpdatedWhere('doxcode', 0,'=2');
- $table->addUpdatedWhere('doimage', 2,'=1');
- $table->addUpdatedWhere('doimage', 1,'=0');
- $table->addUpdatedWhere('doimage', 0,'=2');
- $ret = $dbupdater->updateTable($table);
- }
- return $ret;
+ $table->addUpdatedWhere('doimage', 2,'=1');
+ $table->addUpdatedWhere('doimage', 1,'=0');
+ $table->addUpdatedWhere('doimage', 0,'=2');
+ $ret = $dbupdater->updateTable($table);
+ }
+ return $ret;
}
/**
@@ -320,23 +329,21 @@
*/
function update_table($new_fields, $existing_fields, &$table) {
foreach ($new_fields as $field => $fieldinfo) {
- $type = $fieldinfo["Type"];
- if (!in_array($field, array_keys($existing_fields) ) ) {
- //Add field as it is missing
- $table->addNewField($field, $type);
- //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
- //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br />";
- }
- elseif ($existing_fields[$field] != $type) {
- $table->addAlteredField($field, $field." ".$type);
- // check $fields[$field]['type'] for things like "int(10) unsigned"
- //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
- //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br />";
- }
- else {
- //echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br />";
- }
- }
+ $type = $fieldinfo["Type"];
+ if (!in_array($field, array_keys($existing_fields) ) ) {
+ //Add field as it is missing
+ $table->addNewField($field, $type);
+ //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
+ //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br />";
+ } elseif ($existing_fields[$field] != $type) {
+ $table->addAlteredField($field, $field." ".$type);
+ // check $fields[$field]['type'] for things like "int(10) unsigned"
+ //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
+ //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br />";
+ } else {
+ //echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br />";
+ }
+ }
}
/**
@@ -349,20 +356,20 @@
*/
function get_table_info($table, $default_fields) {
global $xoopsDB;
- $result = $xoopsDB->query("SHOW COLUMNS FROM ".$table);
- while ($existing_field = $xoopsDB->fetchArray($result)) {
- $fields[$existing_field['Field']] = $existing_field['Type'];
- if ($existing_field['Null'] != "YES") {
- $fields[$existing_field['Field']] .= " NOT NULL";
- }
- if ($existing_field['Extra']) {
- $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
- }
- if ($default_fields[$existing_field['Field']]['Default']) {
- $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
- }
- }
- return $fields;
+ $result = $xoopsDB->query("SHOW COLUMNS FROM ".$table);
+ while ($existing_field = $xoopsDB->fetchArray($result)) {
+ $fields[$existing_field['Field']] = $existing_field['Type'];
+ if ($existing_field['Null'] != "YES") {
+ $fields[$existing_field['Field']] .= " NOT NULL";
+ }
+ if ($existing_field['Extra']) {
+ $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
+ }
+ if ($default_fields[$existing_field['Field']]['Default']) {
+ $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
+ }
+ }
+ return $fields;
}
/**
@@ -376,16 +383,14 @@
*/
function rename_fields(&$table, $renamed_fields, &$fields, $new_fields) {
foreach (array_keys($fields) as $field) {
- if (in_array($field, array_keys($renamed_fields))) {
- $new_field_name = $renamed_fields[$field];
- $new_field_type = $new_fields[$new_field_name]["Type"];
- $table->addAltered($field, $new_field_name." ".$new_field_type);
- //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
- //echo $field." Renamed to ".$new_field_name."<br />";
- $fields[$new_field_name] = $new_field_type;
- }
- }
- //return $fields;
+ if (in_array($field, array_keys($renamed_fields))) {
+ $new_field_name = $renamed_fields[$field];
+ $new_field_type = $new_fields[$new_field_name]["Type"];
+ $table->addAltered($field, $new_field_name." ".$new_field_type);
+ //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
+ //echo $field." Renamed to ".$new_field_name."<br />";
+ $fields[$new_field_name] = $new_field_type;
+ }
+ }
+ //return $fields;
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-03-13 18:35:25 UTC (rev 11220)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-03-13 20:16:55 UTC (rev 11221)
@@ -11,9 +11,9 @@
exit ;
$modversion['name'] = _MI_WFD_NAME;
-$modversion['version'] = 3.21;
-$modversion['releasedate'] = "2008-05-10";
-$modversion['status'] = "Final";
+$modversion['version'] = 3.22;
+$modversion['releasedate'] = "2013-03-13";
+$modversion['status'] = "RC1";
$modversion['description'] = _MI_WFD_DESC;
$modversion['author'] = "The SmartFactory";
$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.";
@@ -29,7 +29,7 @@
$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2012/12/16';
+$modversion['release_date'] = '2013/03/13';
$modversion["module_website_url"] = "http://www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
$modversion["module_status"] = "Final";
@@ -75,7 +75,7 @@
$modversion['tables'][7] = "wfdownloads_mimetypes";
$modversion['tables'][8] = "wfdownloads_meta";
$modversion['tables'][9] = "wfdownloads_mirrors";
-$modversion['tables'][9] = "wfdownloads_ip_log";
+$modversion['tables'][10] = "wfdownloads_ip_log";
// Admin things
@@ -114,28 +114,22 @@
global $xoopsModuleConfig, $xoopsUser, $xoopsModule;
$submissions = 0;
-if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive'))
-{
+if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
if (is_object($xoopsUser) && ($xoopsModuleConfig['submissions'] == 2 || $xoopsModuleConfig['submissions'] == 4))
{
$groups = $xoopsUser->getGroups();
- if (array_intersect($xoopsModuleConfig['submitarts'], $groups))
- {
+ if (array_intersect($xoopsModuleConfig['submitarts'], $groups)) {
$submissions = 1;
}
- }
- else
- {
- if ($xoopsModuleConfig['anonpost'] == 2 || $xoopsModuleConfig['anonpost'] == 4)
- {
+ } else {
+ if ($xoopsModuleConfig['anonpost'] == 2 || $xoopsModuleConfig['anonpost'] == 4) {
$submissions = 1;
}
}
}
$i = 0;
-if ($submissions)
-{
+if ($submissions) {
$i++;
$modversion['sub'][$i]['name'] = _MI_WFD_SMNAME1;
$category_suffix = (!empty($_GET['cid']))? "?cid=" . intval($_GET['cid']): ""; //Added by Lankford on 2008/2/20
@@ -222,362 +216,362 @@
//Module config setting
$modversion['config'][] = array(
- 'name' => 'enablerss',
- 'title' => '_MI_WFD_ENABLERSS',
- 'description' => '_MI_WFD_ENABLERSSDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'enablerss',
+ 'title' => '_MI_WFD_ENABLERSS',
+ 'description' => '_MI_WFD_ENABLERSSDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'popular',
- 'title' => '_MI_WFD_POPULAR',
- 'description' => '_MI_WFD_POPULARDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('5' => 5, '10' => 10, '50' => 50, '100' => 100, '200' => 200, '500' => 500, '1000' => 1000),
- 'default' => 100);
+ 'name' => 'popular',
+ 'title' => '_MI_WFD_POPULAR',
+ 'description' => '_MI_WFD_POPULARDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('5' => 5, '10' => 10, '50' => 50, '100' => 100, '200' => 200, '500' => 500, '1000' => 1000),
+ 'default' => 100);
$modversion['config'][] = array(
- 'name' => 'displayicons',
- 'title' => '_MI_WFD_ICONDISPLAY',
- 'description' => '_MI_WFD_DISPLAYICONDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('_MI_WFD_DISPLAYICON1' => 1, '_MI_WFD_DISPLAYICON2' => 2, '_MI_WFD_DISPLAYICON3' => 3),
- 'default' => 1);
+ 'name' => 'displayicons',
+ 'title' => '_MI_WFD_ICONDISPLAY',
+ 'description' => '_MI_WFD_DISPLAYICONDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('_MI_WFD_DISPLAYICON1' => 1, '_MI_WFD_DISPLAYICON2' => 2, '_MI_WFD_DISPLAYICON3' => 3),
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'perpage',
- 'title' => '_MI_WFD_PERPAGE',
- 'description' => '_MI_WFD_PERPAGEDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50),
- 'default' => 10);
+ 'name' => 'perpage',
+ 'title' => '_MI_WFD_PERPAGE',
+ 'description' => '_MI_WFD_PERPAGEDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50),
+ 'default' => 10);
$modversion['config'][] = array(
- 'name' => 'anonpost',
- 'title' => '_MI_WFD_ANONPOST',
- 'description' => '_MI_WFD_ANONPOSTDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('_MI_WFD_ANONPOST1' => 1, '_MI_WFD_ANONPOST2' => 2, '_MI_WFD_ANONPOST3' => 3, '_MI_WFD_ANONPOST4' => 4),
- 'default' => 1);
+ 'name' => 'anonpost',
+ 'title' => '_MI_WFD_ANONPOST',
+ 'description' => '_MI_WFD_ANONPOSTDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('_MI_WFD_ANONPOST1' => 1, '_MI_WFD_ANONPOST2' => 2, '_MI_WFD_ANONPOST3' => 3, '_MI_WFD_ANONPOST4' => 4),
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'rev_anonpost',
- 'title' => '_MI_WFD_REVIEWANONPOST',
- 'description' => '_MI_WFD_REVIEWANONPOSTDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'rev_anonpost',
+ 'title' => '_MI_WFD_REVIEWANONPOST',
+ 'description' => '_MI_WFD_REVIEWANONPOSTDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'autoapprove',
- 'title' => '_MI_WFD_AUTOAPPROVE',
- 'description' => '_MI_WFD_AUTOAPPROVEDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('_MI_WFD_AUTOAPPROVE1' => 1, '_MI_WFD_AUTOAPPROVE2' => 2, '_MI_WFD_AUTOAPPROVE3' => 3, '_MI_WFD_AUTOAPPROVE4' => 4),
- 'default' => 1);
+ 'name' => 'autoapprove',
+ 'title' => '_MI_WFD_AUTOAPPROVE',
+ 'description' => '_MI_WFD_AUTOAPPROVEDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('_MI_WFD_AUTOAPPROVE1' => 1, '_MI_WFD_AUTOAPPROVE2' => 2, '_MI_WFD_AUTOAPPROVE3' => 3, '_MI_WFD_AUTOAPPROVE4' => 4),
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'rev_approve',
- 'title' => '_MI_WFD_REVIEWAPPROVE',
- 'description' => '_MI_WFD_REVIEWAPPROVEDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'rev_approve',
+ 'title' => '_MI_WFD_REVIEWAPPROVE',
+ 'description' => '_MI_WFD_REVIEWAPPROVEDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'submissions',
- 'title' => '_MI_WFD_ALLOWSUBMISS',
- 'description' => '_MI_WFD_ALLOWSUBMISSDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('_MI_WFD_ALLOWSUBMISS1' => 1, '_MI_WFD_ALLOWSUBMISS2' => 2, '_MI_WFD_ALLOWSUBMISS3' => 3, '_MI_WFD_ALLOWSUBMISS4' => 4),
- 'default' => 1);
+ 'name' => 'submissions',
+ 'title' => '_MI_WFD_ALLOWSUBMISS',
+ 'description' => '_MI_WFD_ALLOWSUBMISSDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('_MI_WFD_ALLOWSUBMISS1' => 1, '_MI_WFD_ALLOWSUBMISS2' => 2, '_MI_WFD_ALLOWSUBMISS3' => 3, '_MI_WFD_ALLOWSUBMISS4' => 4),
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'submitarts',
- 'title' => '_MI_WFD_SUBMITART',
- 'description' => '_MI_WFD_SUBMITARTDSC',
- 'formtype' => 'group_multi',
- 'valuetype' => 'array',
- 'default' => '1');
+ 'name' => 'submitarts',
+ 'title' => '_MI_WFD_SUBMITART',
+ 'description' => '_MI_WFD_SUBMITARTDSC',
+ 'formtype' => 'group_multi',
+ 'valuetype' => 'array',
+ 'default' => '1');
$modversion['config'][] = array(
- 'name' => 'useruploads',
- 'title' => '_MI_WFD_ALLOWUPLOADS',
- 'description' => '_MI_WFD_ALLOWUPLOADSDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'useruploads',
+ 'title' => '_MI_WFD_ALLOWUPLOADS',
+ 'description' => '_MI_WFD_ALLOWUPLOADSDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'useruploadsgroup',
- 'title' => '_MI_WFD_ALLOWUPLOADSGROUP',
- 'description' => '_MI_WFD_ALLOWUPLOADSGROUPDSC',
- 'formtype' => 'group_multi',
- 'valuetype' => 'array',
- 'default' => '1');
+ 'name' => 'useruploadsgroup',
+ 'title' => '_MI_WFD_ALLOWUPLOADSGROUP',
+ 'description' => '_MI_WFD_ALLOWUPLOADSGROUPDSC',
+ 'formtype' => 'group_multi',
+ 'valuetype' => 'array',
+ 'default' => '1');
$modversion['config'][] = array(
- 'name' => 'screenshot',
- 'title' => '_MI_WFD_USESHOTS',
- 'description' => '_MI_WFD_USESHOTSDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'screenshot',
+ 'title' => '_MI_WFD_USESHOTS',
+ 'description' => '_MI_WFD_USESHOTSDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'max_screenshot',
- 'title' => '_MI_WFD_MAXSHOTS',
- 'description' => '_MI_WFD_MAXSHOTSDSC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('1' => 1, '2' => 2, '3' => 3, '4' => 4),
- 'default' => 1);
+ 'name' => 'max_screenshot',
+ 'title' => '_MI_WFD_MAXSHOTS',
+ 'description' => '_MI_WFD_MAXSHOTSDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('1' => 1, '2' => 2, '3' => 3, '4' => 4),
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'shotwidth',
- 'title' => '_MI_WFD_SHOTWIDTH',
- 'description' => '_MI_WFD_SHOTWIDTHDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 140);
+ 'name' => 'shotwidth',
+ 'title' => '_MI_WFD_SHOTWIDTH',
+ 'description' => '_MI_WFD_SHOTWIDTHDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 140);
$modversion['config'][] = array(
- 'name' => 'shotheight',
- 'title' => '_MI_WFD_SHOTHEIGHT',
- 'description' => '_MI_WFD_SHOTHEIGHTDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 79);
+ 'name' => 'shotheight',
+ 'title' => '_MI_WFD_SHOTHEIGHT',
+ 'description' => '_MI_WFD_SHOTHEIGHTDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 79);
$modversion['config'][] = array(
- 'name' => 'maximgwidth',
- 'title' => '_MI_WFD_IMGWIDTH',
- 'description' => '_MI_WFD_IMGWIDTHDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 600);
+ 'name' => 'maximgwidth',
+ 'title' => '_MI_WFD_IMGWIDTH',
+ 'description' => '_MI_WFD_IMGWIDTHDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 600);
$modversion['config'][] = array(
- 'name' => 'maximgheight',
- 'title' => '_MI_WFD_IMGHEIGHT',
- 'description' => '_MI_WFD_IMGHEIGHTDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 600);
+ 'name' => 'maximgheight',
+ 'title' => '_MI_WFD_IMGHEIGHT',
+ 'description' => '_MI_WFD_IMGHEIGHTDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 600);
$modversion['config'][] = array(
- 'name' => 'usethumbs',
- 'title' => '_MI_WFD_USETHUMBS',
- 'description' => '_MI_WFD_USETHUMBSDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'usethumbs',
+ 'title' => '_MI_WFD_USETHUMBS',
+ 'description' => '_MI_WFD_USETHUMBSDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'updatethumbs',
- 'title' => '_MI_WFD_IMGUPDATE',
- 'description' => '_MI_WFD_IMGUPDATEDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 1);
+ 'name' => 'updatethumbs',
+ 'title' => '_MI_WFD_IMGUPDATE',
+ 'description' => '_MI_WFD_IMGUPDATEDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'imagequality',
- 'title' => '_MI_WFD_QUALITY',
- 'description' => '_MI_WFD_QUALITYDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 100);
+ 'name' => 'imagequality',
+ 'title' => '_MI_WFD_QUALITY',
+ 'description' => '_MI_WFD_QUALITYDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 100);
$modversion['config'][] = array(
- 'name' => 'keepaspect',
- 'title' => '_MI_WFD_KEEPASPECT',
- 'description' => '_MI_WFD_KEEPASPECTDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'keepaspect',
+ 'title' => '_MI_WFD_KEEPASPECT',
+ 'description' => '_MI_WFD_KEEPASPECTDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'screenshots',
- 'title' => '_MI_WFD_SCREENSHOTS',
- 'description' => '_MI_WFD_SCREENSHOTSDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'text',
- 'default' => 'modules/wfdownloads/images/screenshots');
+ 'name' => 'screenshots',
+ 'title' => '_MI_WFD_SCREENSHOTS',
+ 'description' => '_MI_WFD_SCREENSHOTSDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => 'modules/wfdownloads/images/screenshots');
$modversion['config'][] = array(
- 'name' => 'catimage',
- 'title' => '_MI_WFD_CATEGORYIMG',
- 'description' => '_MI_WFD_CATEGORYIMGDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'text',
- 'default' => 'modules/wfdownloads/images/category');
+ 'name' => 'catimage',
+ 'title' => '_MI_WFD_CATEGORYIMG',
+ 'description' => '_MI_WFD_CATEGORYIMGDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => 'modules/wfdownloads/images/category');
$modversion['config'][] = array(
- 'name' => 'cat_imgwidth',
- 'title' => '_MI_WFD_CAT_IMGWIDTH',
- 'description' => '_MI_WFD_CAT_IMGWIDTHDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 50);
+ 'name' => 'cat_imgwidth',
+ 'title' => '_MI_WFD_CAT_IMGWIDTH',
+ 'description' => '_MI_WFD_CAT_IMGWIDTHDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 50);
$modversion['config'][] = array(
- 'name' => 'cat_imgheight',
- 'title' => '_MI_WFD_CAT_IMGHEIGHT',
- 'description' => '_MI_WFD_CAT_IMGHEIGHTDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 50);
+ 'name' => 'cat_imgheight',
+ 'title' => '_MI_WFD_CAT_IMGHEIGHT',
+ 'description' => '_MI_WFD_CAT_IMGHEIGHTDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 50);
$modversion['config'][] = array(
- 'name' => 'mainimagedir',
- 'title' => '_MI_WFD_MAINIMGDIR',
- 'description' => '_MI_WFD_MAINIMGDIRDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'text',
- 'default' => 'modules/wfdownloads/images');
+ 'name' => 'mainimagedir',
+ 'title' => '_MI_WFD_MAINIMGDIR',
+ 'description' => '_MI_WFD_MAINIMGDIRDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => 'modules/wfdownloads/images');
$modversion['config'][] = array(
- 'name' => 'enable_mirrors',
- 'title' => '_MI_WFD_MIRROR_ENABLE',
- 'description' => '_MI_WFD_MIRROR_ENABLEDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 1);
+ 'name' => 'enable_mirrors',
+ 'title' => '_MI_WFD_MIRROR_ENABLE',
+ 'description' => '_MI_WFD_MIRROR_ENABLEDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'enable_onlinechk',
- 'title' => '_MI_WFD_MIRROR_ENABLEONCHK',
- 'description' => '_MI_WFD_MIRROR_ENABLEONCHKDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 1);
+ 'name' => 'enable_onlinechk',
+ 'title' => '_MI_WFD_MIRROR_ENABLEONCHK',
+ 'description' => '_MI_WFD_MIRROR_ENABLEONCHKDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'download_minposts',
- 'title' => '_MI_WFD_DOWNLOADMINPOSTS',
- 'description' => '_MI_WFD_DOWNLOADMINPOSTSDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'download_minposts',
+ 'title' => '_MI_WFD_DOWNLOADMINPOSTS',
+ 'description' => '_MI_WFD_DOWNLOADMINPOSTSDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'upload_minposts',
- 'title' => '_MI_WFD_UPLOADMINPOSTS',
- 'description' => '_MI_WFD_UPLOADMINPOSTSDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'upload_minposts',
+ 'title' => '_MI_WFD_UPLOADMINPOSTS',
+ 'description' => '_MI_WFD_UPLOADMINPOSTSDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'maxfilesize',
- 'title' => '_MI_WFD_MAXFILESIZE',
- 'description' => '_MI_WFD_MAXFILESIZEDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 200000);
+ 'name' => 'maxfilesize',
+ 'title' => '_MI_WFD_MAXFILESIZE',
+ 'description' => '_MI_WFD_MAXFILESIZEDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 200000);
$modversion['config'][] = array(
- 'name' => 'uploaddir',
- 'title' => '_MI_WFD_UPLOADDIR',
- 'description' => '_MI_WFD_UPLOADDIRDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'text',
- 'default' => XOOPS_ROOT_PATH.'/uploads');
+ 'name' => 'uploaddir',
+ 'title' => '_MI_WFD_UPLOADDIR',
+ 'description' => '_MI_WFD_UPLOADDIRDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => XOOPS_ROOT_PATH.'/uploads');
$modversion['config'][] = array(
- 'name' => 'check_host',
- 'title' => '_MI_WFD_CHECKHOST',
- 'description' => '_MI_WFD_CHECKHOSTDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'check_host',
+ 'title' => '_MI_WFD_CHECKHOST',
+ 'description' => '_MI_WFD_CHECKHOSTDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'referers',
- 'title' => '_MI_WFD_REFERERS',
- 'description' => '_MI_WFD_REFERERSDSC',
- 'formtype' => 'textarea',
- 'valuetype' => 'array');
+ 'name' => 'referers',
+ 'title' => '_MI_WFD_REFERERS',
+ 'description' => '_MI_WFD_REFERERSDSC',
+ 'formtype' => 'textarea',
+ 'valuetype' => 'array');
$modversion['config'][] = array(
- 'name' => 'subcats',
- 'title' => '_MI_WFD_SUBCATS',
- 'description' => '_MI_WFD_SUBCATSDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'subcats',
+ 'title' => '_MI_WFD_SUBCATS',
+ 'description' => '_MI_WFD_SUBCATSDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'dateformat',
- 'title' => '_MI_WFD_DATEFORMAT',
- 'description' => '_MI_WFD_DATEFORMATDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'text',
- 'default' => 'D, d-M-Y');
+ 'name' => 'dateformat',
+ 'title' => '_MI_WFD_DATEFORMAT',
+ 'description' => '_MI_WFD_DATEFORMATDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => 'D, d-M-Y');
$modversion['config'][] = array(
- 'name' => 'autosummary',
- 'title' => '_MI_WFD_AUTOSUMMARY',
- 'description' => '_MI_WFD_AUTOSUMMARYDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 1);
+ 'name' => 'autosummary',
+ 'title' => '_MI_WFD_AUTOSUMMARY',
+ 'description' => '_MI_WFD_AUTOSUMMARYDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 1);
$modversion['config'][] = array(
- 'name' => 'autosumlength',
- 'title' => '_MI_WFD_AUTOSUMMARYLENGTH',
- 'description' => '_MI_WFD_AUTOSUMMARYLENGTHDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 200);
+ 'name' => 'autosumlength',
+ 'title' => '_MI_WFD_AUTOSUMMARYLENGTH',
+ 'description' => '_MI_WFD_AUTOSUMMARYLENGTHDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 200);
$modversion['config'][] = array(
- 'name' => 'showdisclaimer',
- 'title' => '_MI_WFD_SHOWDISCLAIMER',
- 'description' => '_MI_WFD_SHOWDISCLAIMERDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => 0);
+ 'name' => 'showdisclaimer',
+ 'title' => '_MI_WFD_SHOWDISCLAIMER',
+ 'description' => '_MI_WFD_SHOWDISCLAIMERDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0);
$modversion['config'][] = array(
- 'name' => 'disclaimer',
- 'title' => '_MI_WFD_DISCLAIMER',
- 'description' => '_MI_WFD_DISCLAIMERDSC',
- 'formtype' => 'textarea',
- 'valuetype' => 'text',
- 'default' => 'We have the right, but not the obligation to monitor and review submissions submitted by users, in the forums. We shall not be responsible for any of the content of these messages. We further reserve the right, to delete, move or edit submissions that the we, in its exclusive discretion, deems abusive, defamatory, obscene or in violation of any Copyright or Trademark laws or otherwise objectionable.');
+ 'name' => 'disclaimer',
+ 'title' => '_MI_WFD_DISCLAIMER',
+ 'description' => '_MI_WFD_DISCLAIMERDSC',
+ 'formtype' => 'textarea',
+ 'valuetype' => 'text',
+ 'default' => 'We have the right, but not the obligation to monitor and review submissions submitted by users, in the forums. We shall not be responsible for any of the content of these messages. We further reserve the right, to delete, move or edit submissions that the we, in its exclusive discretion, deems abusive, defamatory, obscene or in violation of any Copyright or Trademark laws or otherwise objectionable.');
$mo...
[truncated message content] |