OSDN Git Service

・r 1.35 の遅延読み出しの実装で BBSsFindxxxFromxxx が
authoryoffy <yoffy>
Mon, 8 Mar 2004 07:27:33 +0000 (07:27 +0000)
committeryoffy <yoffy>
Mon, 8 Mar 2004 07:27:33 +0000 (07:27 +0000)
 読み出していない状態でもそのまま検索しようとしていたバグを修正。

BoardGroup.pas

index 14bf42e..70d67c8 100644 (file)
@@ -393,9 +393,6 @@ function    BBSsFindBoardFromBBSID(
 ) : TBoard;
 begin
 
-       if not BBSs[ 0 ].IsBoardFileRead then
-       GikoSys.ReadBoardFile( BBSs[ 0 ] );
-
        Result := BBSs[ 0 ].FindBBSID( inBBSID );
 
 end;
@@ -517,6 +514,8 @@ function TBBS.FindBBSID(BBSID: string): TBoard;
 var
        i       : Integer;
 begin
+       if not IsBoardFileRead then
+       GikoSys.ReadBoardFile( Self );
        for i := Count - 1 downto 0 do begin
                Result := Items[ i ].FindBBSID(BBSID);
                if Result <> nil then
@@ -532,6 +531,8 @@ function TBBS.FindBoardFromTitle(Title: string): TBoard;
 var
        i: Integer;
 begin
+       if not IsBoardFileRead then
+       GikoSys.ReadBoardFile( Self );
        for i := Count - 1 downto 0 do begin
                Result := Items[ i ].FindBoardFromTitle(Title);
                if Result <> nil then
@@ -547,6 +548,8 @@ function TBBS.FindBoardFromURL(inURL: string): TBoard;
 var
        i                                       : Integer;
 begin
+       if not IsBoardFileRead then
+       GikoSys.ReadBoardFile( Self );
        for i := Count - 1 downto 0 do begin
                Result := Items[ i ].FindBoardFromURL( inURL );
                if Result <> nil then