Thu Oct 7 08:11:58 PDT 2010
- Previous message: [Slony1-commit] Slony-I-commit Tag REL_2_0_5 has been created.
- Next message: [Slony1-commit] slony1-www/content news.txt frontpage.txt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-www
In directory main.slony.info:/home/community/slony/htdocs
Modified Files:
index.php
Log Message:
Adding support for multiple versions of the documentation
to be displayed on the website via navigation links
Index: index.php
===================================================================
RCS file: /home/cvsd/slony1/slony1-www/index.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** index.php 13 Aug 2010 22:13:47 -0000 1.14
--- index.php 7 Oct 2010 15:11:56 -0000 1.15
***************
*** 3,7 ****
$target=$_GET["target"];
!
switch($target){
case '404':
--- 3,7 ----
$target=$_GET["target"];
! $text=$target;
switch($target){
case '404':
***************
*** 13,22 ****
$text = '';
$file = str_replace(array("/",".."),"",$_GET["file"]);
! if ($file == "") $file="index.html";
! $text=@file_get_contents('./adminguide/current/doc/adminguide/'.$file);
if ($text == ''){
header("HTTP/1.0 404 Not Found");
echo layout_header();
echo layout_defaultblock('404, NOT FOUND','',file_get_contents('./content/404.txt'));
} else {
echo layout_header();
--- 13,39 ----
$text = '';
$file = str_replace(array("/",".."),"",$_GET["file"]);
! $version="";
! if ($_GET["version"] == "1.0") $version="1.0";
! else if ($_GET["version"] == "1.1") $version="1.1";
! else if ($_GET["version"] == "1.2") $version="1.2";
! else if ($_GET["version"] == "2.0") $version="2.0";
! if($file == '' ) {
! $file="index.html";
! if($version == '') {
! $text="<h1>Documentation Version</h1>"
! . "<table>"
! ."<tr><td><a href=/documentation/1.2/index.html>1.2</a></td></tr>"
! ."<tr><td><a href=/documentation/2.0/index.html>2.0</a></td></tr>"
! . "</table>";
! }
! }
! if($text=='') {
! $text=@file_get_contents('./adminguide/'. $version . '/doc/adminguide/'.$file);
! }
if ($text == ''){
header("HTTP/1.0 404 Not Found");
echo layout_header();
echo layout_defaultblock('404, NOT FOUND','',file_get_contents('./content/404.txt'));
+
} else {
echo layout_header();
- Previous message: [Slony1-commit] Slony-I-commit Tag REL_2_0_5 has been created.
- Next message: [Slony1-commit] slony1-www/content news.txt frontpage.txt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list