This commit is contained in:
kaetemi 2014-09-03 06:08:08 +02:00
parent d148e70fb4
commit 3d4cf1e6ec
3 changed files with 15 additions and 13 deletions

View file

@ -248,3 +248,5 @@ code/nel/tools/build_gamedata/processes/ai_wmap/ai_build_wmap.cfg
code/nel/tools/build_gamedata/processes/sheets/sheets_packer.cfg code/nel/tools/build_gamedata/processes/sheets/sheets_packer.cfg
code/nel/tools/build_gamedata/processes/rbank/build_rbank.cfg code/nel/tools/build_gamedata/processes/rbank/build_rbank.cfg
code/nel/tools/build_gamedata/processes/zone/debug_zone_dependencies.cfg code/nel/tools/build_gamedata/processes/zone/debug_zone_dependencies.cfg
code/web/public_php/config.php
code/web/public_php/is_installed

View file

@ -58,7 +58,7 @@ class Querycache{
*/ */
public function update(){ public function update(){
$dbl = new DBLayer("lib"); $dbl = new DBLayer("lib");
$dbl->update("ams_querycache", Array('type' => $this->getType(), 'query' => $this->getQuery(), 'db' => $this->getDb(), "SID=$this->getSID()" ); $dbl->update("ams_querycache", Array('type' => $this->getType(), 'query' => $this->getQuery(), 'db' => $this->getDb(), "SID=$this->getSID()" ));
} }
////////////////////////////////////////////Getters//////////////////////////////////////////////////// ////////////////////////////////////////////Getters////////////////////////////////////////////////////

View file

@ -73,7 +73,7 @@ function update_database_structure($continue_r, $con, $file) {
} else { } else {
if (mysqli_multi_query($con, $sql)) { if (mysqli_multi_query($con, $sql)) {
printalert("success", "Database structure updated using <em>" . $file . "</em>"); printalert("success", "Database structure updated using <em>" . $file . "</em>");
while (mysqli_next_result($con)) { while (mysqli_more_results($con) && mysqli_next_result($con)) {
// no-op // no-op
} }
} else { } else {
@ -169,17 +169,17 @@ function update_database_structure($continue_r, $con, $file) {
$continue = false; $continue = false;
} else { } else {
$cwd = getcwd(); $cwd = getcwd();
$config = str_replace("%privatePhpDirectory%", realpath($cwd . "/" . $_POST["privatePhpDirectory"]), $config); $config = str_replace("%privatePhpDirectory%", addslashes(realpath($cwd . "/" . $_POST["privatePhpDirectory"])), $config);
$config = str_replace("%publicPhpDirectory%", realpath($cwd), $config); $config = str_replace("%publicPhpDirectory%", addslashes(realpath($cwd)), $config);
$config = str_replace("%sqlHostname%", $_POST["sqlHostname"], $config); $config = str_replace("%sqlHostname%", addslashes($_POST["sqlHostname"]), $config);
$config = str_replace("%sqlUsername%", $_POST["sqlUsername"], $config); $config = str_replace("%sqlUsername%", addslashes($_POST["sqlUsername"]), $config);
$config = str_replace("%sqlPassword%", $_POST["sqlPassword"], $config); $config = str_replace("%sqlPassword%", addslashes($_POST["sqlPassword"]), $config);
$config = str_replace("%nelDatabase%", $_POST["nelDatabase"], $config); $config = str_replace("%nelDatabase%", addslashes($_POST["nelDatabase"]), $config);
$config = str_replace("%toolDatabase%", $_POST["toolDatabase"], $config); $config = str_replace("%toolDatabase%", addslashes($_POST["toolDatabase"]), $config);
$config = str_replace("%amsDatabase%", $_POST["amsDatabase"], $config); $config = str_replace("%amsDatabase%", addslashes($_POST["amsDatabase"]), $config);
$config = str_replace("%amsLibDatabase%", $_POST["amsLibDatabase"], $config); $config = str_replace("%amsLibDatabase%", addslashes($_POST["amsLibDatabase"]), $config);
$config = str_replace("%amsAdminUsername%", $_POST["amsAdminUsername"], $config); $config = str_replace("%amsAdminUsername%", addslashes($_POST["amsAdminUsername"]), $config);
$config = str_replace("%amsAdminPassword%", $_POST["amsAdminPassword"], $config); $config = str_replace("%amsAdminPassword%", addslashes($_POST["amsAdminPassword"]), $config);
if (file_put_contents("config.php", $config)) { if (file_put_contents("config.php", $config)) {
printalert("success", "Generated <em>config.php</em>"); printalert("success", "Generated <em>config.php</em>");
} else { } else {