Merge pull request #332 from Pyrech/master

Fix twig errors when generating html doc
This commit is contained in:
William Durand 2014-02-06 15:20:37 +01:00
commit 14571944b4
2 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@
}
// prepare the api enpoint
{% if endpoint == '' and app.request is defined and app.request.host -%}
{% if endpoint == '' and app.request is not null and app.request.host -%}
var endpoint = '{{ app.request.getBaseUrl() }}';
{% else -%}
var endpoint = '{{ endpoint }}';

View File

@ -193,7 +193,7 @@
{% if enableSandbox %}
<div class="pane sandbox">
{% if app.request.secure != data.https %}
{% if app.request is not null and app.request.secure != data.https %}
Please reload the documentation using the scheme {% if data.https %}HTTPS{% else %}HTTP{% endif %} if you want to use the sandbox.
{% else %}
<form method="{{ data.method|upper }}" action="{% if data.host is defined %}{{ data.https ? 'https://' : 'http://' }}{{ data.host }}{% endif %}{{ data.uri }}">