From f417fcad82dca6c52195b8a3cb9c9d8c17490f3a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 14 Sep 2017 20:39:58 +0200 Subject: [PATCH] Simplify htmlescape --- .../AccountGroupSelector/base.tpl.php | 22 +++++++++---------- Theme/Backend/profile-list.tpl.php | 6 ++--- Theme/Backend/profile-single.tpl.php | 18 +++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php index bdff65b..0fc78e9 100644 --- a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php +++ b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php @@ -10,25 +10,25 @@ ] } ]' formaction=""> -getId(), ENT_COMPAT, 'utf-8'); ?>", "delay": 500, "resets": true}, - {"key": 3, "type": "dom.datalist.clear", "id": "getId(), ENT_COMPAT, 'utf-8'); ?>-datalist"}, - {"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#getId(), ENT_COMPAT, 'utf-8'); ?>}", "method": "GET", "request_type": "json"}, - {"key": 5, "type": "dom.datalist.append", "id": "getId(), ENT_COMPAT, 'utf-8'); ?>-datalist", "value": "id", "text": "name"} + {"key": 2, "type": "utils.timer", "id": "printHtml($this->getId()); ?>", "delay": 500, "resets": true}, + {"key": 3, "type": "dom.datalist.clear", "id": "printHtml($this->getId()); ?>-datalist"}, + {"key": 4, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"}, + {"key": 5, "type": "dom.datalist.append", "id": "printHtml($this->getId()); ?>-datalist", "value": "id", "text": "name"} ] }, { "key": 2, "listener": "keydown", "action" : [ {"key": 1, "type": "validate.keypress", "pressed": "13"}, - {"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#getId(), ENT_COMPAT, 'utf-8'); ?>}", "method": "GET", "request_type": "json"}, - {"key": 3, "type": "dom.setvalue", "overwrite": false, "id": "getId(), ENT_COMPAT, 'utf-8'); ?>-idlist", "data-path": "", "data": ""}, - {"key": 4, "type": "dom.setvalue", "overwrite": false, "id": "getId(), ENT_COMPAT, 'utf-8'); ?>-taglist", "data-path": "", "data": ""} + {"key": 2, "type": "message.request", "uri": "{/base}/{/lang}/api/admin/find/account?search={#printHtml($this->getId()); ?>}", "method": "GET", "request_type": "json"}, + {"key": 3, "type": "dom.setvalue", "overwrite": false, "id": "printHtml($this->getId()); ?>-idlist", "data-path": "", "data": ""}, + {"key": 4, "type": "dom.setvalue", "overwrite": false, "id": "printHtml($this->getId()); ?>-taglist", "data-path": "", "data": ""} ] } ]' required> - - -
\ No newline at end of file + + +
\ No newline at end of file diff --git a/Theme/Backend/profile-list.tpl.php b/Theme/Backend/profile-list.tpl.php index d4a49b3..fb6e33e 100644 --- a/Theme/Backend/profile-list.tpl.php +++ b/Theme/Backend/profile-list.tpl.php @@ -40,9 +40,9 @@ $accounts = $this->getData('accounts'); $account) : $count++; $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/profile/single?{?}&id=' . $account->getAccount()->getId()); ?> - getAccount()->getId(), ENT_COMPAT, 'utf-8'); ?> - getAccount()->getName3() . ' ' . $account->getAccount()->getName2() . ' ' . $account->getAccount()->getName1(), ENT_COMPAT, 'utf-8'); ?> - getAccount()->getLastActive()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getId()); ?> + printHtml($account->getAccount()->getName3() . ' ' . $account->getAccount()->getName2() . ' ' . $account->getAccount()->getName1()); ?> + printHtml($account->getAccount()->getLastActive()->format('Y-m-d')); ?> getHtml('Empty', 0, 0); ?> diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php index 5f5aa3b..af151c4 100644 --- a/Theme/Backend/profile-single.tpl.php +++ b/Theme/Backend/profile-single.tpl.php @@ -35,7 +35,7 @@ echo $this->getData('nav')->render();
getHtml('Name') ?><?= $this->getHtml('ProfileImage'); ?> - getAccount()->getName3(), ENT_COMPAT, 'utf-8'); ?>, getAccount()->getName1(), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getName3()); ?>, printHtml($account->getAccount()->getName1()); ?>
getHtml('Occupation') ?> Sailor @@ -47,7 +47,7 @@ echo $this->getData('nav')->render(); Gosling
getHtml('Email') ?> - getAccount()->getEmail(), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getEmail()); ?>
Address @@ -71,13 +71,13 @@ echo $this->getData('nav')->render(); +01 12345-4567
getHtml('Registered') ?> - getAccount()->getCreatedAt()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getCreatedAt()->format('Y-m-d')); ?>
getHtml('LastLogin') ?> - getAccount()->getLastActive()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getLastActive()->format('Y-m-d')); ?>
getHtml('Status') ?> - getAccount()->getStatus(), ENT_COMPAT, 'utf-8'); ?> + printHtml($account->getAccount()->getStatus()); ?>
@@ -100,10 +100,10 @@ echo $this->getData('nav')->render(); $value) : $c++; $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); ?> - getId(), ENT_COMPAT, 'utf-8'); ?> - getNewestHistory()->getPosition(), ENT_COMPAT, 'utf-8'); ?> - getNewestHistory()->getPosition(), ENT_COMPAT, 'utf-8'); ?> - getNewestStatus()->getStatus(), ENT_COMPAT, 'utf-8'); ?> + printHtml($value->getId()); ?> + printHtml($value->getNewestHistory()->getPosition()); ?> + printHtml($value->getNewestHistory()->getPosition()); ?> + printHtml($value->getNewestStatus()->getStatus()); ?> getHtml('Empty', 0, 0); ?>