OSDN Git Service

・アンカーのリンク先が2ちゃんねるだった場合に IE で開くようになってしまっていたので修正。
authoryoffy <yoffy>
Sat, 22 Nov 2003 17:06:14 +0000 (17:06 +0000)
committeryoffy <yoffy>
Sat, 22 Nov 2003 17:06:14 +0000 (17:06 +0000)
・アンカーのリンク先が2ちゃんねるの過去ログだった場合に対応していなかったので修正。

Giko.pas
GikoSystem.pas

index e78cfc6..f56d607 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -5992,8 +5992,8 @@ end;
 
 procedure TGikoForm.MoveToURL(URL: string);
 var
-       Host : string;
-       BBSKey: string;
+       protocol, host, path, document, port, bookmark : string;
+       BBSID, BBSKey: string;
        Board: TBoard;
        ThreadItem: TThreadItem;
        i, bi                                   : Integer;
@@ -6071,7 +6071,8 @@ begin
                // exception \82ª\94­\90\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
        end;
 
-       Host := GikoSys.UrlToServer( URL );
+       GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
+       GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
 
        if GikoSys.Is2chHost(Host) then begin
                Board := BBSsFindBoardFromURL( GikoSys.Get2chThreadURL2BoardURL( URL ) );
index 8fcbfb1..13482a4 100644 (file)
@@ -2681,12 +2681,18 @@ function        TGikoSys.Get2chBrowsableThreadURL(
 var
        Protocol, Host, Path, Document, Port, Bookmark : string;
        BBSID, BBSKey : string;
+const
+       KAKO_PATH       = '/kako/';
 begin
 
-       ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );
-       Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
+       if Pos( KAKO_PATH, inURL ) > 0 then begin
+               Result := inURL;
+       end else begin
+               ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );
+               Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
 
-       Result := Protocol + '://' + Host + '/test/read.cgi/' + BBSID + '/' + BBSKey + '/l50';
+               Result := Protocol + '://' + Host + '/test/read.cgi/' + BBSID + '/' + BBSKey + '/l50';
+       end;
 
 end;