Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r582 - trunk/wsvn.php

websvn
Discussion topic

Back to topic list

svn commit: r582 - trunk/wsvn.php

Reply

Author tarmes
Full name Tim Armes
Date 2007-08-13 00:06:30 PDT
Message Author: tarmes
Date: 2007-08-13 00:06:30-0700
New Revision: 582

Modified:
   trunk/wsvn.php

Log:
Modification of patch received by Patrick Ruckstuhl to allow repositories to be name without the trailing slash when accessing via multiviews.

Modified: trunk/wsvn.php
Url: http://websvn.tigris​.org/source/browse/w​ebsvn/trunk/wsvn.php​?view=diff&rev=5​82&p1=trunk/wsvn​.php&p2=trunk/ws​vn.php&r1=581​&r2=582
====================​====================​====================​==================
--- trunk/wsvn.php (original)
+++ trunk/wsvn.php 2007-08-13 00:06:30-0700
@@ -79,22 +79,19 @@
    // having a slash in it
 
    $found = false;
+
+ $pos = strpos($path, '/');
+ if ($pos === false) $pos = strlen($path);
+ $name = substr($path, 0, $pos);
 
    foreach ($config->getRepositories() as $rep)
    {
- $pos = strlen($rep->get​DisplayName());
- if (strlen($path) < $pos)
- continue;
-
- $name = substr($path, 0, $pos);
       if (strcasecmp($rep-​>getDisplayName(), $name) == 0)
       {
- $tpath = substr($path, $pos);
- if ($tpath[0] == "/") {
- $found = true;
- $path = $tpath;
- break;
- }
+ $found = true;
+ $path = substr($path, $pos);
+ if ($path == '') $path = '/';
+ break;
       }
    }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r582 - trunk/wsvn.php tarmes Tim Armes 2007-08-13 00:06:30 PDT
Messages per page: