change version numbering scheme to eFiction 3 Mod 0.9.0
--- a/admin/convert_0520.php
+++ b/admin/convert_0520.php
@@ -28,11 +28,11 @@
// silly converted update script... just to further convert collation in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting certain fields to a chosen collation, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_authors CHANGE `penname` `penname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', CHANGE `realname` `realname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '';");
--- a/admin/convert_0900.php
+++ b/admin/convert_0900.php
@@ -28,11 +28,11 @@
// silly converted update script... just to further convert collation in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting certain fields to a chosen collation, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_authors CHANGE `penname` `penname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', CHANGE `realname` `realname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '';");
--- a/admin/convert_1400.php
+++ b/admin/convert_1400.php
@@ -28,11 +28,11 @@
// silly converted update script... just to further convert collation in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting certain fields to a chosen collation, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_authors CHANGE `penname` `penname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '', CHANGE `realname` `realname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '';");
--- a/admin/convert_mod.php
+++ b/admin/convert_mod.php
@@ -28,11 +28,11 @@
// silly converted update script... just to convert collation and engine type in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting to eFiction 3 Mod, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
// only if you installed the 'clean' future 3.5.9 version prior
if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
--- a/admin/convert_mod_0900.php
+++ b/admin/convert_mod_0900.php
@@ -28,11 +28,11 @@
// silly converted update script... just to further convert collation in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting certain fields to a chosen collation, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
// only if you installed the 'clean' future 3.5.9 version prior
if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
--- a/admin/convert_utf.php
+++ b/admin/convert_utf.php
@@ -28,11 +28,11 @@
// silly converted update script... just to further convert collation in some tables
-// messy version check, starting with version 3.5.9
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+// messy version check, starting with version 0.9.0
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
if($confirm == "yes") {
- // For converting certain fields to a chosen collation, starting with versions 3.5.9
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_authors CHANGE `penname` `penname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', CHANGE `realname` `realname` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';");
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';");
--- a/admin/versioncheck.php
+++ b/admin/versioncheck.php
@@ -26,7 +26,7 @@
if(!defined("_CHARSET")) exit( );
- $currentversion = "3.5.6";
+ $currentversion = "0.9.0";
$output .= "<div id=\"pagetitle\">"._VERSIONCHECK."</div>";
@@ -40,3 +40,4 @@
?>
+
--- a/install/install.php
+++ b/install/install.php
@@ -134,7 +134,7 @@
//make a new TemplatePower object
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
-<html><head><title>eFiction {$version} Install</title>
+<html><head><title>eFiction 3 Mod {$version} Install</title>
<style>
a.pophelp{
position: relative; /* this is the key*/
@@ -178,10 +178,10 @@
$tpl->assignInclude("footer", "./../default_tpls/footer.tpl");
$tpl->prepare();
$tpl->newBlock("header");
-$tpl->assign("sitename", "eFiction $version Install");
+$tpl->assign("sitename", "eFiction 3 Mod $version Install");
$tpl->gotoBlock("_ROOT");
$tpl->newBlock("footer");
-$tpl->assign("footer", "eFiction $version © 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
+$tpl->assign("footer", "eFiction 3 Mod $version © 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
$tpl->gotoBlock("_ROOT");
if (!isset($_GET['step'])) $_GET['step'] = 0;
--- a/languages/en_admin.php
+++ b/languages/en_admin.php
@@ -87,7 +87,7 @@
define ("_CONVERT_1400", "Convert to Unicode 14.0");
define ("_COPYRIGHT", "Copyright Footer");
define ("_COUNTCATS", "Fix Category Counts");
-define ("_CURRENTVERSION", "The current version of eFiction is ");
+define ("_CURRENTVERSION", "The current version of eFiction 3 Mod is ");
define ("_CUSTPAGENOTE",
"The name you assign to your custom page will be the {NAME_link} variable for you to use in your skins. The script will append \"_link\" to the name to help prevent naming conflicts with other variables. The title will be the title of the page.
For the URL of your custom page, you may use either viewpage.php?id=ID or viewpage.php?page=NAME where ID is the ID number of the page or NAME is the name of the page. <p><strong>Note:</strong> The name for your page should contain letters, numbers, and the underscore character ONLY.</p>");
@@ -217,7 +217,7 @@
define ("_REVDELETE", "Authors may delete reviews");
define ("_REVIEWSETTINGS", "Review Settings");
define ("_RULES", "Rules");
-define ("_RUNNINGVERSION", "You are currently running eFiction version ".$version.".");
+define ("_RUNNINGVERSION", "You are currently running eFiction 3 Mod version ".$version.".");
define ("_SAMEWINDOW", "Same Window");
define ("_SECURITYDELETE", "You have not deleted the install folder! Please do so immediately to prevent a security breach.");
define ("_SELF", "member selected");
--- a/update.php
+++ b/update.php
@@ -316,6 +316,41 @@
else $output .= write_message("Are you ready to update? <a href='update.php?confirm=yes'>"._YES."</a> "._OR." <a href='update.php?confirm=no'>"._NO."</a>");
}
+elseif ($oldVersion[0] == 3 && $oldVersion[1] == 5 && $oldVersion[2] < 10) // 3.5.9 -> Mod 0.9.0
+{
+ if ($confirm == "yes")
+ {
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'rateguard'")))
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `rateguard` tinyint(1) NOT NULL DEFAULT '0' AFTER `rateonly`");
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'smtp_port'")))
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `smtp_port` varchar(5) NOT NULL DEFAULT ''");
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'smtp_secure'")))
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `smtp_secure` varchar(3) NOT NULL DEFAULT ''");
+ if (!dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_name = 'convert' AND panel_title = 'Archive Conversion';"))) {
+ dbquery("UPDATE `".TABLEPREFIX."fanfiction_panels` SET panel_order = '12' WHERE panel_name = 'modules'");
+ dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels`(`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_hidden`, `panel_type`, `panel_order`) VALUES( 'convert', 'Archive Conversion', '', '1', '0', 'A', '11')");
+ }
+
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_authors` CHANGE `password` `password` varchar(255) NOT NULL DEFAULT '0'");
+
+ $set_090 = do_version_check_090();
+ if ($set_090)
+ {
+ $output .= write_error(_ERROR); // migration not confirmed -> DO NOT bump version
+ }
+ else
+ {
+ $update = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET version = '".$version."' WHERE sitekey = '".SITEKEY."'");
+ if ($update) $output .= write_message(_ACTIONSUCCESSFUL);
+ }
+ }
+ else if ($confirm == "no") $output .= write_message(_ACTIONCANCELLED);
+ else $output .= write_message("Are you ready to update? <a href='update.php?confirm=yes'>"._YES."</a> "._OR." <a href='update.php?confirm=no'>"._NO."</a>");
+}
+
+
else $output .= write_message(_ALREADYUPDATED);
/* until database is fully fixed, not update efiction version */
@@ -443,6 +478,23 @@
return $check_359;
}
+function do_version_check_090()
+{
+ $check_090 = false;
+
+ $required = array('rateguard', 'setreg', 'smtp_port', 'smtp_secure');
+ foreach ($required as $f)
+ {
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM " . TABLEPREFIX . "fanfiction_settings LIKE '{$f}'")))
+ {
+ $check_090 = "fanfiction_settings - field: " . $f;
+ return $check_090;
+ }
+ }
+
+ return $check_090;
+}
+
$tpl->assign("output", $output);
$tpl->printToScreen();
dbclose();
--- a/version.php
+++ b/version.php
@@ -1,4 +1,4 @@
<?php
if(!defined("_CHARSET")) exit( );
-$version = "3.5.9";
+$version = "0.9.0";