From 7861292449b667cf16e5daa5c613207a0eab6599 Mon Sep 17 00:00:00 2001 From: Stefan Brannfjell Date: Sat, 8 Mar 2014 15:31:47 +0100 Subject: [PATCH] Some query optimisations --- README.md | 7 +++---- characterprofile.php | 7 +++---- config.php | 12 ++++++------ credits.php | 14 ++++++++------ engine/database/connect.php | 13 +++++++++++++ engine/function/users.php | 26 ++++---------------------- engine/init.php | 3 +++ layout/footer.php | 4 ++-- layout/overall/footer.php | 3 +++ layout/widgets/serverinfo.php | 3 ++- login.php | 2 +- 11 files changed, 48 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 7622638..128ed54 100644 --- a/README.md +++ b/README.md @@ -44,17 +44,16 @@ This will show you the rest of the instructions as well as the mysql schema. ### This is the developement repository for the Znote AAC project. # TODO 1.5: -* TFS 1.0 House system -* TFS 1.0 Guilds * TFS 1.0 LUA scripts (Shop system, first items) # TODO 1.6: * Recovery key * Email system -* Character auction house for shop points +* Character auction for shop points * Database shop offers * Manage shop offers without touching code * Live TFS 1.0 integration # Removed from TODO: -* TFS 1.0 Livestream (Since Hani rejected to release sources for this I have no intention of adding support for it). \ No newline at end of file +* TFS 1.0 Livestream +Reason: Not open source, not legally available on any official free TFS distributions. \ No newline at end of file diff --git a/characterprofile.php b/characterprofile.php index 73e7bb3..2c01f1a 100644 --- a/characterprofile.php +++ b/characterprofile.php @@ -4,9 +4,8 @@ if ($config['log_ip']) { } if (isset($_GET['name']) === true && empty($_GET['name']) === false) { $name = $_GET['name']; - - if (user_character_exist($name)) { - $user_id = user_character_id($name); + $user_id = user_character_exist($name); + if ($user_id !== false) { if ($config['TFSVersion'] == 'TFS_10') { $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin'); $profile_data['online'] = user_is_online_10($user_id); @@ -22,7 +21,6 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) { ?> -

Profile: