From a68180412637ce04ff51e77257ae2731d0124662 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 4 May 2017 20:26:42 +0200 Subject: [PATCH] Don't use variables when we can use a Config object directly --- controllers/FrontController.php | 5 +---- templates/index.tpl | 4 ++-- templates/video.tpl | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 16d22ee..c930b81 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -101,8 +101,7 @@ class FrontController $response, 'index.tpl', [ - 'convert' => $this->config->convert, - 'uglyUrls' => $this->config->uglyUrls, + 'config' => $this->config, 'class' => 'index', 'description' => 'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.', 'domain' => $uri->getScheme().'://'.$uri->getAuthority(), @@ -247,8 +246,6 @@ class FrontController 'protocol' => $protocol, 'config' => $this->config, 'canonical' => $this->getCanonicalUrl($request), - 'uglyUrls' => $this->config->uglyUrls, - 'remux' => $this->config->remux, ] ); diff --git a/templates/index.tpl b/templates/index.tpl index 9f3583c..12d78d8 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -12,11 +12,11 @@ - {if $uglyUrls} + {if $config->uglyUrls} {/if}
- {if $convert} + {if $config->convert}

- {if $uglyUrls} + {if $config->uglyUrls} {/if}