summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2016-06-04 11:41:04 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2016-06-04 11:41:04 +0200
commit774e0d72cdc3f9e033ac14529b3107105d147b06 (patch)
tree159861549e78e5c5b33e59560aa0c701a9bd7b76
parent00221fad40b931bbab7d3f8b15731453c671fff0 (diff)
downloadyoutube-dl-774e0d72cdc3f9e033ac14529b3107105d147b06.tar.gz
youtube-dl-774e0d72cdc3f9e033ac14529b3107105d147b06.tar.xz
youtube-dl-774e0d72cdc3f9e033ac14529b3107105d147b06.zip
modify index
-rw-r--r--index.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/index.php b/index.php
index 38dc4e492..ee5af0c20 100644
--- a/index.php
+++ b/index.php
@@ -10,12 +10,7 @@
 <h1>youtube-dl downloads</h1>
 
 <?php
-$DOWNLOAD_DIR = 'downloads';
-
-$versions = array_filter(scandir($DOWNLOAD_DIR), function($v) {return (($v{0} != '.') && ($v != 'latest'));});
-sort($versions);
-
-$latest = end($versions);
+$latest = file_get_contents('latest_version');
 
 echo '<div class="latest">';
 echo '<div><a href="latest">Latest</a> (v' . htmlspecialchars($latest) . ') downloads:</div>';
@@ -24,14 +19,9 @@ echo '<a href="downloads/' . htmlspecialchars($latest) . '/youtube-dl.exe">youtu
 echo '<a href="downloads/' . htmlspecialchars($latest) . '/youtube-dl-' . htmlspecialchars($latest) . '.tar.gz">youtube-dl-' . htmlspecialchars($latest) . '.tar.gz</a>';
 echo '</div>';
 
-echo '<ul class="all-versions">';
-foreach ($versions as $version) {
-    echo '<li><a href="downloads/' . htmlspecialchars($version) . '">' . htmlspecialchars($version) . '</a></li>';
-}
-echo '</ul>';
-
 ?>
 
+See the right for more resources.
 
 <table border="0" id="rgb" style="float: right;">
     <tr><td><a class="button" id="main-homepage" href="http://rg3.github.com/youtube-dl/">Homepage</a></td></tr>