Skip to content

Commit

Permalink
* Removing |count as I didn't notice |length was already used
Browse files Browse the repository at this point in the history
Refs #4019
  • Loading branch information
mattab committed Jun 30, 2013
1 parent 6355922 commit affa786
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion core/Twig.php
Expand Up @@ -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');*/
Expand Down
8 changes: 4 additions & 4 deletions plugins/CoreUpdater/templates/runUpdaterAndExit_done_cli.twig
Expand Up @@ -19,30 +19,30 @@
* {{ '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 }}

{% for message in errorMessages %}
* {{ message }}
{% endfor %}

{% if deactivatedPlugins|count > 0 -%}
{% if deactivatedPlugins|length > 0 -%}
{% set listOfDeactivatedPlugins %}{{ deactivatedPlugins|implode(', ') }}{% endset %}

[!] {{ 'CoreUpdater_WeAutomaticallyDeactivatedTheFollowingPlugins'|translate(listOfDeactivatedPlugins) }}
{% endif %}

{% endif %}

{% if errorMessages|count > 0 or warningMessages|count > 0 %}
{% if errorMessages|length > 0 or warningMessages|length > 0 %}
{{ 'CoreUpdater_HelpMessageIntroductionWhenWarning'|translate }}

* {{ helpMessage }}
Expand Down
Expand Up @@ -16,7 +16,7 @@

* {{ helpMessage }}

{% elseif coreToUpdate or pluginNamesToUpdate|count > 0 %}
{% elseif coreToUpdate or pluginNamesToUpdate|length > 0 %}

{{ 'CoreUpdater_DatabaseUpgradeRequired'|translate }}

Expand All @@ -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 %}
Expand Down

0 comments on commit affa786

Please sign in to comment.