Example #1
0
    public function saveAllPackagesREST()
    {
        $info = '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allpackages"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="http://pear.php.net/dtd/rest.allpackages
    http://pear.php.net/dtd/rest.allpackages.xsd">
<c>' . $this->channel . '</c>
';
        include_once 'pear-database-package.php';
        foreach (package::listAllNames() as $package) {
            $info .= ' <p>' . $package . '</p>
';
        }
        $info .= '</a>';
        $dir = $this->getPackageDirectory();
        if (!is_dir($dir)) {
            if (!mkdir($dir, 0777, true)) {
                return PEAR::raiseError('Creating directory ' . $dir . ' failed - Check ther permissions');
            }
            @chmod($dir, 0777);
        }
        $file = $dir . 'packages.xml';
        if (!file_put_contents($file, $info)) {
            return PEAR::raiseError('Writing file ' . $file . ' failed - Check the permissions');
        }
        @chmod($file, 0666);
    }
Example #2
0
    function saveAllPackagesREST()
    {
        require_once 'System.php';
        $pdir = $this->_restdir . DIRECTORY_SEPARATOR . 'p';
        if (!is_dir($pdir)) {
            System::mkdir(array('-p', $pdir));
            @chmod($pdir, 0777);
        }
        $info = '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allpackages"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="http://pear.php.net/dtd/rest.allpackages
    http://pear.php.net/dtd/rest.allpackages.xsd">
<c>' . PEAR_CHANNELNAME . '</c>
';
        foreach (package::listAllNames() as $package) {
            $info .= ' <p>' . $package . '</p>
';
        }
        $info .= '</a>';
        file_put_contents($pdir . DIRECTORY_SEPARATOR . 'packages.xml', $info);
        @chmod($pdir . DIRECTORY_SEPARATOR . 'packages.xml', 0666);
    }
Example #3
0
foreach ($maintainers as $maintainer) {
    echo "  {$maintainer['handle']}...";
    $pear_rest->saveMaintainerREST($maintainer['handle']);
    echo "done\n";
}
echo "Generating All Maintainers REST...\n";
$pear_rest->saveAllMaintainersREST();
echo "done\n";
echo "Generating Package REST...\n";
$pear_rest->saveAllPackagesREST();
require_once 'Archive/Tar.php';
require_once 'PEAR/PackageFile.php';
$config =& PEAR_Config::singleton();
$pkg = new PEAR_PackageFile($config);
include_once 'pear-database-package.php';
foreach (package::listAllNames() as $package) {
    echo "  {$package}\n";
    $pear_rest->savePackageREST($package);
    echo "     Maintainers...";
    $pear_rest->savePackageMaintainerREST($package);
    echo "...done\n";
    $releases = package::info($package, 'releases');
    if ($releases) {
        echo "     Processing All Releases...";
        $pear_rest->saveAllReleasesREST($package);
        echo "done\n";
        foreach ($releases as $version => $blah) {
            $sql = 'SELECT fullpath FROM files WHERE `release` = ?';
            $fileinfo = $dbh->getOne($sql, array($blah['id']));
            $tar =& new Archive_Tar($fileinfo);
            if ($pxml = $tar->extractInString('package2.xml')) {
   | Authors: Martin Jansen <*****@*****.**>                                  |
   +----------------------------------------------------------------------+
   $Id$
*/
require_once "HTML/Form.php";
response_header("PEAR Administration - Package maintainers");
if (isset($_GET['pid'])) {
    $id = (int) $_GET['pid'];
} else {
    $id = 0;
}
$self = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES);
// Select package first
if (empty($id)) {
    auth_require(true);
    $values = package::listAllNames();
    $bb = new BorderBox("Select package");
    $form = new HTML_Form($self);
    $form->addSelect("pid", "Package:", $values);
    $form->addSubmit();
    $form->display();
    $bb->end();
} else {
    if (!empty($_GET['update'])) {
        if (!isAllowed($id)) {
            PEAR::raiseError("Only the lead maintainer of the package or PEAR\n                          administrators can edit the maintainers.");
            response_footer();
            exit;
        }
        $all = maintainer::get($id);
        // Transform
Example #5
0
 * available through the world-wide-web at the following URI:
 * http://www.php.net/license/3_0.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.
 *
 * @category  pearweb
 * @package   Bugs
 * @copyright Copyright (c) 1997-2005 The PHP Group
 * @license   http://www.php.net/license/3_0.txt  PHP License
 * @version   $Id$
 */
// Obtain common includes
require_once './include/prepend.inc';
response_header('Bugs');
$packages = package::listAllNames();
if (DEVBOX) {
    $host = '';
} else {
    $host = PEARWEB_PROTOCOL . PEAR_CHANNELNAME;
}
?>

<h1>PEAR Bug Tracking System</h1>
<div class="bug-box bug-box-first">
    <h2>Report New Bug</h2>
    <p>
    Got a test case or reproducible steps?
    </p>
    <?php 
if (!empty($packages)) {