mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-05 04:14:22 +00:00
fix: installation will not be allowed if old data are still in DB
This commit is contained in:
@@ -48,6 +48,7 @@ martinambrus changes:
|
||||
36. fixed OK message in Admin when resetting All Players' PLUS
|
||||
37. new config option to show Support messages in Admin's mailbox
|
||||
38. new feature: allowing messages to be sent as Support from in-game when user is Admin + it's allowed in config
|
||||
39. not allowing installation if old data are still in database to prevent multiple worlds generation and game misbehavior
|
||||
|
||||
|
||||
Shadowss changes:
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
include ("../../GameEngine/Database.php");
|
||||
include ("../../GameEngine/Admin/database.php");
|
||||
|
||||
|
||||
$conn = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($conn, SQL_DB);
|
||||
|
||||
// check if we don't already have world data
|
||||
$data_exist = $database->query_return("SELECT * FROM " . TB_PREFIX . "odata LIMIT 1");
|
||||
if (count($data_exist)) {
|
||||
header("Location: ../index.php?s=6&err=1");
|
||||
exit;
|
||||
}
|
||||
|
||||
$database->populateOasisdata();
|
||||
$database->populateOasis();
|
||||
$database->populateOasisUnits2();
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
|
||||
include("database.php");
|
||||
|
||||
// check if we don't already have world data
|
||||
$data_exist = $database->query_return("SELECT * FROM " . TB_PREFIX . "wdata LIMIT 1");
|
||||
if (count($data_exist)) {
|
||||
header("Location: ../index.php?s=3&err=1");
|
||||
exit;
|
||||
}
|
||||
|
||||
$xyas=(1+(2*WORLD_MAX));
|
||||
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
#################################################################################
|
||||
|
||||
if(isset($_GET['c']) && $_GET['c'] == 1) {
|
||||
echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating wdata. Check configuration or file.</span></div><br>";
|
||||
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Error creating wdata. Check configuration or file.</span></div><br><br>";
|
||||
}
|
||||
|
||||
if(isset($_GET['err']) && $_GET['err'] == 1) {
|
||||
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Existing World Data found in the database! Please clear your database before continuing.</span></div><br /><br />";
|
||||
}
|
||||
?>
|
||||
<form action="process.php" method="post" id="dataform">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// TRAVIANX //
|
||||
// Only for advanced users, do not edit if you dont know what are you doing! //
|
||||
@@ -6,6 +6,11 @@
|
||||
// - TravianX = Travian Clone Project - //
|
||||
// DO NOT REMOVE COPYRIGHT NOTICE! //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if(isset($_GET['err']) && $_GET['err'] == 1) {
|
||||
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Existing Oasis data found in the database! Please clear the 'odata' table before continuing.</span></div><br /><br />";
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="include/oasis.php" method="post" id="dataform">
|
||||
<p>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
- cannot delete a single medal in admin
|
||||
- add back buttons to Admin where there are not (like editing a user)
|
||||
- disallow installation if existing data are in place, or world map would end up screwed and villages not showing (because there can be multiple villages/oasis generated for one square then)
|
||||
- quest image should glow red when new task is ready to be read (now it's only red when page is refreshed)
|
||||
- check aliance invitation accepting - apparently it doesn't work too well on first try?
|
||||
- normalize forum tables - varchar is used for numeric values and is joined with int field
|
||||
@@ -10,4 +7,5 @@
|
||||
- should random attacks from Natars when building Wonder of the World be unit-less?
|
||||
- send forum replies in a forum where a user is active also to that user's mailbox
|
||||
- make an option for admin to be raidable (in profile?)
|
||||
- finish parts in Admin that are unfinished (mostly delete -X- buttons and Alliance settings)
|
||||
- add PayPal listener to verify gold transactions imediatelly
|
||||
Reference in New Issue
Block a user