cvs: peardoc /scripts pearwebpackagetocs.php
| From: | Christian Weiske | Date: | Fri, 02 Jan 2009 14:23:01 +0000 |
| Subject: | cvs: peardoc /scripts pearwebpackagetocs.php | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11413@lists.php.net to get a copy of this message | ||
cweiske Fri Jan 2 14:23:01 2009 UTC
Modified files:
/peardoc/scripts pearwebpackagetocs.php
Log:
check if index is broken
http://cvs.php.net/viewvc.cgi/peardoc/scripts/pearwebpackagetocs.php?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/scripts/pearwebpackagetocs.php
diff -u peardoc/scripts/pearwebpackagetocs.php:1.1 peardoc/scripts/pearwebpackagetocs.php:1.2
--- peardoc/scripts/pearwebpackagetocs.php:1.1 Tue Nov 11 08:49:00 2008
+++ peardoc/scripts/pearwebpackagetocs.php Fri Jan 2 14:23:01 2009
@@ -23,7 +23,7 @@
require_once 'Console/CommandLine.php';
$parser = new Console_CommandLine(array(
'description' => 'Create package TOC files for pearweb',
- 'version' => '$Id: pearwebpackagetocs.php,v 1.1 2008/11/11 08:49:00
cweiske Exp $'
+ 'version' => '$Id: pearwebpackagetocs.php,v 1.2 2009/01/02 14:23:01
cweiske Exp $'
));
$parser->addOption('verbose', array(
@@ -144,7 +144,7 @@
$long = $junk['ldesc'];
$short = $junk['sdesc'];
$desc = ($long ? $long : $short) . '</a>';
- $content .= " <li><a
href=\"/manual/en/{$arPackage['filename']}\">" . $desc;
+ $content .= " <li><a href=\"/manual/en/{$chunkid}.php\">"
. $desc;
if ($depth > 1) {
$content .= createPearwebPackageToc($junk, $depth - 1);
}
@@ -169,6 +169,10 @@
{
$arIndex = unserialize(file_get_contents($indexFile));
$nCount = 0;
+
+ if (!isset($arIndex['packages'])) {
+ throw new Exception('Index file is corrupt (no packages): ' . $indexFile);
+ }
foreach ($arIndex['packages']['children'] as $arCategories) {
foreach ($arCategories['children'] as $arPackage) {