| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to further convert collation in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting certain fields to a chosen collation, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
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 '';");
|
| 37 | 37 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '';");
|
| 38 | 38 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '';");
|
| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to further convert collation in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting certain fields to a chosen collation, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
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 '';");
|
| 37 | 37 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '';");
|
| 38 | 38 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '';");
|
| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to further convert collation in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting certain fields to a chosen collation, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
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 '';");
|
| 37 | 37 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '';");
|
| 38 | 38 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci NOT NULL DEFAULT '';");
|
| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to convert collation and engine type in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting to eFiction 3 Mod, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
// only if you installed the 'clean' future 3.5.9 version prior |
| 37 | 37 |
if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
|
| 38 | 38 |
dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
|
| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to further convert collation in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting certain fields to a chosen collation, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
// only if you installed the 'clean' future 3.5.9 version prior |
| 37 | 37 |
if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
|
| 38 | 38 |
dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
|
| ... | ... |
@@ -28,11 +28,11 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 28 | 28 |
|
| 29 | 29 |
// silly converted update script... just to further convert collation in some tables |
| 30 | 30 |
|
| 31 |
-// messy version check, starting with version 3.5.9 |
|
| 32 |
-if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 31 |
+// messy version check, starting with version 0.9.0 |
|
| 32 |
+if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 33 | 33 |
if($confirm == "yes") {
|
| 34 |
- // For converting certain fields to a chosen collation, starting with versions 3.5.9 |
|
| 35 |
- if($expVer[0] == 3 && ($expVer[1] == 5 || $expVer[1] >=6 && (!isset($expVer[2]) || $expVer[2] == 9 || $expVer[2] > 0))) {
|
|
| 34 |
+ // For converting certain fields to a chosen collation, starting with versions 0.9.0 |
|
| 35 |
+ if($expVer[0] == 0 && ($expVer[1] == 9 || $expVer[1] >=0 && (!isset($expVer[2]) || $expVer[2] == 0 || $expVer[2] > 0))) {
|
|
| 36 | 36 |
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 '';");
|
| 37 | 37 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_categories CHANGE `category` `category` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';");
|
| 38 | 38 |
dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_characters CHANGE `charname` `charname` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';");
|
| ... | ... |
@@ -26,7 +26,7 @@ |
| 26 | 26 |
if(!defined("_CHARSET")) exit( );
|
| 27 | 27 |
|
| 28 | 28 |
|
| 29 |
- $currentversion = "3.5.6"; |
|
| 29 |
+ $currentversion = "0.9.0"; |
|
| 30 | 30 |
|
| 31 | 31 |
$output .= "<div id=\"pagetitle\">"._VERSIONCHECK."</div>"; |
| 32 | 32 |
|
| ... | ... |
@@ -39,4 +39,4 @@ if(!defined("_CHARSET")) exit( );
|
| 39 | 39 |
else $output .= write_message (_UPTODATE); |
| 40 | 40 |
|
| 41 | 41 |
|
| 42 |
-?> |
|
| 43 | 42 |
\ No newline at end of file |
| 43 |
+?> |
| ... | ... |
@@ -134,7 +134,7 @@ include("../version.php");
|
| 134 | 134 |
|
| 135 | 135 |
//make a new TemplatePower object |
| 136 | 136 |
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> |
| 137 |
-<html><head><title>eFiction {$version} Install</title>
|
|
| 137 |
+<html><head><title>eFiction 3 Mod {$version} Install</title>
|
|
| 138 | 138 |
<style> |
| 139 | 139 |
a.pophelp{
|
| 140 | 140 |
position: relative; /* this is the key*/ |
| ... | ... |
@@ -178,10 +178,10 @@ $tpl->assignInclude("header", "./../default_tpls/header.tpl");
|
| 178 | 178 |
$tpl->assignInclude("footer", "./../default_tpls/footer.tpl");
|
| 179 | 179 |
$tpl->prepare(); |
| 180 | 180 |
$tpl->newBlock("header");
|
| 181 |
-$tpl->assign("sitename", "eFiction $version Install");
|
|
| 181 |
+$tpl->assign("sitename", "eFiction 3 Mod $version Install");
|
|
| 182 | 182 |
$tpl->gotoBlock("_ROOT");
|
| 183 | 183 |
$tpl->newBlock("footer");
|
| 184 |
-$tpl->assign("footer", "eFiction $version © 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
|
|
| 184 |
+$tpl->assign("footer", "eFiction 3 Mod $version © 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
|
|
| 185 | 185 |
$tpl->gotoBlock("_ROOT");
|
| 186 | 186 |
|
| 187 | 187 |
if (!isset($_GET['step'])) $_GET['step'] = 0; |
| ... | ... |
@@ -87,7 +87,7 @@ define ("_CONVERT_0900", "Convert back to Unicode 9.0");
|
| 87 | 87 |
define ("_CONVERT_1400", "Convert to Unicode 14.0");
|
| 88 | 88 |
define ("_COPYRIGHT", "Copyright Footer");
|
| 89 | 89 |
define ("_COUNTCATS", "Fix Category Counts");
|
| 90 |
-define ("_CURRENTVERSION", "The current version of eFiction is ");
|
|
| 90 |
+define ("_CURRENTVERSION", "The current version of eFiction 3 Mod is ");
|
|
| 91 | 91 |
define ("_CUSTPAGENOTE",
|
| 92 | 92 |
"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.
|
| 93 | 93 |
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 ("_RELEASEMESSAGE", "Hello, the admins of $sitename have opened your acco
|
| 217 | 217 |
define ("_REVDELETE", "Authors may delete reviews");
|
| 218 | 218 |
define ("_REVIEWSETTINGS", "Review Settings");
|
| 219 | 219 |
define ("_RULES", "Rules");
|
| 220 |
-define ("_RUNNINGVERSION", "You are currently running eFiction version ".$version.".");
|
|
| 220 |
+define ("_RUNNINGVERSION", "You are currently running eFiction 3 Mod version ".$version.".");
|
|
| 221 | 221 |
define ("_SAMEWINDOW", "Same Window");
|
| 222 | 222 |
define ("_SECURITYDELETE", "You have not deleted the install folder! Please do so immediately to prevent a security breach.");
|
| 223 | 223 |
define ("_SELF", "member selected");
|
| ... | ... |
@@ -316,6 +316,41 @@ elseif ($oldVersion[0] == 3 && $oldVersion[1] == 5 && $oldVersion[2] < 9) // 3. |
| 316 | 316 |
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>");
|
| 317 | 317 |
} |
| 318 | 318 |
|
| 319 |
+elseif ($oldVersion[0] == 3 && $oldVersion[1] == 5 && $oldVersion[2] < 10) // 3.5.9 -> Mod 0.9.0 |
|
| 320 |
+{
|
|
| 321 |
+ if ($confirm == "yes") |
|
| 322 |
+ {
|
|
| 323 |
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'setreg'")))
|
|
| 324 |
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `setreg` tinyint(1) NOT NULL DEFAULT '1' AFTER `multiplecats`");
|
|
| 325 |
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'rateguard'")))
|
|
| 326 |
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `rateguard` tinyint(1) NOT NULL DEFAULT '0' AFTER `rateonly`");
|
|
| 327 |
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'smtp_port'")))
|
|
| 328 |
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `smtp_port` varchar(5) NOT NULL DEFAULT ''");
|
|
| 329 |
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM ".TABLEPREFIX."fanfiction_settings LIKE 'smtp_secure'")))
|
|
| 330 |
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_settings` ADD `smtp_secure` varchar(3) NOT NULL DEFAULT ''");
|
|
| 331 |
+ if (!dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_name = 'convert' AND panel_title = 'Archive Conversion';"))) {
|
|
| 332 |
+ dbquery("UPDATE `".TABLEPREFIX."fanfiction_panels` SET panel_order = '12' WHERE panel_name = 'modules'");
|
|
| 333 |
+ 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')");
|
|
| 334 |
+ } |
|
| 335 |
+ |
|
| 336 |
+ dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_authors` CHANGE `password` `password` varchar(255) NOT NULL DEFAULT '0'");
|
|
| 337 |
+ |
|
| 338 |
+ $set_090 = do_version_check_090(); |
|
| 339 |
+ if ($set_090) |
|
| 340 |
+ {
|
|
| 341 |
+ $output .= write_error(_ERROR); // migration not confirmed -> DO NOT bump version |
|
| 342 |
+ } |
|
| 343 |
+ else |
|
| 344 |
+ {
|
|
| 345 |
+ $update = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET version = '".$version."' WHERE sitekey = '".SITEKEY."'");
|
|
| 346 |
+ if ($update) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 347 |
+ } |
|
| 348 |
+ } |
|
| 349 |
+ else if ($confirm == "no") $output .= write_message(_ACTIONCANCELLED); |
|
| 350 |
+ 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>");
|
|
| 351 |
+} |
|
| 352 |
+ |
|
| 353 |
+ |
|
| 319 | 354 |
else $output .= write_message(_ALREADYUPDATED); |
| 320 | 355 |
|
| 321 | 356 |
/* until database is fully fixed, not update efiction version */ |
| ... | ... |
@@ -443,6 +478,23 @@ function do_version_check_359() |
| 443 | 478 |
return $check_359; |
| 444 | 479 |
} |
| 445 | 480 |
|
| 481 |
+function do_version_check_090() |
|
| 482 |
+{
|
|
| 483 |
+ $check_090 = false; |
|
| 484 |
+ |
|
| 485 |
+ $required = array('rateguard', 'setreg', 'smtp_port', 'smtp_secure');
|
|
| 486 |
+ foreach ($required as $f) |
|
| 487 |
+ {
|
|
| 488 |
+ if (!dbassoc(dbquery("SHOW COLUMNS FROM " . TABLEPREFIX . "fanfiction_settings LIKE '{$f}'")))
|
|
| 489 |
+ {
|
|
| 490 |
+ $check_090 = "fanfiction_settings - field: " . $f; |
|
| 491 |
+ return $check_090; |
|
| 492 |
+ } |
|
| 493 |
+ } |
|
| 494 |
+ |
|
| 495 |
+ return $check_090; |
|
| 496 |
+} |
|
| 497 |
+ |
|
| 446 | 498 |
$tpl->assign("output", $output);
|
| 447 | 499 |
$tpl->printToScreen(); |
| 448 | 500 |
dbclose(); |