From affa786e87b66800251294816dff40bf58f05e8d Mon Sep 17 00:00:00 2001 From: mattab Date: Mon, 1 Jul 2013 10:54:09 +1200 Subject: [PATCH] * Removing |count as I didn't notice |length was already used Refs #4019 --- core/Twig.php | 1 - .../CoreUpdater/templates/runUpdaterAndExit_done_cli.twig | 8 ++++---- .../templates/runUpdaterAndExit_welcome_cli.twig | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/Twig.php b/core/Twig.php index 75c59873787..27f2e54fdb3 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -53,7 +53,6 @@ public function __construct($theme = self::DEFAULT_THEME) $this->addFilter_money(); $this->addFilter_truncate(); $this->twig->addFilter( new Twig_SimpleFilter('implode', 'implode')); - $this->twig->addFilter( new Twig_SimpleFilter('count', 'count')); /* $this->load_filter('output', 'cachebuster'); $this->load_filter('output', 'trimwhitespace');*/ diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_done_cli.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_done_cli.twig index 097f4ad62ee..9d1a5ae357a 100644 --- a/plugins/CoreUpdater/templates/runUpdaterAndExit_done_cli.twig +++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_done_cli.twig @@ -19,14 +19,14 @@ * {{ 'CoreUpdater_ErrorDIYHelp_5'|translate }} {% else %} -{% if warningMessages|count > 0 %} +{% if warningMessages|length > 0 %} [!] {{ 'CoreUpdater_WarningMessages'|translate }} {% for message in warningMessages -%} * {{ message }} {%- endfor %} {%- endif %} -{% if errorMessages|count > 0 -%} +{% if errorMessages|length > 0 -%} [X] {{ 'CoreUpdater_ErrorDuringPluginsUpdates'|translate }} @@ -34,7 +34,7 @@ * {{ message }} {% endfor %} - {% if deactivatedPlugins|count > 0 -%} + {% if deactivatedPlugins|length > 0 -%} {% set listOfDeactivatedPlugins %}{{ deactivatedPlugins|implode(', ') }}{% endset %} [!] {{ 'CoreUpdater_WeAutomaticallyDeactivatedTheFollowingPlugins'|translate(listOfDeactivatedPlugins) }} @@ -42,7 +42,7 @@ {% endif %} -{% if errorMessages|count > 0 or warningMessages|count > 0 %} +{% if errorMessages|length > 0 or warningMessages|length > 0 %} {{ 'CoreUpdater_HelpMessageIntroductionWhenWarning'|translate }} * {{ helpMessage }} diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig index 9e4fe6abf25..7ab452913e5 100644 --- a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig +++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig @@ -16,7 +16,7 @@ * {{ helpMessage }} -{% elseif coreToUpdate or pluginNamesToUpdate|count > 0 %} +{% elseif coreToUpdate or pluginNamesToUpdate|length > 0 %} {{ 'CoreUpdater_DatabaseUpgradeRequired'|translate }} @@ -26,7 +26,7 @@ {{ 'CoreUpdater_PiwikWillBeUpgradedFromVersionXToVersionY'|translate(current_piwik_version, new_piwik_version) }} {% endif %} - {% if pluginNamesToUpdate|count > 0 %} + {% if pluginNamesToUpdate|length > 0 %} {%- set listOfPlugins %}{{ pluginNamesToUpdate|implode(', ') }}{% endset %} {{ 'CoreUpdater_TheFollowingPluginsWillBeUpgradedX'|translate( listOfPlugins) }} {% endif %}