Ignore:
Timestamp:
Oct 10, 2012, 2:50:48 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Zobrazení aktualit na stránce portálu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/UModuleNews.pas

    r105 r107  
    66
    77uses
    8   Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase;
     8  Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase, UNews,
     9  UHTTPServer, UModuleUser;
    910
    1011type
     
    1415  public
    1516    ModuleBase: TModuleBase;
    16     procedure Show;
     17    News: TNews;
     18    function Show(HandlerData: THTTPHandlerData): string;
    1719    constructor Create(Owner: TComponent); override;
    1820    destructor Destroy; override;
     
    3234{ TModuleNews }
    3335
    34 procedure TModuleNews.Show;
     36function TModuleNews.Show(HandlerData: THTTPHandlerData): string;
    3537begin
    36 
     38  Result := News.Show(HandlerData);
    3739end;
    3840
     
    5759  BeforeStart;
    5860  ModuleBase := TModuleBase(Manager.FindModuleByName('Base'));
    59   UserControlPage := TUserControlPage.Create(nil);
    60   ModuleBase.Pages.RegisterPage(UserControlPage, 'uzivatel');
     61  //UserControlPage := TUserControlPage.Create(nil);
     62  //ModuleBase.Pages.RegisterPage(UserControlPage, 'uzivatel');
    6163  //RegisterPage(TUserControlPage, UserControlPage, '');
     64  News := TNews.Create;
     65  News.ModuleUser := TModuleUser(Manager.FindModuleByName('User'));
     66  News.Database := ModuleBase.Session.Database;
     67  News.ModuleBase := ModuleBase;
    6268  AfterStart;
    6369end;
     
    6672begin
    6773  BeforeStop;
    68   ModuleBase.Pages.UnregisterPage(UserControlPage);
    69   FreeAndNil(UserControlPage);
     74  FreeAndNil(News);
     75  //ModuleBase.Pages.UnregisterPage(UserControlPage);
     76  //FreeAndNil(UserControlPage);
    7077  ModuleBase := nil;
    7178  AfterStop;
Note: See TracChangeset for help on using the changeset viewer.