OSDN Git Service

・r1.121 の修正で 2ch 互換外部板の URL が解釈できなくなっていたので修正。
authoryoffy <yoffy>
Fri, 9 Apr 2004 04:10:56 +0000 (04:10 +0000)
committeryoffy <yoffy>
Fri, 9 Apr 2004 04:10:56 +0000 (04:10 +0000)
GikoSystem.pas

index d4803a7..016f62d 100644 (file)
@@ -3156,12 +3156,17 @@ function        TGikoSys.Get2chThreadURL2BoardURL(
 var
        Protocol, Host, Path, Document, Port, Bookmark : string;
        BBSID, BBSKey : string;
+       foundPos                        : Integer;
 begin
 
        ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );
        Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
 
-       Result := Protocol + '://' + Host + '/' + BBSID + '/';
+       foundPos := Pos( '/test/read.cgi', inURL );
+       if foundPos > 0 then
+               Result := Copy( inURL, 1, foundPos ) + BBSID + '/'
+       else
+               Result := Protocol + '://' + Host + '/' + BBSID + '/';
 
 end;
 
@@ -3185,8 +3190,12 @@ begin
                        Result := Protocol + '://' + Host +
                                READ_PATH + BBSID + '/' + BBSKey + '/l50';
                end else begin
-                       Result := Protocol + '://' + Host +
-                               OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50';
+                       if foundPos > 0 then
+                               Result := Copy( inURL, 1, foundPos ) +
+                                       OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50'
+                       else
+                               Result := Protocol + '://' + Host +
+                                       OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50';
                end;
 //     end;