diff --git a/home.php b/home.php index 8a2d0e42..d499283c 100644 --- a/home.php +++ b/home.php @@ -170,7 +170,7 @@ function ogpHome() { if(isset($settings['check_expiry_by']) and $settings['check_expiry_by'] == "once_logged_in") { - if($db->check_expire_date($_SESSION['user_id'], is_numeric($server_home['home_id']) ? (int)$server_home['home_id'] : strtotime($server_home['home_id']))) + if($db->check_expire_date($_SESSION['user_id'], $server_home['home_id'])) continue; } $servers_by_game_name["$server_home[game_name]"][] = $server_home; diff --git a/includes/database_mysqli.php b/includes/database_mysqli.php index 9db262df..f3f5e289 100644 --- a/includes/database_mysqli.php +++ b/includes/database_mysqli.php @@ -289,7 +289,7 @@ class OGPDatabaseMySQL extends OGPDatabase return $results; } - public function get_user_count((array)$search_field) { + public function get_user_count($search_field) { $search_field = $this->realEscapeSingle($search_field); $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."users "; @@ -310,7 +310,7 @@ class OGPDatabaseMySQL extends OGPDatabase return $this->listQuery($query); } - public function get_group_count((array)$search_field){ + public function get_group_count($search_field){ $search_field = $this->realEscapeSingle($search_field); $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."user_group_info "; @@ -3392,7 +3392,7 @@ class OGPDatabaseMySQL extends OGPDatabase $this->query("INSERT INTO OGP_DB_PREFIXlogger (date, user_id, ip, message) VALUE (FROM_UNIXTIME(UNIX_TIMESTAMP(), '%d-%m-%Y %H:%i:%s'), $user_id, '$client_ip', '$message');"); } - public function get_logger_count((array)$search_field) { + public function get_logger_count($search_field) { $search_field = $this->realEscapeSingle($search_field); $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."logger "; diff --git a/modules/administration/watch_logger.php b/modules/administration/watch_logger.php index 3fb5fc78..0df67127 100644 --- a/modules/administration/watch_logger.php +++ b/modules/administration/watch_logger.php @@ -139,7 +139,7 @@ function exec_ogp_module() { echo "\n"; echo "\n"; echo "\n"; - $count_logs = $db->get_logger_count((array)$search_field); + $count_logs = $db->get_logger_count($search_field); if (isset($_GET['search']) && !empty($_GET['search'])) { $uri = '?m=administration&p=watch_logger&search='.$_GET['search'].'&limit='.$l.'&page='; @@ -149,4 +149,3 @@ function exec_ogp_module() { echo paginationPages($count_logs[0]['total'], $p, $l, $uri, 3, 'watchLogger'); } ?> - diff --git a/modules/news/include/library/HTMLPurifier/AttrDef/URI.php b/modules/news/include/library/HTMLPurifier/AttrDef/URI.php index 49bb724b..c1cd8977 100644 --- a/modules/news/include/library/HTMLPurifier/AttrDef/URI.php +++ b/modules/news/include/library/HTMLPurifier/AttrDef/URI.php @@ -63,7 +63,7 @@ class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef do { // generic validation - $result = $uri->validate($config, is_numeric($context) ? (int)$context : strtotime($context)); + $result = $uri->validate($config, $context); if (!$result) { break; } diff --git a/modules/news/include/library/HTMLPurifier/URI.php b/modules/news/include/library/HTMLPurifier/URI.php index 5146cc03..9c5be39d 100644 --- a/modules/news/include/library/HTMLPurifier/URI.php +++ b/modules/news/include/library/HTMLPurifier/URI.php @@ -105,7 +105,7 @@ class HTMLPurifier_URI * @param HTMLPurifier_Context $context * @return bool True if validation/filtering succeeds, false if failure */ - public function validate($config, is_numeric($context) ? (int)$context : strtotime($context)) + public function validate($config, $context) { // ABNF definitions from RFC 3986 $chars_sub_delims = '!$&\'()*+,;='; diff --git a/modules/user_admin/show_groups.php b/modules/user_admin/show_groups.php index d19734ec..5e9798d7 100644 --- a/modules/user_admin/show_groups.php +++ b/modules/user_admin/show_groups.php @@ -149,7 +149,7 @@ function exec_ogp_module() { echo ""; if ($db->isAdmin($_SESSION['user_id'])) - $count_groups = $db->get_group_count((array)$search_field); + $count_groups = $db->get_group_count($search_field); else $count_groups = $db->getUserGroupList_count($_SESSION['user_id'],$search_field); @@ -161,4 +161,4 @@ function exec_ogp_module() { } echo paginationPages($count_groups[0]['total'], $page_user, $limit_user, $uri, 3, 'userGroups'); } -?> \ No newline at end of file +?> diff --git a/modules/user_admin/show_users.php b/modules/user_admin/show_users.php index 27ab3f9d..b1a877a7 100644 --- a/modules/user_admin/show_users.php +++ b/modules/user_admin/show_users.php @@ -131,7 +131,7 @@ function exec_ogp_module() { } echo '
'; - $count_users = $db->get_user_count((array)$search_field); + $count_users = $db->get_user_count($search_field); if(isset($_GET['search']) && !empty($_GET['search'])){ $uri = '?m=user_admin&search='.$_GET['search'].'&limit='.$limit_user.'&page=';