From bb061970221ad57256ac1ace34a9192482bda2cf Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 14 Sep 2017 20:39:58 +0200 Subject: [PATCH] Simplify htmlescape --- Theme/Backend/accounts-create.tpl.php | 12 ++++++------ Theme/Backend/accounts-list.tpl.php | 8 ++++---- Theme/Backend/accounts-single.tpl.php | 24 ++++++++++++------------ Theme/Backend/groups-create.tpl.php | 6 +++--- Theme/Backend/groups-list.tpl.php | 4 ++-- Theme/Backend/groups-single.tpl.php | 6 +++--- Theme/Backend/modules-list.tpl.php | 6 +++--- Theme/Backend/modules-single.tpl.php | 12 ++++++------ Theme/Backend/settings-general.tpl.php | 18 +++++++++--------- 9 files changed, 48 insertions(+), 48 deletions(-) diff --git a/Theme/Backend/accounts-create.tpl.php b/Theme/Backend/accounts-create.tpl.php index c9931f4..716dcce 100644 --- a/Theme/Backend/accounts-create.tpl.php +++ b/Theme/Backend/accounts-create.tpl.php @@ -23,15 +23,15 @@ echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/accounts-list.tpl.php b/Theme/Backend/accounts-list.tpl.php index 2e3097a..64febb6 100644 --- a/Theme/Backend/accounts-list.tpl.php +++ b/Theme/Backend/accounts-list.tpl.php @@ -49,11 +49,11 @@ echo $this->getData('nav')->render(); elseif($value->getStatus() === \phpOMS\Account\AccountStatus::TIMEOUT) { $color = 'purple'; } elseif($value->getStatus() === phpOMS\Account\AccountStatus::BANNED) { $color = 'red'; } ?> - getId(), ENT_COMPAT, 'utf-8'); ?> + printHtml($value->getId()); ?> getHtml('Status'. $value->getStatus()); ?> - getName1(), ENT_COMPAT, 'utf-8'); ?> - getLastActive()->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?> - getCreatedAt()->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?> + printHtml($value->getName1()); ?> + printHtml($value->getLastActive()->format('Y-m-d H:i:s')); ?> + printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?> getHtml('Empty', 0, 0); ?> diff --git a/Theme/Backend/accounts-single.tpl.php b/Theme/Backend/accounts-single.tpl.php index ad0109d..4766bbd 100644 --- a/Theme/Backend/accounts-single.tpl.php +++ b/Theme/Backend/accounts-single.tpl.php @@ -27,29 +27,29 @@ echo $this->getData('nav')->render(); ?>
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/groups-create.tpl.php b/Theme/Backend/groups-create.tpl.php index 8df8344..cdd6026 100644 --- a/Theme/Backend/groups-create.tpl.php +++ b/Theme/Backend/groups-create.tpl.php @@ -22,13 +22,13 @@ echo $this->getData('nav')->render(); ?>

getHtml('Group'); ?>

-
+ - -
diff --git a/Theme/Backend/groups-list.tpl.php b/Theme/Backend/groups-list.tpl.php index f8b9b6c..3abe102 100644 --- a/Theme/Backend/groups-list.tpl.php +++ b/Theme/Backend/groups-list.tpl.php @@ -46,9 +46,9 @@ echo $this->getData('nav')->render(); ?> elseif($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; } elseif($value->getStatus() === \phpOMS\Account\GroupStatus::HIDDEN) { $color = 'purple'; } ?>
getId(), ENT_COMPAT, 'utf-8'); ?> + printHtml($value->getId()); ?> getHtml('Status'. $value->getStatus()); ?> - getName(), ENT_COMPAT, 'utf-8'); ?> + printHtml($value->getName()); ?> diff --git a/Theme/Backend/groups-single.tpl.php b/Theme/Backend/groups-single.tpl.php index fa9cf04..2d8052a 100644 --- a/Theme/Backend/groups-single.tpl.php +++ b/Theme/Backend/groups-single.tpl.php @@ -28,9 +28,9 @@ echo $this->getData('nav')->render(); ?>
-
+
-
+
-
+
diff --git a/Theme/Backend/modules-list.tpl.php b/Theme/Backend/modules-list.tpl.php index 1202bed..ec8e9d9 100644 --- a/Theme/Backend/modules-list.tpl.php +++ b/Theme/Backend/modules-list.tpl.php @@ -45,9 +45,9 @@ $footerView->setResults(count($modules)); $module) : $count++; $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/module/settings?{?}&id=' . $module['name']['internal']); ?>
- - + printHtml($module['name']['internal']); ?> + printHtml($module['name']['external']); ?> + printHtml($module['version']); ?> getHtml('Active')); elseif (in_array($module['name']['internal'], $installed)) diff --git a/Theme/Backend/modules-single.tpl.php b/Theme/Backend/modules-single.tpl.php index 939da9e..9d8ac9a 100644 --- a/Theme/Backend/modules-single.tpl.php +++ b/Theme/Backend/modules-single.tpl.php @@ -25,26 +25,26 @@ $id = $this->request->getData('id') ?? 1;
-

+

printHtml($modules[$id]['name']['external'] ); ?>

getHtml('Name'); ?> - + printHtml($modules[$id]['name']['external']); ?>
getHtml('Version'); ?> - + printHtml($modules[$id]['version'] ); ?>
getHtml('CreatedBy'); ?> - + printHtml($modules[$id]['creator']['name'] ); ?>
getHtml('Website'); ?> - + printHtml($modules[$id]['creator']['website'] ); ?>
getHtml('Description'); ?> - + printHtml($modules[$id]['description'] ); ?>
diff --git a/Theme/Backend/settings-general.tpl.php b/Theme/Backend/settings-general.tpl.php index 6c9c764..2cbeed8 100644 --- a/Theme/Backend/settings-general.tpl.php +++ b/Theme/Backend/settings-general.tpl.php @@ -51,9 +51,9 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
-
+
-
+
@@ -75,25 +75,25 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
@@ -115,14 +115,14 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();

getHtml('Numberformat'); ?>

-
- +
+