Don't use variables when we can use a Config object directly
This commit is contained in:
parent
ef5304e598
commit
a681804126
3 changed files with 5 additions and 8 deletions
|
@ -101,8 +101,7 @@ class FrontController
|
||||||
$response,
|
$response,
|
||||||
'index.tpl',
|
'index.tpl',
|
||||||
[
|
[
|
||||||
'convert' => $this->config->convert,
|
'config' => $this->config,
|
||||||
'uglyUrls' => $this->config->uglyUrls,
|
|
||||||
'class' => 'index',
|
'class' => 'index',
|
||||||
'description' => 'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.',
|
'description' => 'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.',
|
||||||
'domain' => $uri->getScheme().'://'.$uri->getAuthority(),
|
'domain' => $uri->getScheme().'://'.$uri->getAuthority(),
|
||||||
|
@ -247,8 +246,6 @@ class FrontController
|
||||||
'protocol' => $protocol,
|
'protocol' => $protocol,
|
||||||
'config' => $this->config,
|
'config' => $this->config,
|
||||||
'canonical' => $this->getCanonicalUrl($request),
|
'canonical' => $this->getCanonicalUrl($request),
|
||||||
'uglyUrls' => $this->config->uglyUrls,
|
|
||||||
'remux' => $this->config->remux,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
<input class="URLinput" type="url" name="url" id="url"
|
<input class="URLinput" type="url" name="url" id="url"
|
||||||
required autofocus placeholder="http://example.com/video" />
|
required autofocus placeholder="http://example.com/video" />
|
||||||
</span>
|
</span>
|
||||||
{if $uglyUrls}
|
{if $config->uglyUrls}
|
||||||
<input type="hidden" name="page" value="video" />
|
<input type="hidden" name="page" value="video" />
|
||||||
{/if}
|
{/if}
|
||||||
<input class="downloadBtn" type="submit" value="Download" /><br/>
|
<input class="downloadBtn" type="submit" value="Download" /><br/>
|
||||||
{if $convert}
|
{if $config->convert}
|
||||||
<div class="mp3">
|
<div class="mp3">
|
||||||
<p><input type="checkbox" id="audio" class="audio" name="audio">
|
<p><input type="checkbox" id="audio" class="audio" name="audio">
|
||||||
<label for="audio"><span class="ui"></span>
|
<label for="audio"><span class="ui"></span>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<h3><label for="format">Available formats:</label></h3>
|
<h3><label for="format">Available formats:</label></h3>
|
||||||
<form action="{path_for name="redirect"}">
|
<form action="{path_for name="redirect"}">
|
||||||
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
<input type="hidden" name="url" value="{$video->webpage_url}" />
|
||||||
{if $uglyUrls}
|
{if $config->uglyUrls}
|
||||||
<input type="hidden" name="page" value="redirect" />
|
<input type="hidden" name="page" value="redirect" />
|
||||||
{/if}
|
{/if}
|
||||||
<select name="format" id="format" class="formats monospace">
|
<select name="format" id="format" class="formats monospace">
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
Best ({$video->ext})
|
Best ({$video->ext})
|
||||||
{/strip}
|
{/strip}
|
||||||
</option>
|
</option>
|
||||||
{if $remux}
|
{if $config->remux}
|
||||||
<option value="bestvideo+bestaudio">
|
<option value="bestvideo+bestaudio">
|
||||||
Remux best video with best audio
|
Remux best video with best audio
|
||||||
</option>
|
</option>
|
||||||
|
|
Loading…
Reference in a new issue