Merge branch 'master' into develop

This commit is contained in:
Pierre Rudloff 2017-05-14 22:56:24 +02:00
commit c1c6c2dd97
7 changed files with 58 additions and 228 deletions

View File

@ -30,13 +30,14 @@ class ViewFactory
}
$view = new Smarty(__DIR__.'/../templates/');
if (in_array('https', $request->getHeader('X-Forwarded-Proto'))) {
$request = $request->withUri($request->getUri()->withScheme('https')->withPort(443));
}
$smartyPlugins = new SmartyPlugins($container['router'], $request->getUri());
$view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']);
$view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']);
$view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme');
return $view;
}
}

View File

@ -11,7 +11,6 @@
"symfony/yaml": "~3.2.0",
"symfony/process": "~3.2.0",
"ptachoire/process-builder-chain": "~1.2.0",
"rudloff/smarty-plugin-noscheme": "~0.1.0",
"guzzlehttp/guzzle": "~6.2.0",
"aura/session": "~2.1.0",
"barracudanetworks/archivestream-php": "~1.0.5"
@ -80,6 +79,6 @@
}
},
"scripts": {
"compile": "composer install --dev"
"compile": "composer install --ignore-platform-reqs"
}
}

264
composer.lock generated
View File

@ -4,7 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "5ccb4d0091c544eb55c17459b757f704",
"hash": "69a3037516d16ab23ba9fd58709011bb",
"content-hash": "3607b6af070e259b383f62e2612857b7",
"packages": [
{
"name": "aura/session",
@ -66,7 +67,7 @@
"session",
"sessions"
],
"time": "2016-10-03T20:28:32+00:00"
"time": "2016-10-03 20:28:32"
},
{
"name": "barracudanetworks/archivestream-php",
@ -106,7 +107,7 @@
"tar",
"zip"
],
"time": "2017-01-13T14:52:38+00:00"
"time": "2017-01-13 14:52:38"
},
{
"name": "container-interop/container-interop",
@ -137,7 +138,7 @@
],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"homepage": "https://github.com/container-interop/container-interop",
"time": "2017-02-14T19:40:03+00:00"
"time": "2017-02-14 19:40:03"
},
{
"name": "guzzlehttp/guzzle",
@ -199,7 +200,7 @@
"rest",
"web service"
],
"time": "2017-02-28T22:50:30+00:00"
"time": "2017-02-28 22:50:30"
},
{
"name": "guzzlehttp/promises",
@ -250,7 +251,7 @@
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
"time": "2016-12-20 10:07:11"
},
{
"name": "guzzlehttp/psr7",
@ -315,137 +316,7 @@
"uri",
"url"
],
"time": "2017-03-20T17:10:46+00:00"
},
{
"name": "jeremykendall/php-domain-parser",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/jeremykendall/php-domain-parser.git",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jeremykendall/php-domain-parser/zipball/896e7e70f02bd4fd77190052799bc61e4d779672",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
"jeremykendall/debug-die": "0.0.1.*",
"mikey179/vfsstream": "~1.4",
"phpunit/phpunit": "~4.4"
},
"bin": [
"bin/parse",
"bin/update-psl"
],
"type": "library",
"autoload": {
"psr-0": {
"Pdp\\": "src/"
},
"files": [
"src/pdp-parse-url.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeremy Kendall",
"homepage": "http://about.me/jeremykendall",
"role": "Developer"
},
{
"name": "Contributors",
"homepage": "https://github.com/jeremykendall/php-domain-parser/graphs/contributors"
}
],
"description": "Public Suffix List based URL parsing implemented in PHP.",
"homepage": "https://github.com/jeremykendall/php-domain-parser",
"keywords": [
"Public Suffix List",
"domain parsing",
"url parsing"
],
"time": "2015-03-30T12:49:45+00:00"
},
{
"name": "league/uri",
"version": "4.2.2",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/uri.git",
"reference": "a2e73bad7e60c3bc61b649680fb8b46876e342e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/uri/zipball/a2e73bad7e60c3bc61b649680fb8b46876e342e3",
"reference": "a2e73bad7e60c3bc61b649680fb8b46876e342e3",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"jeremykendall/php-domain-parser": "^3.0",
"php": ">=5.5.9",
"psr/http-message": "^1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^1.9",
"phpunit/phpunit": "^4.0",
"zendframework/zend-diactoros": "^1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2.x-dev"
}
},
"autoload": {
"psr-4": {
"League\\Uri\\": "src"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ignace Nyamagana Butera",
"email": "nyamsprod@gmail.com",
"homepage": "https://nyamsprod.com"
}
],
"description": "URI manipulation library",
"homepage": "http://uri.thephpleague.com",
"keywords": [
"data-uri",
"ftp",
"http",
"https",
"parse_url",
"psr-7",
"rfc3986",
"uri",
"url",
"ws"
],
"time": "2016-12-12T11:36:42+00:00"
"time": "2017-03-20 17:10:46"
},
{
"name": "mathmarques/smarty-view",
@ -495,7 +366,7 @@
"template",
"view"
],
"time": "2016-08-25T19:04:49+00:00"
"time": "2016-08-25 19:04:49"
},
{
"name": "nikic/fast-route",
@ -538,7 +409,7 @@
"router",
"routing"
],
"time": "2017-01-19T11:35:12+00:00"
"time": "2017-01-19 11:35:12"
},
{
"name": "pimple/pimple",
@ -584,7 +455,7 @@
"container",
"dependency injection"
],
"time": "2015-09-11T15:10:35+00:00"
"time": "2015-09-11 15:10:35"
},
{
"name": "psr/container",
@ -633,7 +504,7 @@
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
"time": "2017-02-14 16:28:37"
},
{
"name": "psr/http-message",
@ -683,7 +554,7 @@
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
"time": "2016-08-06 14:39:51"
},
{
"name": "ptachoire/process-builder-chain",
@ -719,48 +590,7 @@
}
],
"description": "Add ability to chain symfony processes",
"time": "2016-04-10T08:33:20+00:00"
},
{
"name": "rudloff/smarty-plugin-noscheme",
"version": "0.1.2",
"source": {
"type": "git",
"url": "https://github.com/Rudloff/smarty-plugin-noscheme.git",
"reference": "927e6a43cb30f864a34edf454dcb0f60f0bbf093"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Rudloff/smarty-plugin-noscheme/zipball/927e6a43cb30f864a34edf454dcb0f60f0bbf093",
"reference": "927e6a43cb30f864a34edf454dcb0f60f0bbf093",
"shasum": ""
},
"require": {
"league/uri": "~4.2.2"
},
"require-dev": {
"symfony/var-dumper": "~3.0.1"
},
"type": "library",
"autoload": {
"files": [
"modifier.noscheme.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Pierre Rudloff",
"email": "contact@rudloff.pro",
"homepage": "https://rudloff.pro/",
"role": "Developer"
}
],
"description": "Smarty modifier that removes the scheme in URLs",
"time": "2017-04-15T18:14:00+00:00"
"time": "2016-04-10 08:33:20"
},
{
"name": "slim/slim",
@ -831,7 +661,7 @@
"micro",
"router"
],
"time": "2017-03-19T17:55:20+00:00"
"time": "2017-03-19 17:55:20"
},
{
"name": "smarty/smarty",
@ -884,7 +714,7 @@
"keywords": [
"templating"
],
"time": "2016-12-14T21:57:25+00:00"
"time": "2016-12-14 21:57:25"
},
{
"name": "symfony/process",
@ -933,7 +763,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2017-04-12T14:13:17+00:00"
"time": "2017-04-12 14:13:17"
},
{
"name": "symfony/yaml",
@ -988,7 +818,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-05-01T14:55:58+00:00"
"time": "2017-05-01 14:55:58"
}
],
"packages-dev": [
@ -1044,7 +874,7 @@
"constructor",
"instantiate"
],
"time": "2015-06-14T21:17:01+00:00"
"time": "2015-06-14 21:17:01"
},
{
"name": "ffmpeg/ffmpeg",
@ -1102,7 +932,7 @@
"nginx",
"php"
],
"time": "2017-03-27T23:33:27+00:00"
"time": "2017-03-27 23:33:27"
},
{
"name": "myclabs/deep-copy",
@ -1144,7 +974,7 @@
"object",
"object graph"
],
"time": "2017-04-12T18:52:22+00:00"
"time": "2017-04-12 18:52:22"
},
{
"name": "phpdocumentor/reflection-common",
@ -1198,7 +1028,7 @@
"reflection",
"static analysis"
],
"time": "2015-12-27T11:43:31+00:00"
"time": "2015-12-27 11:43:31"
},
{
"name": "phpdocumentor/reflection-docblock",
@ -1243,7 +1073,7 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-09-30T07:12:33+00:00"
"time": "2016-09-30 07:12:33"
},
{
"name": "phpdocumentor/type-resolver",
@ -1290,7 +1120,7 @@
"email": "me@mikevanriel.com"
}
],
"time": "2016-11-25T06:54:22+00:00"
"time": "2016-11-25 06:54:22"
},
{
"name": "phpspec/prophecy",
@ -1353,7 +1183,7 @@
"spy",
"stub"
],
"time": "2017-03-02T20:05:34+00:00"
"time": "2017-03-02 20:05:34"
},
{
"name": "phpunit/php-code-coverage",
@ -1416,7 +1246,7 @@
"testing",
"xunit"
],
"time": "2017-04-02T07:44:40+00:00"
"time": "2017-04-02 07:44:40"
},
{
"name": "phpunit/php-file-iterator",
@ -1463,7 +1293,7 @@
"filesystem",
"iterator"
],
"time": "2016-10-03T07:40:28+00:00"
"time": "2016-10-03 07:40:28"
},
{
"name": "phpunit/php-text-template",
@ -1504,7 +1334,7 @@
"keywords": [
"template"
],
"time": "2015-06-21T13:50:34+00:00"
"time": "2015-06-21 13:50:34"
},
{
"name": "phpunit/php-timer",
@ -1553,7 +1383,7 @@
"keywords": [
"timer"
],
"time": "2017-02-26T11:10:40+00:00"
"time": "2017-02-26 11:10:40"
},
{
"name": "phpunit/php-token-stream",
@ -1602,7 +1432,7 @@
"keywords": [
"tokenizer"
],
"time": "2017-02-27T10:12:30+00:00"
"time": "2017-02-27 10:12:30"
},
{
"name": "phpunit/phpunit",
@ -1684,7 +1514,7 @@
"testing",
"xunit"
],
"time": "2017-04-03T02:22:27+00:00"
"time": "2017-04-03 02:22:27"
},
{
"name": "phpunit/phpunit-mock-objects",
@ -1743,7 +1573,7 @@
"mock",
"xunit"
],
"time": "2016-12-08T20:27:08+00:00"
"time": "2016-12-08 20:27:08"
},
{
"name": "rg3/youtube-dl",
@ -1782,7 +1612,7 @@
"GPL-2.0"
],
"description": "rtmpdump binary for Linux 64 bit",
"time": "2016-04-12T19:17:32+00:00"
"time": "2016-04-12 19:17:32"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -1827,7 +1657,7 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2017-03-04T06:30:41+00:00"
"time": "2017-03-04 06:30:41"
},
{
"name": "sebastian/comparator",
@ -1891,7 +1721,7 @@
"compare",
"equality"
],
"time": "2017-01-29T09:50:25+00:00"
"time": "2017-01-29 09:50:25"
},
{
"name": "sebastian/diff",
@ -1943,7 +1773,7 @@
"keywords": [
"diff"
],
"time": "2015-12-08T07:14:41+00:00"
"time": "2015-12-08 07:14:41"
},
{
"name": "sebastian/environment",
@ -1993,7 +1823,7 @@
"environment",
"hhvm"
],
"time": "2016-11-26T07:53:53+00:00"
"time": "2016-11-26 07:53:53"
},
{
"name": "sebastian/exporter",
@ -2060,7 +1890,7 @@
"export",
"exporter"
],
"time": "2016-11-19T08:54:04+00:00"
"time": "2016-11-19 08:54:04"
},
{
"name": "sebastian/global-state",
@ -2111,7 +1941,7 @@
"keywords": [
"global state"
],
"time": "2015-10-12T03:26:01+00:00"
"time": "2015-10-12 03:26:01"
},
{
"name": "sebastian/object-enumerator",
@ -2157,7 +1987,7 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"time": "2017-02-18T15:18:39+00:00"
"time": "2017-02-18 15:18:39"
},
{
"name": "sebastian/recursion-context",
@ -2210,7 +2040,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-11-19T07:33:16+00:00"
"time": "2016-11-19 07:33:16"
},
{
"name": "sebastian/resource-operations",
@ -2252,7 +2082,7 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"time": "2015-07-28T20:34:47+00:00"
"time": "2015-07-28 20:34:47"
},
{
"name": "sebastian/version",
@ -2295,7 +2125,7 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03T07:35:21+00:00"
"time": "2016-10-03 07:35:21"
},
{
"name": "squizlabs/php_codesniffer",
@ -2373,7 +2203,7 @@
"phpcs",
"standards"
],
"time": "2017-03-01T22:17:45+00:00"
"time": "2017-03-01 22:17:45"
},
{
"name": "symfony/polyfill-mbstring",
@ -2432,7 +2262,7 @@
"portable",
"shim"
],
"time": "2016-11-14T01:06:16+00:00"
"time": "2016-11-14 01:06:16"
},
{
"name": "symfony/var-dumper",
@ -2500,7 +2330,7 @@
"debug",
"dump"
],
"time": "2017-05-01T14:55:58+00:00"
"time": "2017-05-01 14:55:58"
},
{
"name": "webmozart/assert",
@ -2550,7 +2380,7 @@
"check",
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
"time": "2016-11-23 20:04:58"
}
],
"aliases": [],

View File

@ -16,6 +16,6 @@
Based on <a href="http://rg3.github.io/youtube-dl/">youtube-dl</a>
</div>
</footer>
<script src="{base_url|noscheme}/dist/main.js"></script>
<script src="{base_url}/dist/main.js"></script>
</body>
</html>

View File

@ -8,10 +8,10 @@
<meta name="twitter:description" content="{$description|escape}" />
<meta property="og:description" content="{$description|escape}" />
{/if}
<link rel="stylesheet" href="{base_url|noscheme}/dist/main.css" />
<link rel="stylesheet" href="{base_url}/dist/main.css" />
<title>AllTube Download{if isset($title)} - {$title|escape}{/if}</title>
<link rel="canonical" href="{$canonical}" />
<link rel="icon" href="{base_url|noscheme}/img/favicon.png" />
<link rel="icon" href="{base_url}/img/favicon.png" />
<meta property="og:title" content="AllTube Download{if isset($title)} - {$title|escape}{/if}" />
<meta property="og:image" content="{base_url}/img/logo.png" />
<meta name="twitter:card" content="summary" />
@ -20,6 +20,6 @@
<meta name="twitter:creator" content="@Tael67" />
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
<meta name="theme-color" content="#4F4F4F">
<link rel="manifest" href="{base_url|noscheme}/manifest.json" />
<link rel="manifest" href="{base_url}/manifest.json" />
</head>
<body class="{$class}">

View File

@ -1,4 +1,4 @@
<h1 class="logobis">
<a class="logocompatible" href="{base_url|noscheme}">
AllTube Download<span class="logocompatiblemask"><img src="{base_url|noscheme}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
<a class="logocompatible" href="{base_url}">
AllTube Download<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
</a></h1>

View File

@ -1,7 +1,7 @@
{include file='inc/head.tpl'}
{include file='inc/header.tpl'}
<div class="main">
<div><img class="logo" src="{base_url|noscheme}/img/logo.png"
<div><img class="logo" src="{base_url}/img/logo.png"
alt="AllTube Download" width="328" height="284"></div>
<form action="{path_for name="video"}">
<label class="labelurl" for="url">