Source for file apidoc-fix-latest.php
Documentation is available at apidoc-fix-latest.php
* +----------------------------------------------------------------------+
* | PEAR Web site version 1.0 |
* +----------------------------------------------------------------------+
* | Copyright (c) 2009 The PEAR Group |
* +----------------------------------------------------------------------+
* | This source file is subject to version 2.02 of the PHP license, |
* | that is bundled with this package in the file LICENSE, and is |
* | available at through the world-wide-web at |
* | http://www.php.net/license/2_02.txt. |
* | If you did not receive a copy of the PHP license and are unable to |
* | obtain it through the world-wide-web, please send a note to |
* | license@php.net so we can mail you a copy immediately. |
* +----------------------------------------------------------------------+
* | Author: Christian Weiske <cweiske@php.net> |
* +----------------------------------------------------------------------+
require_once dirname (dirname (__FILE__ )) . '/include/pear-config.php';
'portability' => DB_PORTABILITY_ALL ,
$dbh = & DB ::connect (PEAR_DATABASE_DSN , $options);
echo $dbh->getMessage () . "\n";
echo $dbh->getUserInfo () . "\n";
$dbh->setFetchMode (DB_FETCHMODE_OBJECT );
SELECT r1.releasedate AS releasedate, r1.version AS version, packages.name AS name
FROM packages, releases AS r1
ON r1.releasedate < r2.releasedate
AND r1.package = r2.package
WHERE packages.id = r1.package
AND packages.package_type = 'pear'
AND r2.releasedate IS NULL
$res = $dbh->query ($query);
while ($row = $res->fetchRow ()) {
$version = $row->version;
$dir = PEAR_APIDOC_DIR . $pkg . '-' . $version;
$latestdir = PEAR_APIDOC_DIR . $pkg . '-latest';
//check if apidoc of current version exists
//latest is not correctly symlinked
echo 'Unlinking incorrectly linked ' . $latestdir . ' -> ' . realpath($latestdir) . "\n";
'ok: ' . $latestdir . ' -> ' . $dir . "\n";
echo 'No apidoc for current version: ' . $dir . "\n";
echo 'Making latest: ' . $dir . "\n";
echo sprintf("%d errors, %d fixed, %d already ok\n", $errors, $fixed, $ok);
Documentation generated on Mon, 11 Mar 2019 16:04:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|