logo       
Google Custom Search
    AddThis Social Bookmark Button

cvs: pearweb /include pear-database-maintainer.php /public_html channel.xm: msg#00172

Subject: cvs: pearweb /include pear-database-maintainer.php /public_html channel.xml release-upload.php
cellog          Sun Jun 17 18:02:21 2007 UTC

  Modified files:              
    /pearweb/include    pear-database-maintainer.php 
    /pearweb/public_html        channel.xml release-upload.php 
  Log:
  fix issues in release upload process discovered in unit testing
  
http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database-maintainer.php?r1=1.2&r2=1.3&diff_format=u
Index: pearweb/include/pear-database-maintainer.php
diff -u pearweb/include/pear-database-maintainer.php:1.2 
pearweb/include/pear-database-maintainer.php:1.3
--- pearweb/include/pear-database-maintainer.php:1.2    Mon Apr 23 04:21:41 2007
+++ pearweb/include/pear-database-maintainer.php        Sun Jun 17 18:02:21 2007
@@ -159,7 +159,7 @@
      * @param bool Whether to print the logging information to the screen
      * @return mixed PEAR_Error or true
      */
-    static function updateAll($pkgid, $users, $print = false)
+    static function updateAll($pkgid, $users, $print = false, $releasing = 
false)
     {
         require_once "Damblan/Log.php";
 
@@ -199,6 +199,11 @@
                                     "in package.xml or let the new lead 
developer upload ".
                                     "the new release");
         }
+        if ($releasing && user::maintains($auth_user->handle, (int)$pkgid, 
'lead') &&
+              $users[$auth_user->handle]['role'] != 'lead') {
+            return PEAR::raiseError('You cannot demote your role from lead to 
' .
+                $users[$auth_user->handle]['role']);
+        }
         foreach ($users as $user => $u) {
             $role = $u['role'];
             $active = $u['active'];
http://cvs.php.net/viewvc.cgi/pearweb/public_html/channel.xml?r1=1.10&r2=1.11&diff_format=u
Index: pearweb/public_html/channel.xml
diff -u pearweb/public_html/channel.xml:1.10 
pearweb/public_html/channel.xml:1.11
--- pearweb/public_html/channel.xml:1.10        Sun Mar 25 21:55:02 2007
+++ pearweb/public_html/channel.xml     Sun Jun 17 18:02:21 2007
@@ -33,12 +33,12 @@
     <baseurl type="REST1.3">http://us.pear.php.net/rest/</baseurl>
    </rest>
   </mirror>
-  <mirror host="de.pear.php.net">
+  <mirror host="de.pear.php.net" ssl="yes" port="3452">
    <rest>
-    <baseurl type="REST1.0">http://de.pear.php.net/rest/</baseurl>
-    <baseurl type="REST1.1">http://de.pear.php.net/rest/</baseurl>
-    <baseurl type="REST1.2">http://de.pear.php.net/rest/</baseurl>
-    <baseurl type="REST1.3">http://de.pear.php.net/rest/</baseurl>
+    <baseurl type="REST1.0">https://de.pear.php.net:3452/rest/</baseurl>
+    <baseurl type="REST1.1">https://de.pear.php.net:3452/rest/</baseurl>
+    <baseurl type="REST1.2">https://de.pear.php.net:3452/rest/</baseurl>
+    <baseurl type="REST1.3">https://de.pear.php.net:3452/rest/</baseurl>
    </rest>
   </mirror>
  </servers>
http://cvs.php.net/viewvc.cgi/pearweb/public_html/release-upload.php?r1=1.89&r2=1.90&diff_format=u
Index: pearweb/public_html/release-upload.php
diff -u pearweb/public_html/release-upload.php:1.89 
pearweb/public_html/release-upload.php:1.90
--- pearweb/public_html/release-upload.php:1.89 Fri Jun 15 04:54:41 2007
+++ pearweb/public_html/release-upload.php      Sun Jun 17 18:02:21 2007
@@ -15,7 +15,7 @@
    +----------------------------------------------------------------------+
    | Authors:                                                             |
    +----------------------------------------------------------------------+
-   $Id: release-upload.php,v 1.89 2007/06/15 04:54:41 cellog Exp $
+   $Id: release-upload.php,v 1.90 2007/06/17 18:02:21 cellog Exp $
 */
 
 auth_require('pear.dev');
@@ -117,16 +117,6 @@
             if (is_array($license)) {
                 $license = $license['_content'];
             }
-            $e = package::updateInfo($pacid,
-                    array(
-                        'summary'     => $info->getSummary(),
-                        'description' => $info->getDescription(),
-                        'license'     => $license,
-                    ));
-            if (PEAR::isError($e)) {
-                $errors[] = $e->getMessage();
-                break;
-            }
             $users = array();
             foreach ($info->getMaintainers() as $user) {
                 $users[strtolower($user['handle'])] = array(
@@ -136,7 +126,17 @@
             }
 
             include_once 'pear-database-maintainer.php';
-            $e = maintainer::updateAll($pacid, $users);
+            $e = maintainer::updateAll($pacid, $users, false, true);
+            if (PEAR::isError($e)) {
+                $errors[] = $e->getMessage();
+                break;
+            }
+            $e = package::updateInfo($pacid,
+                    array(
+                        'summary'     => $info->getSummary(),
+                        'description' => $info->getDescription(),
+                        'license'     => $license,
+                    ));
             if (PEAR::isError($e)) {
                 $errors[] = $e->getMessage();
                 break;



<Prev in Thread] Current Thread [Next in Thread>