From f9b76fc289e65b976560b4d5638c93f19ee2fc09 Mon Sep 17 00:00:00 2001 From: Oliver Brendel Date: Fri, 6 Sep 2024 12:52:03 +0200 Subject: [PATCH] bugfixes + installer bugfix (didn't start) --- common.php | 3 ++- create.php | 1 + creatures.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index 9358246..80f5078 100644 --- a/common.php +++ b/common.php @@ -146,7 +146,8 @@ // http://php.net/manual/en/features.persistent-connections.php // // Line is important for installer only, step 5 -$link = db_pconnect($DB_HOST, $DB_USER, $DB_PASS); +if (defined("IS_INSTALLER") && httpget('stage')>4) + $link = db_pconnect($DB_HOST, $DB_USER, $DB_PASS); if (!defined("DB_NODB")) { $link = db_connect($DB_HOST, $DB_USER, $DB_PASS); diff --git a/create.php b/create.php index 90c4370..43b0ba9 100644 --- a/create.php +++ b/create.php @@ -93,6 +93,7 @@ $alert = translate_mail(array("Email change request validated by link to %s from %s originally for login '%s'.",$replaceemail,$row['emailaddress'],$row['login']),0); while ($row2 = db_fetch_assoc($result2)) { $msg = translate_mail(array("This message is generated as a result of an email change to a superuser account. Log Follows:`n`n%s",$alert),0); + if (db_affected_rows()>0) $noemail = true; else $noemail = false; systemmail($row2['acctid'],$subj,$msg,0,$noemail); } } diff --git a/creatures.php b/creatures.php index 01ec6ac..5af6ca9 100644 --- a/creatures.php +++ b/creatures.php @@ -13,6 +13,7 @@ $creaturetats=array(); $creatureexp=14; $creaturegold=36; +$creaturedefense=0; for ($i=1;$i<=(getsetting('maxlevel',15)+4);$i++) { //apply algorithmic creature generation. $level=$i;