website diff pt/doc/index.php @ rev 1084

Update relnotes links (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 27 09:56:28 2012 +0200 (2012-07-27)
parents 2624878c24e8
children aea4f0603412
line diff
     1.1 --- a/pt/doc/index.php	Fri Jul 27 09:10:17 2012 +0200
     1.2 +++ b/pt/doc/index.php	Fri Jul 27 09:56:28 2012 +0200
     1.3 @@ -86,14 +86,25 @@
     1.4  </p>
     1.5  
     1.6  <ul>
     1.7 -	<li><a href="releases/4.0/relnotes.pt_BR.html">SliTaz GNU/Linux 4.0 - 
     1.8 -		Notas de Lançamento</a></li>
     1.9 -	<li><a href="releases/3.0/relnotes.pt.html">SliTaz GNU/Linux 3.0 - 
    1.10 -		Notas de Lançamento</a></li>
    1.11 -	<li><a href="releases/2.0/relnotes.pt.html">SliTaz GNU/Linux 2.0 - 
    1.12 -		Notas de Lançamento</a></li>
    1.13 -	<li><a href="releases/1.0/relnotes.pt.html">SliTaz GNU/Linux 1.0 - 
    1.14 -		Notas de Lançamento</a></li>
    1.15 +<?php
    1.16 +	$relnotes = array();
    1.17 +	for ($release = 1;; $release++) {
    1.18 +		$file = "releases/".$release.".0/relnotes.pt.html";
    1.19 +		if (!file_exists($file)) {
    1.20 +			$file = "releases/".$release.".0/relnotes.pt_BR.html";
    1.21 +			if (!file_exists($file)) {
    1.22 +				$file = "../../en/doc/releases/".$release.".0/relnotes.en.html";
    1.23 +				if (!file_exists($file))
    1.24 +					break;
    1.25 +			}
    1.26 +		}
    1.27 +		array_unshift($relnotes, array("release" => $release.".0", "file" => $file));
    1.28 +	}
    1.29 +	foreach ($relnotes as $release) {
    1.30 +		print "	<li><a href=\"".$release["file"]."\">SliTaz GNU/Linux ".$release["release"]." -\n";
    1.31 +		print "		Notas de Lançamento</a></li>\n";
    1.32 +	}
    1.33 +?>
    1.34  </ul>
    1.35  
    1.36  <!-- End of content -->