cvs: phpweb / docs-echm.php download-docs.php

From: Date: Wed, 05 Jan 2005 18:15:17 +0000
Subject: cvs: phpweb / docs-echm.php download-docs.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-27072@lists.php.net to get a copy of this message
goba Wed Jan 5 13:15:17 2005 EDT Modified files: /phpweb docs-echm.php download-docs.php Log: integrate the extended html help format in some better way, than just linking (allowing the system to dislay the file size and date in the download table) - also using the latets file uploaded by Derick http://cvs.php.net/diff.php/phpweb/docs-echm.php?r1=1.10&r2=1.11&ty=u Index: phpweb/docs-echm.php diff -u phpweb/docs-echm.php:1.10 phpweb/docs-echm.php:1.11 --- phpweb/docs-echm.php:1.10 Tue Jan 4 07:14:33 2005 +++ phpweb/docs-echm.php Wed Jan 5 13:15:17 2005 @@ -1,15 +1,13 @@ <?php -// $Id: docs-echm.php,v 1.10 2005/01/04 12:14:33 goba Exp $ +// $Id: docs-echm.php,v 1.11 2005/01/05 18:15:17 goba Exp $ $_SERVER['BASE_PAGE'] = 'docs-echm.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; $SIDEBAR_DATA=' <h3>Download</h3> <p> - The <a href="/get/php_manual_chm_12.zip/from/a/mirror">latest (12th) build of - the Extended CHM Format</a> of the PHP Manual fixes the known bugs from the - previous build, introduces the brilliant new phpZ skin (see screenshots) - and contains up to date content (released on the 6th September 2003). + Get the latest build of the Extended CHM Format from our + <a href="/download-docs.php">documentation downloads page</a>. </p> <h3>Screenshots</h3> http://cvs.php.net/diff.php/phpweb/download-docs.php?r1=1.66&r2=1.67&ty=u Index: phpweb/download-docs.php diff -u phpweb/download-docs.php:1.66 phpweb/download-docs.php:1.67 --- phpweb/download-docs.php:1.66 Mon Oct 11 08:54:32 2004 +++ phpweb/download-docs.php Wed Jan 5 13:15:17 2005 @@ -1,5 +1,5 @@ <?php -// $Id: download-docs.php,v 1.66 2004/10/11 12:54:32 goba Exp $ +// $Id: download-docs.php,v 1.67 2005/01/05 18:15:17 goba Exp $ $_SERVER['BASE_PAGE'] = 'download-docs.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -42,12 +42,13 @@ // Format to look for $formats = array( - "Single HTML" => "html.gz", - "Many HTML files" => "tar.gz", - "PDF" => "pdf.bz2", - "PalmPilot DOC" => "doc.pdb", - "PalmPilot iSilo" => "isilo.pdb", - "Windows HTML Help" => "chm" + "Single HTML" => "html.gz", + "Many HTML files" => "tar.gz", + "PDF" => "pdf.bz2", + "PalmPilot DOC" => "doc.pdb", + "PalmPilot iSilo" => "isilo.pdb", + "Windows HTML Help" => "chm", + "Extended HTML Help" => "chm.zip" ); ?> @@ -79,15 +80,23 @@ // Go through all possible manual formats foreach ($formats as $formatname => $extension) { + // Skip chm.zip if we are not dealing with the English manual + if ($extension == 'chm.zip' && $langcode != 'en') { + continue; + } + // Actual filename of the file $actual_file = $_SERVER['DOCUMENT_ROOT'] . - "/distributions/manual/php_manual_$langcode.$extension"; + "/distributions/manual/php_manual_" . + ($extension == 'chm.zip' ? $extension : "$langcode.$extension"); // File named after the language and format exists if (file_exists($actual_file)) { // Mirror selection download URL - $link_to = "/get/php_manual_$langcode.$extension/from/a/mirror"; + $link_to = '/get/php_manual_' . + ($extension == 'chm.zip' ? $extension : "$langcode.$extension") . + '/from/a/mirror'; // Try to get size and changed date $size = @filesize($actual_file); @@ -173,11 +182,6 @@ } } - // Quite bad looking code tweak to add a link to the extended CHM (en only!) - if ($langcode == "en" && $extension == "chm") { - echo '<br /><a href="/docs-echm.php">extended chm</a>'; - } - // End table cell echo "</td>\n";

« previous php.mirrors (#27072) next »