cvs: phpweb / download-docs.php
| From: | Hannes Magnusson | Date: | Wed, 07 Feb 2007 18:17:59 +0000 |
| Subject: | cvs: phpweb / download-docs.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-34117@lists.php.net to get a copy of this message | ||
bjori Wed Feb 7 18:17:59 2007 UTC
Modified files:
/phpweb download-docs.php
Log:
Move the xchm download link into the table with all the other download links
http://cvs.php.net/viewvc.cgi/phpweb/download-docs.php?r1=1.77&r2=1.78&diff_format=u
Index: phpweb/download-docs.php
diff -u phpweb/download-docs.php:1.77 phpweb/download-docs.php:1.78
--- phpweb/download-docs.php:1.77 Wed Feb 7 16:17:20 2007
+++ phpweb/download-docs.php Wed Feb 7 18:17:58 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: download-docs.php,v 1.77 2007/02/07 16:17:20 philip Exp $
+// $Id: download-docs.php,v 1.78 2007/02/07 18:17:58 bjori Exp $
$_SERVER['BASE_PAGE'] = 'download-docs.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
@@ -80,11 +80,6 @@
on the 'Unblock' button. Failing to do this may lead to errors
in the visualization of the file, due to a Microsoft bug.
</li>
- <li>
- The English version of the manual is <a
- href="/get/php_manual_chm.zip/from/a/mirror">downloadable</a> in an
- <a href="/docs-echm.php">Extended HTML Help format</a>.
- </li>
</ul>
<?php
@@ -125,12 +120,32 @@
}
}
}
+/* {{{ 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['<a href="/docs-echm.php">Extended HTML Help</a>'] =
"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 "<p class=\"tip\">This mirror has no documentation files for
download.</p>";
} else {
- echo '<table border="0" cellpadding="3" cellspacing="2"
class="standard">' . "\n" .
+ echo '<table border="0" cellpadding="4" cellspacing="2"
class="standard">' . "\n" .
"<tr>\n <th> </th>\n";
// Print out the name of the formats