From c601d174c0b5ca5e729d0e408f0aa1706ac34110 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Wed, 7 Feb 2007 18:17:58 +0000 Subject: [PATCH] Move the xchm download link into the table with all the other download links --- download-docs.php | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/download-docs.php b/download-docs.php index 27af68d00..1699ba8b3 100644 --- a/download-docs.php +++ b/download-docs.php @@ -80,11 +80,6 @@ $formats = array( on the 'Unblock' button. Failing to do this may lead to errors in the visualization of the file, due to a Microsoft bug. -
  • - The English version of the manual is downloadable in an - Extended HTML Help format. -
  • $language) { } } } +/* {{{ FIXME: Special handling for the extended html help format since it doesn't follow the "naming rules" + * (mostly copy&paste from the loop above) + */ +$formats['Extended HTML Help'] = "zip"; // Add a link to the xchm docs in the table header +$actual_file = $_SERVER['DOCUMENT_ROOT'] . "/distributions/manual/php_manual_chm.zip"; +if (file_exists($actual_file)) { + $link_to = "/get/php_manual_chm.zip/from/a/mirror"; + $size = @filesize($actual_file); + $changed = @filemtime($actual_file); + if ($size !== FALSE) { + $files["en"]["zip"] = array( + $link_to, + (int) ($size/1024), + date("j M Y", $changed), + "zip" + ); + $found_formats["xchm"] = "zip"; + } +} +/* }}} */ if (count($found_formats) == 0) { echo "

    This mirror has no documentation files for download.

    "; } else { - echo '' . "\n" . + echo '
    ' . "\n" . "\n \n"; // Print out the name of the formats