EOD; } // }}} // {{{ page header $name = htmlspecialchars(strip_tags($name)); $helper = new package_releasehelper($name); $extraHeaders = $trackback_header . ' <link rel="meta" title="DOAP" type="application/rdf+xml"' . ' href="/package/' . $name . '/doap"/>'; if ($version) { response_header($name . ' :: ' . $version, null, $extraHeaders); } else { response_header($name, null, $extraHeaders); } html_category_urhere($pkg['categoryid'], true); $v = $version ? ' ' . $version : ''; echo '<h1>Package Information: ' . $name . $v . "</h1>\n"; print_package_navigation($pacid, $name, $action); // }}} // {{{ Package Information if (empty($action)) { // {{{ General information // {{{ Supeseded checks $dec_messages = array('abandoned' => 'This package is not maintained anymore and has been superseded.', 'superseded' => 'This package has been superseded, but is still maintained for bugs and security fixes.', 'unmaintained' => 'This package is not maintained, if you would like to take over please go to <a href="http://pear.php.net/manual/en/newmaint.takingover.php">this page</a>.'); $dec_table = array('abandoned' => array('superseded' => 'Y', 'unmaintained' => 'Y'), 'superseded' => array('superseded' => 'Y', 'unmaintained' => 'N'), 'unmaintained' => array('superseded' => 'N', 'unmaintained' => 'Y')); $superseded = $supersede ? 'Y' : 'N'; $apply_rule = null; foreach ($dec_table as $rule => $conditions) { $match = true; foreach ($conditions as $condition => $value) { if (${$condition} != $value) { $match = false; break;
WHERE p.id = r.package AND r.package = ?'; $row = $dbh->getAll($query, array($id)); foreach ($row as $value) { $file = sprintf("%s/%s-%s.tgz", PEAR_TARBALL_DIR, $value[0], $value[1]); if (@unlink($file)) { echo "Deleting release archive \"" . $file . "\"\n"; $file_rm++; } else { echo "<font color=\"#ff0000\">Unable to delete file " . $file . "</font>\n"; } } echo "\n" . $file_rm . " file(s) deleted\n\n"; $catid = package::info($id, 'categoryid'); $packagename = package::info($id, 'name'); $dbh->query("UPDATE categories SET npackages = npackages - 1 WHERE id = {$catid}"); foreach ($tables as $table => $field) { $query = sprintf("DELETE FROM %s WHERE %s = '%s'", $table, $field, $id); echo "Removing package information from table \"" . $table . "\": "; $dbh->query($query); echo "<b>" . $dbh->affectedRows() . "</b> rows affected.\n"; } include_once 'pear-rest.php'; $pear_rest = new pearweb_Channel_REST_Generator(PEAR_REST_PATH, $dbh); $pear_rest->deletePackageREST($packagename); echo "</pre>\nPackage " . $id . " has been deleted.\n"; } else { $pkg = package::info($id); print_package_navigation($id, $pkg['name'], '/package-delete.php?id=' . $id); echo "The package has not been deleted.\n<br /><br />\n"; } response_footer();
if (release::remove($_GET['id'], $_GET['release'])) { echo "<b>Release successfully deleted.</b><br /><br />\n"; } else { report_error('An error occured while deleting the release!'); } break; } } } $row = package::info((int) $_GET['id']); if (empty($row['name'])) { report_error('Illegal package id'); response_footer(); exit; } print_package_navigation($row['packageid'], $row['name'], '/package-edit.php?id=' . $row['packageid']); $sth = $dbh->query('SELECT id, name FROM categories ORDER BY name'); while ($cat_row = $sth->fetchRow(DB_FETCHMODE_ASSOC)) { $rows[$cat_row['id']] = $cat_row['name']; } $form = new HTML_QuickForm2('package-edit', 'post', array('action' => '/package-edit.php?id=' . $row['packageid'])); $form->removeAttribute('name'); $renderer = HTML_QuickForm2_Renderer::factory('default'); // Set defaults for the form elements $form->addDataSource(new HTML_QuickForm2_DataSource_Array(array('name' => htmlspecialchars($row['name']), 'license' => htmlspecialchars($row['license']), 'summary' => htmlspecialchars($row['summary']), 'description' => htmlspecialchars($row['description']), 'category' => (int) $row['categoryid'], 'homepage' => htmlspecialchars($row['homepage']), 'doc_link' => htmlspecialchars($row['doc_link']), 'bug_link' => htmlspecialchars($row['bug_link']), 'cvs_link' => htmlspecialchars($row['cvs_link']), 'unmaintained' => $row['unmaintained'] ? true : false, 'newpk_id' => (int) $row['newpk_id'], 'new_channel' => htmlspecialchars($row['new_channel']), 'new_package' => htmlspecialchars($row['new_package'])))); $form->addElement('text', 'name', array('maxlength' => "80", 'accesskey' => "c"))->setLabel('Pa<span class="accesskey">c</span>kage Name'); $form->addElement('text', 'license', array('maxlength' => "50", 'placeholder' => 'BSD'))->setLabel('License:'); $form->addElement('textarea', 'summary', array('cols' => "75", 'rows' => "7", 'maxlength' => "255"))->setLabel('Summary'); $form->addElement('textarea', 'description', array('cols' => "75", 'rows' => "12"))->setLabel('Description'); $form->addElement('select', 'category')->setLabel('Category:')->loadOptions($rows); $manager = new Tags_Manager();
$send->addPostParameter('project', 'pear1'); $response = $send->send(); $sendBody = $response->getBody(); $sendCode = $response->getCode(); */ } include_once 'PEAR/Common.php'; $roles = PEAR_Common::getUserRoles(); $csrf_token_value = create_csrf_token($csrf_token_name); ?> <h1>Package Information: <?php echo $package_name; ?> </h1> <?php print_package_navigation($pid, $package_name, '/admin/package-maintainers.php?pid=' . $pid); ?> <form name="maintainers_edit" method="post" action="?pid=<?php echo $pid; ?> "> <table class="form-holder" style="margin-bottom: 2em;" cellspacing="1" border="0"> <caption class="form-caption">Edit Maintainers list</caption> <thead class="form-label_left"> <th class="form-label_left">Handle</th><th class="form-label_left">Role</th><th class="form-label_left">Active</th><th class="form-label_left">Delete</th> </thead> <tbody> <?php foreach ($maintainers as $handle => $infos) { $select = '<select name="role[' . $handle . ']">'; foreach ($roles as $role) {