cvs: pearweb / package.php package.xml /include pear-database.php pear-rest.php /public_html package-edit.php package-info.php /sql packages.sql
pearweb_mdb2schema.xml

From: Date: Sat, 10 Feb 2007 05:49:12 +0000
Subject: cvs: pearweb / package.php package.xml /include pear-database.php pear-rest.php /public_html package-edit.php package-info.php /sql packages.sql
pearweb_mdb2schema.xml
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-5391@lists.php.net to get a copy of this message
cellog Sat Feb 10 05:49:12 2007 UTC Modified files: /pearweb/include pear-database.php pear-rest.php /pearweb package.php package.xml /pearweb/public_html package-edit.php package-info.php /pearweb/sql packages.sql pearweb_mdb2schema.xml Log: * fix Bug #9603: deprecated packages should use channel/package

http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database.php?r1=1.329&r2=1.330&diff_format=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.329 pearweb/include/pear-database.php:1.330 --- pearweb/include/pear-database.php:1.329 Sat Feb 3 00:36:25 2007 +++ pearweb/include/pear-database.php Sat Feb 10 05:49:12 2007 @@ -18,7 +18,7 @@ | Martin Jansen <mj@php.net> | | Gregory Beaver <cellog@php.net> | +----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.329 2007/02/03 00:36:25 cellog Exp $ + $Id: pear-database.php,v 1.330 2007/02/10 05:49:12 cellog Exp $ */ require_once 'DB/storage.php'; @@ -701,8 +701,10 @@ "p.description AS description, p.cvs_link AS cvs_link, ". "p.doc_link as doc_link, ". "p.unmaintained AS unmaintained,". - "p.newpk_id AS newpk_id,". - "p.blocktrackbacks" . + "p.newpk_id AS newpk_id, + p.newpackagename as new_package, + p.newchannel as new_channel, + p.blocktrackbacks" . " FROM packages p, categories c ". "WHERE " . $package_type . " c.id = p.category AND p.{$what} = ?"; $rel_sql = "SELECT version, id, doneby, license, summary, ". @@ -726,9 +728,6 @@ $info['notes'] = $dbh->getAssoc($notes_sql, false, array(@$info['packageid']), DB_FETCHMODE_ASSOC); - if (isset($info['newpk_id'])) { - $info['new_package'] = $dbh->getOne($newpk_sql, $info['newpk_id']); - } $deps = $dbh->getAll($deps_sql, array(@$info['packageid']), DB_FETCHMODE_ASSOC); http://cvs.php.net/viewvc.cgi/pearweb/include/pear-rest.php?r1=1.29&r2=1.30&diff_format=u Index: pearweb/include/pear-rest.php diff -u pearweb/include/pear-rest.php:1.29 pearweb/include/pear-rest.php:1.30 --- pearweb/include/pear-rest.php:1.29 Wed Dec 13 00:10:32 2006 +++ pearweb/include/pear-rest.php Sat Feb 10 05:49:12 2007 @@ -241,12 +241,11 @@ } else { $parent = ''; } - if ($package['unmaintained'] && $package['newpk_id']) { - $dpackage = $dbh->getOne('SELECT packages.name FROM packages WHERE - id = ' . $package['newpk_id']); + if ($package['new_package']) { + $dpackage = $package['new_package']; $deprecated = ' -<dc>pear.php.net</dc> -<dp href="' . $extra . 'p/' . strtolower($dpackage) . '"> ' . +<dc>' . $package['new_channel'] . '</dc> +<dp> ' . $dpackage . '</dp>'; } else { $deprecated = ''; http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.73&r2=1.74&diff_format=u Index: pearweb/package.php diff -u pearweb/package.php:1.73 pearweb/package.php:1.74 --- pearweb/package.php:1.73 Sat Feb 10 04:58:18 2007 +++ pearweb/package.php Sat Feb 10 05:49:12 2007 @@ -20,6 +20,7 @@ $a->setNotes(' * fix Bug #10039: Bug suggestions return duplicate and incorrect bug titles * fix Bug #10040: Download page shows <conflicts/> deps as "dependencies" +* fix Bug #9603: deprecated packages should use channel/package '); $a->resetUsesrole(); $a->addUsesRole('web', 'Role_Web', 'pearified.com'); http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.105&r2=1.106&diff_format=u Index: pearweb/package.xml diff -u pearweb/package.xml:1.105 pearweb/package.xml:1.106 --- pearweb/package.xml:1.105 Sat Feb 10 04:58:18 2007 +++ pearweb/package.xml Sat Feb 10 05:49:12 2007 @@ -53,7 +53,7 @@ <active>no</active> </developer> <date>2007-02-09</date> - <time>22:57:47</time> + <time>23:48:49</time> <version> <release>1.2.5</release> <api>0.1.1</api> @@ -66,6 +66,7 @@ <notes> * fix Bug #10039: Bug suggestions return duplicate and incorrect bug titles * fix Bug #10040: Download page shows &lt;conflicts/&gt; deps as &quot;dependencies&quot; +* fix Bug #9603: deprecated packages should use channel/package </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -1233,6 +1234,7 @@ <notes> * fix Bug #10039: Bug suggestions return duplicate and incorrect bug titles * fix Bug #10040: Download page shows &lt;conflicts/&gt; deps as &quot;dependencies&quot; +* fix Bug #9603: deprecated packages should use channel/package </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pearweb/public_html/package-edit.php?r1=1.41&r2=1.42&diff_format=u Index: pearweb/public_html/package-edit.php diff -u pearweb/public_html/package-edit.php:1.41 pearweb/public_html/package-edit.php:1.42 --- pearweb/public_html/package-edit.php:1.41 Sat Jan 7 18:13:10 2006 +++ pearweb/public_html/package-edit.php Sat Feb 10 05:49:12 2007 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: package-edit.php,v 1.41 2006/01/07 18:13:10 danielc Exp $ + $Id: package-edit.php,v 1.42 2007/02/10 05:49:12 cellog Exp $ */ /* @@ -65,13 +65,32 @@ if (isset($_POST['submit'])) { if (!$_POST['name'] || !$_POST['license'] || !$_POST['summary']) { report_error('You have to enter values for name, license and summary!'); + } elseif (($_POST['new_channel'] && !$_POST['new_package']) || + ($_POST['new_package'] && !$_POST['new_channel'])) { + report_error('You have to enter both channel + package name for packages moved out of PEAR!'); } else { $query = 'UPDATE packages SET name = ?, license = ?, summary = ?, description = ?, category = ?, homepage = ?, package_type = ?, doc_link = ?, cvs_link = ?, - unmaintained = ?, newpk_id = ? + unmaintained = ?, newpk_id = ?, newchannel = ?, newpackagename = ? WHERE id = ?'; + if (!empty($_POST['newpk_id'])) { + $_POST['new_channel'] = 'pear.php.net'; + $_POST['new_package'] = $dbh->getOne('SELECT name from packages WHERE id=?', + array($_POST['newpk_id'])); + if (!$_POST['new_package']) { + $_POST['new_channel'] = $_POST['newpk_id'] = null; + } + } else { + if ($_POST['new_channel'] == 'pear.php.net') { + $_POST['newpk_id'] = $dbh->getOne('SELECT id from packages WHERE name=?', + array($_POST['new_package'])); + if (!$_POST['newpk_id']) { + $_POST['new_channel'] = $_POST['new_package'] = null; + } + } + } $qparams = array( $_POST['name'], $_POST['license'], @@ -84,6 +103,8 @@ $_POST['cvs_link'], isset($_POST['unmaintained']) ? 1 : 0 , isset($_POST['newpk_id']) ? $_POST['newpk_id'] : null, + $_POST['new_channel'], + $_POST['new_package'], $_GET['id'] ); @@ -200,8 +221,9 @@ </td> </tr> <tr> - <th class="form-label_left">New package (superceding this one):</th> + <th class="form-label_left">New package (superseding this one):</th> <td class="form-input"> + Choose either a PEAR package: <?php $packages = package::listAllwithReleases(); @@ -214,7 +236,14 @@ } $form->displaySelect('newpk_id', $rows, (int)$row['newpk_id']); -?> +?><br /> +Or a package moved out of PEAR<br />Channel: +<?php $form->displayText('new_channel', + htmlspecialchars($row['new_channel']), 50, 255); ?><br /> +Package: + <?php $form->displayText('new_package', + htmlspecialchars($row['new_package']), 50, 255); ?> + </td> </tr> <tr> http://cvs.php.net/viewvc.cgi/pearweb/public_html/package-info.php?r1=1.126&r2=1.127&diff_format=u Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.126 pearweb/public_html/package-info.php:1.127 --- pearweb/public_html/package-info.php:1.126 Sat Feb 10 04:58:18 2007 +++ pearweb/public_html/package-info.php Sat Feb 10 05:49:12 2007 @@ -16,7 +16,7 @@ | Authors: Martin Jansen <mj@php.net> | | Tomas V.V.Cox <cox@idecnet.com> | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.126 2007/02/10 04:58:18 cellog Exp $ + $Id: package-info.php,v 1.127 2007/02/10 05:49:12 cellog Exp $ */ @@ -146,7 +146,7 @@ $cvs_link = $pkg['cvs_link']; $doc_link = $pkg['doc_link']; $unmaintained = ($pkg['unmaintained']) ? 'Y' : 'N'; -$superseded_by_new_package = htmlspecialchars($pkg['new_package']); +$supersede = (bool) $pkg['new_package']; // Maintainer information $maintainers = maintainer::get($pacid); @@ -215,9 +215,9 @@ // {{{ Supeseded checks $dec_messages = array( - 'abandoned' => 'This package is not maintained anymore and has been superseded by <a href="/package/{{PACKAGE_NAME}}">{{PACKAGE_NAME}}</a>.', - 'superseded' => 'This package been superseded by <a href="/package/{{PACKAGE_NAME}}">{{PACKAGE_NAME}}</a> 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>' + 'abandoned' => 'This package is not maintained anymore and has been superseded.', + 'superseded' => 'This package 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( @@ -226,7 +226,7 @@ 'unmaintained' => array('superseded' => 'N', 'unmaintained' => 'Y'), ); - if ($superseded_by_new_package != '') { + if ($supersede) { $superseded = 'Y'; } else { $superseded = 'N'; @@ -248,7 +248,15 @@ if (!is_null($apply_rule) && isset($dec_messages[$apply_rule])) { $str = '<div class="warnings">'; - $str .= str_replace('{{PACKAGE_NAME}}', $superseded_by_new_package, $dec_messages[$apply_rule]); + $str .= $dec_messages[$apply_rule]; + if ($pkg['new_channel'] == 'pear.php.net') { + $str .= ' Use <a href="/package/' . $pkg['new_package'] . + '">' . htmlspecialchars($pkg['new_package']) . '</a> instead.'; + } else { + $str .= ' Package has moved to channel <a href="http://' . $pkg['new_channel'] . + '">' . htmlspecialchars($pkg['new_channel']) . '</a>, package ' . + $pkg['new_package'] . '.'; + } $str .= '</div>'; echo $str; } http://cvs.php.net/viewvc.cgi/pearweb/sql/packages.sql?r1=1.21&r2=1.22&diff_format=u Index: pearweb/sql/packages.sql diff -u pearweb/sql/packages.sql:1.21 pearweb/sql/packages.sql:1.22 --- pearweb/sql/packages.sql:1.21 Thu Feb 23 22:33:32 2006 +++ pearweb/sql/packages.sql Sat Feb 10 05:49:12 2007 @@ -20,6 +20,8 @@ blocktrackbacks tinyint(1) NOT NULL default '0', unmaintained tinyint(1) NOT NULL default '0', newpk_id int(11) default NULL, + newpackagename varchar(100) default NULL, + newchannel varchar(255) default NULL, PRIMARY KEY (id), UNIQUE KEY name (name), KEY category (category) http://cvs.php.net/viewvc.cgi/pearweb/sql/pearweb_mdb2schema.xml?r1=1.17&r2=1.18&diff_format=u Index: pearweb/sql/pearweb_mdb2schema.xml diff -u pearweb/sql/pearweb_mdb2schema.xml:1.17 pearweb/sql/pearweb_mdb2schema.xml:1.18 --- pearweb/sql/pearweb_mdb2schema.xml:1.17 Mon Dec 18 10:13:23 2006 +++ pearweb/sql/pearweb_mdb2schema.xml Sat Feb 10 05:49:12 2007 @@ -1547,6 +1547,20 @@ <default></default> </field> + <field> + <name>newpackagename</name> + <type>text</type> + <length>100</length> + <notnull>false</notnull> + </field> + + <field> + <name>newchannel</name> + <type>text</type> + <length>255</length> + <notnull>false</notnull> + </field> + <index> <name>category</name> <field>
« previous php.pear.core (#5391) next »