From d6556156cdead5ab98b359af398853742ebdfbd0 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 12 Jul 2012 22:15:35 +0200 Subject: [PATCH] Makes it easier to get category language variables Replaces `ICategoryType::getLangVarPrefix()` with `ICategoryType::getLanguageVariable()` which returns the value directly. This makes the template code more compact. --- .../files/acp/templates/categoryAdd.tpl | 45 +++++++++---------- .../files/acp/templates/categoryList.tpl | 17 +++---- .../category/AbstractCategoryType.class.php | 15 +++++-- .../system/category/ICategoryType.class.php | 15 ++++--- 4 files changed, 49 insertions(+), 43 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/categoryAdd.tpl b/wcfsetup/install/files/acp/templates/categoryAdd.tpl index 09ec2b4c38..364503c934 100644 --- a/wcfsetup/install/files/acp/templates/categoryAdd.tpl +++ b/wcfsetup/install/files/acp/templates/categoryAdd.tpl @@ -23,7 +23,7 @@
-

{hascontent}{content}{lang __optional=true}{@$objectType->getProcessor()->getLangVarPrefix()}.{@$action}{/lang}{/content}{hascontentelse}{lang}wcf.category.{@$action}{/lang}{/hascontent}

+

{@$objectType->getProcessor()->getLanguageVariable($action)}

@@ -35,18 +35,13 @@

{lang}wcf.global.form.{@$action}.success{/lang}

{/if} -{capture assign='listLangVar'}{lang __optional=true}{@$objectType->getProcessor()->getLangVarPrefix()}.button.list{/lang}{/capture} -{if !$listLangVar} - {capture assign='listLangVar'}{lang}wcf.category.button.list{/lang}{/capture} -{/if} - {hascontent}