<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>PEAR_Server/Server</tt></b> on <span id="info">MAIN</span></td></tr>
<tr><td><tt><a href="#file1">Exception.php</a></tt></td><td align="right" id="added">+11</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.7">1.7</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Exception.php?r1=1.7&r2=1.8">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.8">1.8</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">restsetup.php</a></tt></td><td align="right" id="added">+1</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.4">1.4</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.4&r2=1.5">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.5">1.5</a></td></tr>
<tr><td><tt><a href="#file3">Exception.php</a></tt></td><td align="right" id="added">+11</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.7">1.7</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Exception.php?r1=1.7&r2=1.8">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.8">1.8</a></td></tr>
<tr class="alt"><td><tt><a href="#file4">restsetup.php</a></tt></td><td align="right" id="added">+1</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.4">1.4</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.4&r2=1.5">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.5">1.5</a></td></tr>
<tr><td><tt>Backend/<a href="#file5">DBDataObject.php</a></tt></td><td align="right" id="added">+119</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.24">1.24</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.24&r2=1.25">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.25">1.25</a></td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file6">DBDataObject.php</a></tt></td><td align="right" id="added">+119</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.24">1.24</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.24&r2=1.25">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.25">1.25</a></td></tr>
<tr><td><tt>Frontend/<a href="#file7">HTMLQuickForm.php</a></tt></td><td align="right" id="added">+9</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r=1.8">1.8</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r1=1.8&r2=1.9">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r=1.9">1.9</a></td></tr>
<tr><td></td><td align="right" id="added">+271</td><td align="right" id="removed">-4</td><td></td></tr>
</table>
<small id="info">7 modified files</small><br />
<pre class="comment">
won't be used in the installer, but add maintainers REST
for completeness (no email/password is shown)
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>Exception.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.7">1.7</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Exception.php?r1=1.7&r2=1.8">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.8">1.8</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- Exception.php        22 Apr 2005 02:31:14 -0000        1.7
+++ Exception.php        22 Apr 2005 23:15:34 -0000        1.8
@@ -256,4 +256,15 @@
</small></pre><pre class="diff" id="context">         parent::__construct($msg ? $msg : $this-&gt;_message);
     }
 }
</pre><pre class="diff" id="added">+
+class Chiara_PEAR_Server_ExceptionMaintainerManagesPackages extends Chiara_PEAR_Server_Exception
+{
+    protected $_message = 'Maintainer %m% cannot be deleted, this maintainer maintains packages';
+
+    public function __construct($maintainer, $msg = false)
+    {
+        $this-&gt;_data = array('m' =&gt; $maintainer);
+        parent::__construct($msg ? $msg : $this-&gt;_message);
+    }
+}
</pre><pre class="diff" id="context"> ?&gt;
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>restsetup.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.4">1.4</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.4&r2=1.5">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.5">1.5</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- restsetup.php        20 Apr 2005 23:25:39 -0000        1.4
+++ restsetup.php        22 Apr 2005 23:15:34 -0000        1.5
@@ -118,6 +118,7 @@
</small></pre><pre class="diff" id="context">         foreach ($packages as $package) {
             $this-&gt;_ui-&gt;outputData('  Package ' . $package['package']);
             $backend-&gt;savePackageREST($package['package']);
</pre><pre class="diff" id="added">+            $backend-&gt;savePackageMaintainersREST($package['package']);
</pre><pre class="diff" id="context">             $releases = $backend-&gt;listReleases($package['package']);
             if (count($releases)) {
                 $backend-&gt;saveAllReleasesREST($package['package']);
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>Exception.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.7">1.7</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Exception.php?r1=1.7&r2=1.8">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Exception.php?r=1.8">1.8</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- Exception.php        22 Apr 2005 02:31:14 -0000        1.7
+++ Exception.php        22 Apr 2005 23:15:34 -0000        1.8
@@ -256,4 +256,15 @@
</small></pre><pre class="diff" id="context">         parent::__construct($msg ? $msg : $this-&gt;_message);
     }
 }
</pre><pre class="diff" id="added">+
+class Chiara_PEAR_Server_ExceptionMaintainerManagesPackages extends Chiara_PEAR_Server_Exception
+{
+    protected $_message = 'Maintainer %m% cannot be deleted, this maintainer maintains packages';
+
+    public function __construct($maintainer, $msg = false)
+    {
+        $this-&gt;_data = array('m' =&gt; $maintainer);
+        parent::__construct($msg ? $msg : $this-&gt;_message);
+    }
+}
</pre><pre class="diff" id="context"> ?&gt;
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>restsetup.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.4">1.4</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.4&r2=1.5">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.5">1.5</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- restsetup.php        20 Apr 2005 23:25:39 -0000        1.4
+++ restsetup.php        22 Apr 2005 23:15:34 -0000        1.5
@@ -118,6 +118,7 @@
</small></pre><pre class="diff" id="context">         foreach ($packages as $package) {
             $this-&gt;_ui-&gt;outputData('  Package ' . $package['package']);
             $backend-&gt;savePackageREST($package['package']);
</pre><pre class="diff" id="added">+            $backend-&gt;savePackageMaintainersREST($package['package']);
</pre><pre class="diff" id="context">             $releases = $backend-&gt;listReleases($package['package']);
             if (count($releases)) {
                 $backend-&gt;saveAllReleasesREST($package['package']);
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server/Backend">Backend</a><br /></span>
<div class="fileheader"><big><b>DBDataObject.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.24">1.24</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.24&r2=1.25">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.25">1.25</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.24 -r1.25
--- DBDataObject.php        22 Apr 2005 02:31:15 -0000        1.24
+++ DBDataObject.php        22 Apr 2005 23:15:34 -0000        1.25
@@ -175,12 +175,52 @@
</small></pre><pre class="diff" id="context">         $ret = $releasedata-&gt;insert();
         if ($ret) {
             $this-&gt;savePackageREST($releasedata-&gt;package);
</pre><pre class="diff" id="added">+            $this-&gt;savePackageMaintainersREST($releasedata-&gt;package);
</pre><pre class="diff" id="context">             $this-&gt;saveReleaseREST($releasedata-&gt;package, $releasedata-&gt;version);
             $this-&gt;saveAllReleasesREST($releasedata-&gt;package);
         }
         return $ret;
     }
 
</pre><pre class="diff" id="added">+    public function savePackageMaintainersREST($package)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $maintainers = DB_DataObject::factory('maintainers');
+            $maintainers-&gt;package = $package;
+            $maintainers-&gt;channel = $this-&gt;_channel;
+            if ($maintainers-&gt;find(false)) {
+                $pdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'p';
+                if (!file_exists($pdir . DIRECTORY_SEPARATOR . $package)) {
+                    System::mkdir(array('-p', $pdir . DIRECTORY_SEPARATOR . $package));
+                    @chmod($pdir . DIRECTORY_SEPARATOR . $package, 0777);
+                }
+                $info = '&lt;?xml version="1.0"?&gt;
+&lt;m&gt;
+ &lt;p&gt;' . $package . '&lt;/p&gt;
+ &lt;c&gt;' . htmlspecialchars($this-&gt;_channel) . '&lt;/c&gt;
+';
+                while ($maintainers-&gt;fetch()) {
+                    $info .= ' &lt;m&gt;&lt;h&gt;' . $maintainers-&gt;handle . '&lt;/h&gt;&lt;a&gt;' . $maintainers-&gt;active .
+                        '&lt;/a&gt;&lt;/h&gt;';
+                }
+                $info .= '&lt;/m&gt;';
+                file_put_contents($pdir . DIRECTORY_SEPARATOR . $package .
+                    DIRECTORY_SEPARATOR . 'maintainers.xml', $info);
+                @chmod($pdir . DIRECTORY_SEPARATOR . $package .
+                    DIRECTORY_SEPARATOR . 'maintainers.xml', 0666);
+            }
+        }
+    }
+
</pre><pre class="diff" id="context">     public function saveAllReleasesREST($package)
     {
         $channel = DB_DataObject::factory('channels');
</pre><pre class="diff"><small id="info">@@ -928,6 +968,44 @@
</small></pre><pre class="diff" id="context">         }
     }
 
</pre><pre class="diff" id="added">+    public function deleteMaintainer($maintainer)
+    {
+        $handle = DB_DataObject::factory('handles');
+        $handle-&gt;handle = $maintainer-&gt;handle;
+        if (!$handle-&gt;find(true)) {
+            throw new Chiara_PEAR_Server_ExceptionMaintainerDoesntExist($handle-&gt;handle);
+        }
+        $packages = DB_DataObject::factory('maintainers');
+        $packages-&gt;handle = $handle-&gt;handle;
+        if ($packages-&gt;find()) {
+            throw new Chiara_PEAR_Server_ExceptionCannotDeleteMaintainer($handle-&gt;handle);
+        }
+        $ret = $packages-&gt;delete() !== false;
+        if ($ret) {
+            $this-&gt;deleteMaintainerREST($handle-&gt;handle);
+        }
+        return $ret;
+    }
+
+    public function deleteMaintainerREST(Chiara_PEAR_Server_Maintainer $maintainer)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $mdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'm';
+            if (file_exists($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle)) {
+                System::rm(array('-r', $mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle));
+            }
+        }        
+    }
+
</pre><pre class="diff" id="context">     /**
      * @param Chiara_PEAR_Server_Maintainer
      */
</pre><pre class="diff"><small id="info">@@ -941,7 +1019,42 @@
</small></pre><pre class="diff" id="context">         $handle-&gt;email = $maintainer-&gt;email;
         $handle-&gt;name = $maintainer-&gt;name;
         $handle-&gt;password = md5($maintainer-&gt;password);
</pre><pre class="diff" id="removed">-        <span id="removedchars">return</span> $handle-&gt;insert();
</pre><pre class="diff" id="added">+        <span id="addedchars">$ret&nbsp;=</span> $handle-&gt;insert();
+        if ($ret) {
+            $this-&gt;saveMaintainerREST($maintainer);
+        }
+        return $ret;
+    }
+
+    public function saveMaintainerREST(Chiara_PEAR_Server_Maintainer $maintainer)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $mdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'm';
+            if (!file_exists($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle)) {
+                System::mkdir(array('-p', $mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle));
+                @chmod($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle, 0777);
+            }
+            $info = '&lt;?xml version="1.0"?&gt;
+&lt;m&gt;
+ &lt;h&gt;' . $maintainer-&gt;handle . '&lt;/h&gt;
+ &lt;n&gt;' . htmlentities($maintainer-&gt;name) . '&lt;/n&gt;
+ &lt;u&gt;' . htmlspecialchars($uri) . '&lt;/u&gt;
+&lt;/m&gt;';
+            // package information
+            file_put_contents($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle .
+                DIRECTORY_SEPARATOR . 'info.xml', $info);
+            @chmod($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle .
+                DIRECTORY_SEPARATOR . 'info.xml', 0666);
+        }
</pre><pre class="diff" id="context">     }
 
     /**
</pre><pre class="diff"><small id="info">@@ -956,7 +1069,11 @@
</small></pre><pre class="diff" id="context">         }
         $handle-&gt;email = $maintainer-&gt;email;
         $handle-&gt;name = $maintainer-&gt;name;
</pre><pre class="diff" id="removed">-        return $handle-&gt;update();
</pre><pre class="diff" id="added">+        $ret = $handle-&gt;update() !== false;
+        if ($ret) {
+            $this-&gt;saveMaintainerREST();
+        }
+        return $ret;
</pre><pre class="diff" id="context">     }
 
     /**
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server/Backend">Backend</a><br /></span>
<div class="fileheader"><big><b>DBDataObject.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.24">1.24</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.24&r2=1.25">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.25">1.25</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.24 -r1.25
--- DBDataObject.php        22 Apr 2005 02:31:15 -0000        1.24
+++ DBDataObject.php        22 Apr 2005 23:15:34 -0000        1.25
@@ -175,12 +175,52 @@
</small></pre><pre class="diff" id="context">         $ret = $releasedata-&gt;insert();
         if ($ret) {
             $this-&gt;savePackageREST($releasedata-&gt;package);
</pre><pre class="diff" id="added">+            $this-&gt;savePackageMaintainersREST($releasedata-&gt;package);
</pre><pre class="diff" id="context">             $this-&gt;saveReleaseREST($releasedata-&gt;package, $releasedata-&gt;version);
             $this-&gt;saveAllReleasesREST($releasedata-&gt;package);
         }
         return $ret;
     }
 
</pre><pre class="diff" id="added">+    public function savePackageMaintainersREST($package)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $maintainers = DB_DataObject::factory('maintainers');
+            $maintainers-&gt;package = $package;
+            $maintainers-&gt;channel = $this-&gt;_channel;
+            if ($maintainers-&gt;find(false)) {
+                $pdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'p';
+                if (!file_exists($pdir . DIRECTORY_SEPARATOR . $package)) {
+                    System::mkdir(array('-p', $pdir . DIRECTORY_SEPARATOR . $package));
+                    @chmod($pdir . DIRECTORY_SEPARATOR . $package, 0777);
+                }
+                $info = '&lt;?xml version="1.0"?&gt;
+&lt;m&gt;
+ &lt;p&gt;' . $package . '&lt;/p&gt;
+ &lt;c&gt;' . htmlspecialchars($this-&gt;_channel) . '&lt;/c&gt;
+';
+                while ($maintainers-&gt;fetch()) {
+                    $info .= ' &lt;m&gt;&lt;h&gt;' . $maintainers-&gt;handle . '&lt;/h&gt;&lt;a&gt;' . $maintainers-&gt;active .
+                        '&lt;/a&gt;&lt;/h&gt;';
+                }
+                $info .= '&lt;/m&gt;';
+                file_put_contents($pdir . DIRECTORY_SEPARATOR . $package .
+                    DIRECTORY_SEPARATOR . 'maintainers.xml', $info);
+                @chmod($pdir . DIRECTORY_SEPARATOR . $package .
+                    DIRECTORY_SEPARATOR . 'maintainers.xml', 0666);
+            }
+        }
+    }
+
</pre><pre class="diff" id="context">     public function saveAllReleasesREST($package)
     {
         $channel = DB_DataObject::factory('channels');
</pre><pre class="diff"><small id="info">@@ -928,6 +968,44 @@
</small></pre><pre class="diff" id="context">         }
     }
 
</pre><pre class="diff" id="added">+    public function deleteMaintainer($maintainer)
+    {
+        $handle = DB_DataObject::factory('handles');
+        $handle-&gt;handle = $maintainer-&gt;handle;
+        if (!$handle-&gt;find(true)) {
+            throw new Chiara_PEAR_Server_ExceptionMaintainerDoesntExist($handle-&gt;handle);
+        }
+        $packages = DB_DataObject::factory('maintainers');
+        $packages-&gt;handle = $handle-&gt;handle;
+        if ($packages-&gt;find()) {
+            throw new Chiara_PEAR_Server_ExceptionCannotDeleteMaintainer($handle-&gt;handle);
+        }
+        $ret = $packages-&gt;delete() !== false;
+        if ($ret) {
+            $this-&gt;deleteMaintainerREST($handle-&gt;handle);
+        }
+        return $ret;
+    }
+
+    public function deleteMaintainerREST(Chiara_PEAR_Server_Maintainer $maintainer)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $mdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'm';
+            if (file_exists($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle)) {
+                System::rm(array('-r', $mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle));
+            }
+        }        
+    }
+
</pre><pre class="diff" id="context">     /**
      * @param Chiara_PEAR_Server_Maintainer
      */
</pre><pre class="diff"><small id="info">@@ -941,7 +1019,42 @@
</small></pre><pre class="diff" id="context">         $handle-&gt;email = $maintainer-&gt;email;
         $handle-&gt;name = $maintainer-&gt;name;
         $handle-&gt;password = md5($maintainer-&gt;password);
</pre><pre class="diff" id="removed">-        <span id="removedchars">return</span> $handle-&gt;insert();
</pre><pre class="diff" id="added">+        <span id="addedchars">$ret&nbsp;=</span> $handle-&gt;insert();
+        if ($ret) {
+            $this-&gt;saveMaintainerREST($maintainer);
+        }
+        return $ret;
+    }
+
+    public function saveMaintainerREST(Chiara_PEAR_Server_Maintainer $maintainer)
+    {
+        $channel = DB_DataObject::factory('channels');
+        $channel-&gt;channel = $this-&gt;_channel;
+        $channel-&gt;find(true);
+        if ($channel-&gt;rest_support) {
+            $channelinfo = parse_url($this-&gt;_channel);
+            if (isset($channelinfo['host'])) {
+                $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+            } else {
+                $extra = '/Chiara_PEAR_Server_REST/';
+            }
+            $mdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'm';
+            if (!file_exists($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle)) {
+                System::mkdir(array('-p', $mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle));
+                @chmod($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle, 0777);
+            }
+            $info = '&lt;?xml version="1.0"?&gt;
+&lt;m&gt;
+ &lt;h&gt;' . $maintainer-&gt;handle . '&lt;/h&gt;
+ &lt;n&gt;' . htmlentities($maintainer-&gt;name) . '&lt;/n&gt;
+ &lt;u&gt;' . htmlspecialchars($uri) . '&lt;/u&gt;
+&lt;/m&gt;';
+            // package information
+            file_put_contents($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle .
+                DIRECTORY_SEPARATOR . 'info.xml', $info);
+            @chmod($mdir . DIRECTORY_SEPARATOR . $maintainer-&gt;handle .
+                DIRECTORY_SEPARATOR . 'info.xml', 0666);
+        }
</pre><pre class="diff" id="context">     }
 
     /**
</pre><pre class="diff"><small id="info">@@ -956,7 +1069,11 @@
</small></pre><pre class="diff" id="context">         }
         $handle-&gt;email = $maintainer-&gt;email;
         $handle-&gt;name = $maintainer-&gt;name;
</pre><pre class="diff" id="removed">-        return $handle-&gt;update();
</pre><pre class="diff" id="added">+        $ret = $handle-&gt;update() !== false;
+        if ($ret) {
+            $this-&gt;saveMaintainerREST();
+        }
+        return $ret;
</pre><pre class="diff" id="context">     }
 
     /**
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server/Frontend">Frontend</a><br /></span>
<div class="fileheader"><big><b>HTMLQuickForm.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r=1.8">1.8</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r1=1.8&r2=1.9">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Frontend/HTMLQuickForm.php?r=1.9">1.9</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- HTMLQuickForm.php        22 Apr 2005 02:31:15 -0000        1.8
+++ HTMLQuickForm.php        22 Apr 2005 23:15:34 -0000        1.9
@@ -617,6 +617,15 @@
</small></pre><pre class="diff" id="context">     {
         try {
             $info = $this-&gt;_backend-&gt;getMaintainer($maintainer);
</pre><pre class="diff" id="added">+            if (isset($_REQUEST['deleteMaintainer'])) {
+                if (!$this-&gt;_backend-&gt;deleteMaintainer($info)) {
+                    throw new Chiara_PEAR_Server_ExceptionMaintainerDoesntExist($maintainer);
+                }
+                $this-&gt;_quickForm-&gt;addElement('header', '', 'Maintainer "' . $maintainer
+                    . '" deleted successfully');
+                echo $this-&gt;_quickForm-&gt;toHtml();
+                return;
+            }
</pre><pre class="diff" id="context">             if (isset($_REQUEST['submitted'])) {
                 if ($this-&gt;_quickForm-&gt;validate()) {
                     $stuff = $this-&gt;_quickForm-&gt;getSubmitValues();
</pre></div>
</body></html><pre>