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; $loadedSettings[$row->settingName] = $row->settingValue;
settype($loadedSettings[$row->settingName], gettype($scriptSettings[$row->settingName])); settype($loadedSettings[$row->settingName], gettype($scriptSettings[$row->settingName]));
} }
$result->close(); $result->free();
if (!$loadedSettings) { if (!$loadedSettings) {
return true; return true;
} }

View File

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

View File

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

View File

@ -114,7 +114,7 @@ class PlayerDataManager {
while ($row = $result->fetch_object()) { while ($row = $result->fetch_object()) {
$this->metaData[$row->class . $row->dataName] = $row; $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(); $row = $result->fetch_object();
$result->close(); $result->free();
if (!isset($row)) { if (!isset($row)) {
return null; return null;
@ -476,7 +476,7 @@ class PlayerManager implements CallbackListener, TimerListener {
} }
$row = $result->fetch_object(); $row = $result->fetch_object();
$result->close(); $result->free();
if (!isset($row)) { if (!isset($row)) {
return null; return null;

View File

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

View File

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