OSDN Git Service

"/test/read.cgi"のリンクを拡張して"/test/read.html"でも同様に処理できるようにした。
authorh677 <h677>
Sun, 13 Apr 2008 10:23:58 +0000 (10:23 +0000)
committerh677 <h677>
Sun, 13 Apr 2008 10:23:58 +0000 (10:23 +0000)
GikoSystem.pas

index e56dec2..3a7fcac 100644 (file)
@@ -287,6 +287,7 @@ const
        NGWORDs_DIR_NAME : String               = 'NGwords';
 
        READ_PATH: string =                     '/test/read.cgi/';
+    HTML_READ_PATH: string =        '/test/read.html/';
        OLD_READ_PATH: string =         '/test/read.cgi?';
        KAKO_PATH: string =                     '/kako/';
 
@@ -1838,7 +1839,13 @@ begin
        Index := AnsiPos(READ_PATH, path);
        if Index <> 0 then begin
                s := Copy(path, Index + Length(READ_PATH), Length(path));
-
+    end else begin
+        Index := AnsiPos(HTML_READ_PATH, path);
+        if Index <> 0 then begin
+            s := Copy(path, Index + Length(HTML_READ_PATH), Length(path));
+        end;
+    end;
+    if Index <> 0 then begin
                if (Length(s) > 0) and (s[1] = '/') then
                        Delete(s, 1, 1);
                BBSID := GetTokenIndex(s, '/', 0);
@@ -2067,7 +2074,7 @@ begin
                //\95W\8f\80\8f\91\8e®
                //\8dÅ\8cã\82Íl50, 10, 10-20, 10n, 10-20n, -10, 10-, 10n- \82È\82Ç
                //http://xxx.2ch.net/test/read.cgi/bbsid/1000000000/
-               FAWKStr.RegExp := '/test/read.cgi/.+/[0-9]+/?.*';
+               FAWKStr.RegExp := '/test/read.(cgi|html)/.+/[0-9]+/?.*';
                if FAWKStr.Match(FAWKStr.ProcessEscSeq(s), RStart, RLength) > 0 then begin
                        s := Copy(s, 15, Length(s));