Skip to content

Commit

Permalink
Merge pull request #23 from ruscon/patch-1
Browse files Browse the repository at this point in the history
Missing check if provider key in persistent_parameters array is set in MediaAdmin:browser.html.twig
  • Loading branch information
dunglas authored Sep 7, 2016
2 parents 44c2ffe + 3a0d226 commit 1eb09a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/views/MediaAdmin/browser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
{% if providers|length > 1 %}
<li><a><strong>{{ "label.select_provider"|trans({}, 'SonataMediaBundle') }}</strong></a></li>

{% if not persistent_parameters.provider %}
{% if (persistent_parameters.provider is not defined) or (not persistent_parameters.provider) %}
<li class="active"><a href="{{ admin.generateUrl('browser', {'context': persistent_parameters.context, 'provider': null}|merge(ckParameters)) }}">{{ "link.all_providers"|trans({}, 'SonataMediaBundle') }}</a></li>
{% else %}
<li><a href="{{ admin.generateUrl('browser', {'context': persistent_parameters.context, 'provider': null}|merge(ckParameters)) }}">{{ "link.all_providers"|trans({}, 'SonataMediaBundle') }}</a></li>
{% endif %}

{% for provider_name in providers %}
{% if persistent_parameters.provider == provider_name%}
{% if (persistent_parameters.provider is defined) and (persistent_parameters.provider == provider_name) %}
<li class="active"><a href="{{ admin.generateUrl('browser', {'context': persistent_parameters.context, 'provider': provider_name}|merge(ckParameters)) }}">{{ provider_name|trans({}, 'SonataMediaBundle') }}</a></li>
{% else %}
<li><a href="{{ admin.generateUrl('browser', {'context': persistent_parameters.context, 'provider': provider_name}|merge(ckParameters)) }}">{{ provider_name|trans({}, 'SonataMediaBundle') }}</a></li>
Expand Down

0 comments on commit 1eb09a4

Please sign in to comment.