mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Close cursor after query
This commit is contained in:
parent
e693ba8d7f
commit
40b132a686
@ -19,6 +19,7 @@ class Check {
|
|||||||
$uuid = $row['uuid'];
|
$uuid = $row['uuid'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
if (!isset($uuid)) {
|
if (!isset($uuid)) {
|
||||||
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||||
$this->println("$name " . $page->lang->check_notjoin);
|
$this->println("$name " . $page->lang->check_notjoin);
|
||||||
@ -58,6 +59,7 @@ class Check {
|
|||||||
$this->println("Banned permanently.");
|
$this->println("Banned permanently.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
*/
|
*/
|
||||||
} catch (PDOException $ex) {
|
} catch (PDOException $ex) {
|
||||||
Settings::handle_error($page->settings, $ex);
|
Settings::handle_error($page->settings, $ex);
|
||||||
|
@ -20,6 +20,7 @@ class History {
|
|||||||
if ($count_st->execute() && ($row = $count_st->fetch()) !== null) {
|
if ($count_st->execute() && ($row = $count_st->fetch()) !== null) {
|
||||||
$counts[$type] = $row['count'];
|
$counts[$type] = $row['count'];
|
||||||
}
|
}
|
||||||
|
$count_st->closeCursor();
|
||||||
$sel = $page->get_selection($table);
|
$sel = $page->get_selection($table);
|
||||||
|
|
||||||
$limit = $page->settings->limit_per_page;
|
$limit = $page->settings->limit_per_page;
|
||||||
@ -37,6 +38,7 @@ class History {
|
|||||||
array_push($array, $row);
|
array_push($array, $row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$st->closeCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -135,6 +135,8 @@ class Page {
|
|||||||
|
|
||||||
$st->execute();
|
$st->execute();
|
||||||
|
|
||||||
|
$st->closeCursor();
|
||||||
|
|
||||||
return $st;
|
return $st;
|
||||||
} catch (PDOException $ex) {
|
} catch (PDOException $ex) {
|
||||||
Settings::handle_error($this->settings, $ex);
|
Settings::handle_error($this->settings, $ex);
|
||||||
@ -224,6 +226,7 @@ class Page {
|
|||||||
$this->uuid_name_cache[$uuid] = $banner;
|
$this->uuid_name_cache[$uuid] = $banner;
|
||||||
return $banner;
|
return $banner;
|
||||||
}
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
$this->uuid_name_cache[$uuid] = null;
|
$this->uuid_name_cache[$uuid] = null;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
3
info.php
3
info.php
@ -53,7 +53,7 @@ abstract class Info {
|
|||||||
class BanInfo extends Info {
|
class BanInfo extends Info {
|
||||||
function basic_info($row, $player_name) {
|
function basic_info($row, $player_name) {
|
||||||
$page = $this->page;
|
$page = $this->page;
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$page->lang->info_banned_player => $this->punished_avatar($player_name, $row),
|
$page->lang->info_banned_player => $this->punished_avatar($player_name, $row),
|
||||||
$page->lang->info_banned_by => $this->moderator_avatar($row),
|
$page->lang->info_banned_by => $this->moderator_avatar($row),
|
||||||
@ -179,3 +179,4 @@ if ($st->execute(array($id))) {
|
|||||||
|
|
||||||
$page->print_footer();
|
$page->print_footer();
|
||||||
}
|
}
|
||||||
|
$st->closeCursor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user