diff --git a/TODO b/TODO index 76111ab9..6d842c2a 100644 --- a/TODO +++ b/TODO @@ -27,6 +27,7 @@ * remove tibiacom template, and include it as a plugin 2.0 + * remove gesior backward support * remove compat functions * remove $template['link_*'] * folder restructure: diff --git a/index.php b/index.php index 3854c227..a8a9c832 100644 --- a/index.php +++ b/index.php @@ -423,18 +423,18 @@ else die('ERROR: Cannot load template.'); } -$super = superAdmin(); echo '' . "\n"; -if($super) { +if(superAdmin()) { echo ''; echo PHP_EOL . ''; if(function_exists('memory_get_peak_usage')) { echo PHP_EOL . ''; } + + if($config['database_log']) { + echo PHP_EOL . ''; + } } -if($config['database_log'] && $super) { - echo PHP_EOL . ''; -} $hooks->trigger(HOOK_FINISH); ?> diff --git a/system/libs/pot/OTS_Group.php b/system/libs/pot/OTS_Group.php index a7c3bbe1..d0c9a87e 100644 --- a/system/libs/pot/OTS_Group.php +++ b/system/libs/pot/OTS_Group.php @@ -490,7 +490,8 @@ class OTS_Group extends OTS_Row_DAO implements IteratorAggregate, Countable // creates filter $filter = new OTS_SQLFilter(); $filter->compareField('group_id', (int) $this->data['id']); - if($this->db->hasColumn('players', 'deletion')) + global $db; + if($db->hasColumn('players', 'deletion')) $filter->compareField('deletion', 0); else $filter->compareField('deleted', 0); diff --git a/system/pages/admin/players.php b/system/pages/admin/players.php index 6d5d875e..75544c7e 100644 --- a/system/pages/admin/players.php +++ b/system/pages/admin/players.php @@ -399,7 +399,7 @@ $account = $player->getAccount(); Head: Legs: Type: - hasColumn('lookaddons', 'players')): ?> + hasColumn('players', 'lookaddons')): ?> Addons: @@ -520,7 +520,7 @@ $account = $player->getAccount(); - + diff --git a/system/pages/forum/show_thread.php b/system/pages/forum/show_thread.php index 119438e2..462dfa09 100644 --- a/system/pages/forum/show_thread.php +++ b/system/pages/forum/show_thread.php @@ -38,7 +38,7 @@ if(isset($posts[0]['player_id'])) { $db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id); } -$lookaddons = $db-hasColumn('players', 'lookaddons'); +$lookaddons = $db->hasColumn('players', 'lookaddons'); $groups = new OTS_Groups_List(); foreach($posts as &$post) { diff --git a/system/templates/account.management.html.twig b/system/templates/account.management.html.twig index d4c44816..bc47fa97 100644 --- a/system/templates/account.management.html.twig +++ b/system/templates/account.management.html.twig @@ -58,7 +58,8 @@
You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!
- + {% set button_name = 'Register Account' %} + {% include('buttons.base.html.twig') %}

@@ -69,7 +70,8 @@ A request has been submitted to change the email address of this account to {{ email_new }}. After {{ email_new_time|date("j F Y, G:i:s") }} you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address! - + {% set button_name = 'Edit' %} + {% include('buttons.base.html.twig') %}

@@ -84,7 +86,8 @@ @@ -120,7 +123,8 @@
getCustomField($db->hasColumn('deletion', 'players') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>/>getCustomField($db->hasColumn('players', 'deletion') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>/> isHidden() ? ' checked' : ''); ?>/>
Email Address: {{ account_email ~ email_change }}
- + {% set button_name = 'Change Email' %} + {% include('buttons.base.html.twig') %}
- + {% set button_name = 'Change Info' %} + {% include('buttons.base.html.twig') %}

Action Log

@@ -159,26 +163,30 @@
- + {% set button_name = 'Create Character' %} + {% include('buttons.base.html.twig') %}
{% if config.account_change_character_name %}
- + {% set button_name = 'Change Name' %} + {% include('buttons.base.html.twig') %}
{% endif %} {% if config.account_change_character_sex %}
- + {% set button_name = 'Change Sex' %} + {% include('buttons.base.html.twig') %}
{% endif %}
- + {% set button_name = 'Delete Character' %} + {% include('buttons.base.html.twig') %}
diff --git a/system/templates/forum.show_thread.html.twig b/system/templates/forum.show_thread.html.twig index 46c159e9..3fb42454 100644 --- a/system/templates/forum.show_thread.html.twig +++ b/system/templates/forum.show_thread.html.twig @@ -28,7 +28,7 @@ Page: {{ links_to_pages|raw }}

{% endif %} - {% if post.group is defined and post.group|lower != 'player' %} + {% if post.group is defined %} Position: {{ post.group }}
{% endif %} @@ -55,7 +55,7 @@ Page: {{ links_to_pages|raw }}
{% if post.first_post != post.id %} {% else %} - + {% endif %} {% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %} diff --git a/tools/news_preview.php b/tools/news_preview.php index 9a738eb4..7e33d8f5 100644 --- a/tools/news_preview.php +++ b/tools/news_preview.php @@ -27,12 +27,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $ 'icon_id' => $cat['icon_id'] ); } -/* - $template_path = $_GET['template_path']; - $twig->addGlobal('template_path', $template_path); - if($twig_loader && file_exists(BASE . $template_path)) - $twig_loader->prependPath(BASE . $template_path); -*/ + $twig->addGlobal('config', $config); $player = new OTS_Player(); @@ -45,7 +40,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $ if($_GET['type'] == 3) { // ARTICLE if(!isset($_GET['article_text'], $_GET['article_image'])) { - error_('Error: please fill all inputs 2.'); + error_('Error: please fill all inputs.'); } $featured_article = ''; @@ -57,7 +52,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $ 'text' => $_GET['article_text'], 'image' => $_GET['article_image'], 'hidden' => 0, - 'read_more'=> getLink('news/archive/') . '0' + 'read_more'=> '#' ), 'canEdit' => false ));