replaced mysqli_result::close() by ::free()

This commit is contained in:
Steffen Schröder 2014-05-18 23:34:47 +02:00
parent a6d9753cee
commit cb5ad4e077
7 changed files with 13 additions and 14 deletions

View File

@ -129,7 +129,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
$loadedSettings[$row->settingName] = $row->settingValue;
settype($loadedSettings[$row->settingName], gettype($scriptSettings[$row->settingName]));
}
$result->close();
$result->free();
if (!$loadedSettings) {
return true;
}

View File

@ -118,7 +118,7 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
settype($serverSettings[$row->settingName], $oldType);
$applySettings = true;
}
$result->close();
$result->free();
if (!$applySettings) {
return true;
}
@ -203,8 +203,7 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
if (is_bool($value)) {
// Boolean checkbox
$quad = new Quad();
$quad->setX($width / 2 * 0.46);
$quad->setZ(-0.01);
$quad->setPosition($width * 0.23, 0, -0.01);
$quad->setSize(4, 4);
$checkBox = new CheckBox(self::ACTION_PREFIX_SETTING . $name, $value, $quad);
@ -214,7 +213,7 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
$entry = new Entry();
$settingFrame->add($entry);
$entry->setStyle(Label_Text::STYLE_TextValueSmall);
$entry->setX($width / 2 * 0.46);
$entry->setX($width * 0.23);
$entry->setTextSize(1);
$entry->setSize($width * 0.48, $settingHeight * 0.9);
$entry->setName(self::ACTION_PREFIX_SETTING . $name);

View File

@ -140,7 +140,7 @@ class Database implements TimerListener {
}
$count = $result->num_rows;
if ($count <= 0) {
$result->close();
$result->free();
return true;
}
$optimizeQuery = "OPTIMIZE TABLE ";
@ -153,7 +153,7 @@ class Database implements TimerListener {
}
$index++;
}
$result->close();
$result->free();
$optimizeQuery .= ";";
$this->mysqli->query($optimizeQuery);
if ($this->mysqli->error) {

View File

@ -114,7 +114,7 @@ class PlayerDataManager {
while ($row = $result->fetch_object()) {
$this->metaData[$row->class . $row->dataName] = $row;
}
$result->close();
$result->free();
}
/**

View File

@ -391,7 +391,7 @@ class PlayerManager implements CallbackListener, TimerListener {
}
$row = $result->fetch_object();
$result->close();
$result->free();
if (!isset($row)) {
return null;
@ -476,7 +476,7 @@ class PlayerManager implements CallbackListener, TimerListener {
}
$row = $result->fetch_object();
$result->close();
$result->free();
if (!isset($row)) {
return null;

View File

@ -176,7 +176,7 @@ class Server implements CallbackListener {
while ($row = $result->fetch_object()) {
array_push($servers, $row);
}
$result->close();
$result->free();
return $servers;
}

View File

@ -124,7 +124,7 @@ class StatisticManager {
while ($row = $result->fetch_object()) {
$this->stats[$row->name] = $row;
}
$result->close();
$result->free();
// TODO: own model class
@ -208,7 +208,7 @@ class StatisticManager {
}
arsort($stats);
$result->close();
$result->free();
return $stats;
}
@ -488,7 +488,7 @@ class StatisticManager {
$row = $result->fetch_object();
$result->close();
$result->free();
return $row->value;
}