<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/Backend</tt></b> on <span id="info">MAIN</span></td></tr>
<tr><td><tt><a href="#file1">DBDataObject.php</a></tt></td><td align="right" id="added">+18</td><td align="right" id="removed">-12</td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.17">1.17</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.17&r2=1.18">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.18">1.18</a></td></tr>
</table>
<pre class="comment">
fix remaining logic bugs in REST setup

# rethinking needed of version.txt files
</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>/<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.17">1.17</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.17&r2=1.18">-&gt;</a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.18">1.18</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.17 -r1.18
--- DBDataObject.php        20 Apr 2005 04:19:13 -0000        1.17
+++ DBDataObject.php        20 Apr 2005 14:18:12 -0000        1.18
@@ -179,9 +179,9 @@
</small></pre><pre class="diff" id="context">         if ($channel-&gt;rest_support) {
             $channelinfo = parse_url($this-&gt;_channel);
             if (isset($channelinfo['host'])) {
</pre><pre class="diff" id="removed">-                $extra = $channelinfo['path'] . '/';
</pre><pre class="diff" id="added">+                $extra = $channelinfo['path'] . '/<span id="addedchars">Chiara_PEAR_Server_REST/</span>';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-                $extra = '/';
</pre><pre class="diff" id="added">+                $extra = '/Chiara_PEAR_Server_REST';
</pre><pre class="diff" id="context">             }
             $releasedata = DB_DataObject::factory('releases');
             $releasedata-&gt;channel = $this-&gt;_channel;
</pre><pre class="diff"><small id="info">@@ -191,7 +191,7 @@
</small></pre><pre class="diff" id="context">                 throw new PEAR_Server_ExceptionReleaseNotFound($package, $version);
             }
             $release = $releasedata-&gt;toArray();
</pre><pre class="diff" id="removed">-            $rdir = $<span id="removedchars">restroot</span> . DIRECTORY_SEPARATOR . 'r';
</pre><pre class="diff" id="added">+            $rdir = $<span id="addedchars">this-&gt;_restdir</span> . DIRECTORY_SEPARATOR . 'r';
</pre><pre class="diff" id="context">             if (!file_exists($rdir . DIRECTORY_SEPARATOR . $package)) {
                 System::mkdir(array('-p', $rdir . DIRECTORY_SEPARATOR . $package));
                 @chmod($rdir . DIRECTORY_SEPARATOR . $package, 0777);
</pre><pre class="diff"><small id="info">@@ -236,13 +236,13 @@
</small></pre><pre class="diff" id="context">  &lt;s&gt;' . htmlspecialchars($release['summary']) . '&lt;/s&gt;
  &lt;d&gt;' . htmlspecialchars($release['description']) . '&lt;/d&gt;
  &lt;da&gt;' . $release['releasedate'] . '&lt;/da&gt;
</pre><pre class="diff" id="removed">- &lt;n&gt;' . htmlspecialchars($release['notes']) . '&lt;/n&gt;
- &lt;g&gt;http://' . $this-&gt;channel . '/get/' . $release['package'] . '-' . $release['version'] . '&lt;/g&gt;
</pre><pre class="diff" id="added">+ &lt;n&gt;' . htmlspecialchars($release['releasenotes']) . '&lt;/n&gt;
+ &lt;g&gt;http://' . $this-&gt;_channel . '/get/' . $release['package'] . '-' . $release['version'] . '&lt;/g&gt;
</pre><pre class="diff" id="context">  &lt;x xlink:href="package.' . $version . '.xml"/&gt;
 &lt;/r&gt;';
             file_put_contents($rdir . DIRECTORY_SEPARATOR . $version . '.xml', $info);
             @chmod($rdir . DIRECTORY_SEPARATOR . $version . '.xml', 0666);
</pre><pre class="diff" id="removed">-            file_put_contents($rdir . DIRECTORY_SEPARATOR . $<span id="removedchars">packag</span>e['package'] .
</pre><pre class="diff" id="added">+            file_put_contents($rdir . DIRECTORY_SEPARATOR . $<span id="addedchars">releas</span>e['package'] .
</pre><pre class="diff" id="context">                 DIRECTORY_SEPARATOR . 'package.' .
                 $version . '.xml', $this-&gt;getPackageXml($release['package'], $version));
             @chmod($rdir . DIRECTORY_SEPARATOR . $package['package'] .
</pre><pre class="diff"><small id="info">@@ -354,6 +354,7 @@
</small></pre><pre class="diff" id="context">         $categories-&gt;name = $category;
         if ($categories-&gt;find(true)) {
             return $categories-&gt;toArray();
</pre><pre class="diff" id="added">+        } else {
</pre><pre class="diff" id="context">             if ($category == 'Default') {
                 return array(
                     'id' =&gt; 0,
</pre><pre class="diff"><small id="info">@@ -363,7 +364,6 @@
</small></pre><pre class="diff" id="context">                     'alias' =&gt; 'Default',
                 );
             }
</pre><pre class="diff" id="removed">-        } else {
</pre><pre class="diff" id="context">             throw new Chiara_PEAR_Server_ExceptionCategoryDoesntExist($id, $channel);
         }
     }
</pre><pre class="diff"><small id="info">@@ -388,7 +388,13 @@
</small></pre><pre class="diff" id="context">         $categories-&gt;channel = $this-&gt;_channel;
         $categories-&gt;orderby('name');
         $categories-&gt;find(false);
</pre><pre class="diff" id="removed">-        $ret = array(<span id="removedchars">'Default');</span>
</pre><pre class="diff" id="added">+        $ret = array(<span id="addedchars">array(</span>
+                    'id' =&gt; 0,
+                    'channel' =&gt; $this-&gt;_channel,
+                    'name' =&gt; 'Default',
+                    'description' =&gt; 'Default Category',
+                    'alias' =&gt; 'Default',
+                ));
</pre><pre class="diff" id="context">         while ($categories-&gt;fetch()) {
             $ret[] = $categories-&gt;toArray();
         }
</pre><pre class="diff"><small id="info">@@ -423,9 +429,9 @@
</small></pre><pre class="diff" id="context">         if ($channel-&gt;rest_support) {
             $channelinfo = parse_url($this-&gt;_channel);
             if (isset($channelinfo['host'])) {
</pre><pre class="diff" id="removed">-                $extra = $channelinfo['path'] . '/';
</pre><pre class="diff" id="added">+                $extra = $channelinfo['path'] . '/<span id="addedchars">Chiara_PEAR_Server_REST/</span>';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-                $extra = '/';
</pre><pre class="diff" id="added">+                $extra = '/Chiara_PEAR_Server_REST';
</pre><pre class="diff" id="context">             }
             $cdir = $this-&gt;_restdir . DIRECTORY_SEPARATOR . 'c';
             $category = $this-&gt;categoryInfo($category);
</pre><pre class="diff"><small id="info">@@ -469,9 +475,9 @@
</small></pre><pre class="diff" id="context">         if ($channel-&gt;rest_support) {
             $channelinfo = parse_url($this-&gt;_channel);
             if (isset($channelinfo['host'])) {
</pre><pre class="diff" id="removed">-                $extra = $channelinfo['path'] . '/';
</pre><pre class="diff" id="added">+                $extra = $channelinfo['path'] . '/<span id="addedchars">Chiara_PEAR_Server_REST/</span>';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-                $extra = '/';
</pre><pre class="diff" id="added">+                $extra = '/Chiara_PEAR_Server_REST';
</pre><pre class="diff" id="context">             }
             $packages = DB_DataObject::factory('packages');
             $packages-&gt;channel = $this-&gt;_channel;
</pre></div>
</body></html><pre>