From ee87e090ea9d92096ac733ad51e1f77cc6a564c3 Mon Sep 17 00:00:00 2001 From: ruan Date: Fri, 15 Jul 2016 10:29:43 +0200 Subject: [PATCH] Refactor --- bans.php | 4 ++-- history.php | 2 +- inc/page.php | 4 ++-- info.php | 2 +- kicks.php | 4 ++-- mutes.php | 4 ++-- warnings.php | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bans.php b/bans.php index e7c4cbc..ad48c9b 100644 --- a/bans.php +++ b/bans.php @@ -2,9 +2,9 @@ require_once './inc/page.php'; $page = new Page("bans"); -$page->print_title(); -$page->print_page_header(); +$page->print_title(); +$page->print_header(); $page->print_check_form(); diff --git a/history.php b/history.php index d9097af..cebfa41 100644 --- a/history.php +++ b/history.php @@ -84,7 +84,7 @@ if ($staffhistory) { $page->print_title(); -$page->print_page_header(); +$page->print_header(); $from = null; $from_title = null; diff --git a/inc/page.php b/inc/page.php index acc4991..36376c3 100644 --- a/inc/page.php +++ b/inc/page.php @@ -346,7 +346,7 @@ class Page { echo ""; } - function print_page_header($container_start = true) { + function print_header($container_start = true) { $title = $this->title; if ($container_start) { echo '
'; @@ -372,10 +372,10 @@ class Page { } function print_pager($total = -1, $args = "", $prevargs = "") { + if (!$this->settings->show_pager) return; $table = $this->table; $page = $this->name . ".php"; - if (!$this->settings->show_pager) return; if ($total === -1) { $result = $this->conn->query("SELECT COUNT(*) AS count FROM $table")->fetch(PDO::FETCH_ASSOC); $total = $result['count']; diff --git a/info.php b/info.php index 200053d..5495d42 100644 --- a/info.php +++ b/info.php @@ -156,7 +156,7 @@ if ($st->execute(array($id))) { $page->name .= "Permanent"; } } - $page->print_page_header(); + $page->print_header(); $page->table_begin(); $map = $info->basic_info($row, $player_name); diff --git a/kicks.php b/kicks.php index 8a176c3..8623862 100644 --- a/kicks.php +++ b/kicks.php @@ -2,9 +2,9 @@ require_once './inc/page.php'; $page = new Page("kicks"); -$page->print_title(); -$page->print_page_header(); +$page->print_title(); +$page->print_header(); $page->print_check_form(); diff --git a/mutes.php b/mutes.php index fe08f90..c751577 100644 --- a/mutes.php +++ b/mutes.php @@ -2,9 +2,9 @@ require_once './inc/page.php'; $page = new Page("mutes"); -$page->print_title(); -$page->print_page_header(); +$page->print_title(); +$page->print_header(); $page->print_check_form(); diff --git a/warnings.php b/warnings.php index f1e5491..bc29e03 100644 --- a/warnings.php +++ b/warnings.php @@ -2,9 +2,9 @@ require_once './inc/page.php'; $page = new Page("warnings"); -$page->print_title(); -$page->print_page_header(); +$page->print_title(); +$page->print_header(); $page->print_check_form();