Changeset 107
- Timestamp:
- Oct 10, 2012, 2:50:48 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UWebSession.pas
r106 r107 149 149 150 150 procedure TWebSession.RegisterModules; 151 var 152 ModuleBase: TModuleBase; 151 153 begin 152 154 with ModuleManager do begin … … 161 163 RegisterModule(TModuleIS.Create(nil), True); 162 164 RegisterModule(TModuleNews.Create(nil), True); 165 166 ModuleBase := TModuleBase(ModuleManager.FindModuleByName('Base')); 167 if Assigned(ModuleBase) then ModuleBase.Session := Self; 163 168 end; 164 169 end; -
trunk/Modules/Base/UModuleBase.pas
r105 r107 19 19 FGeneratePage: TGeneratePageEvent; 20 20 public 21 Session: TWebSession; 21 22 Pages: TPageList; 22 23 HandlerData: THTTPHandlerData; -
trunk/Modules/News/UModuleNews.pas
r105 r107 6 6 7 7 uses 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase; 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase, UNews, 9 UHTTPServer, UModuleUser; 9 10 10 11 type … … 14 15 public 15 16 ModuleBase: TModuleBase; 16 procedure Show; 17 News: TNews; 18 function Show(HandlerData: THTTPHandlerData): string; 17 19 constructor Create(Owner: TComponent); override; 18 20 destructor Destroy; override; … … 32 34 { TModuleNews } 33 35 34 procedure TModuleNews.Show;36 function TModuleNews.Show(HandlerData: THTTPHandlerData): string; 35 37 begin 36 38 Result := News.Show(HandlerData); 37 39 end; 38 40 … … 57 59 BeforeStart; 58 60 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'); 61 63 //RegisterPage(TUserControlPage, UserControlPage, ''); 64 News := TNews.Create; 65 News.ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 66 News.Database := ModuleBase.Session.Database; 67 News.ModuleBase := ModuleBase; 62 68 AfterStart; 63 69 end; … … 66 72 begin 67 73 BeforeStop; 68 ModuleBase.Pages.UnregisterPage(UserControlPage); 69 FreeAndNil(UserControlPage); 74 FreeAndNil(News); 75 //ModuleBase.Pages.UnregisterPage(UserControlPage); 76 //FreeAndNil(UserControlPage); 70 77 ModuleBase := nil; 71 78 AfterStop; -
trunk/Modules/Portal/UModulePortal.pas
r105 r107 8 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, USqlDatabase, 9 9 UUtils, UWebSession, SpecializedList, UUser, UWebPage, UHtmlClasses, 10 UModuleBase, UModuleUser ;10 UModuleBase, UModuleUser, UModuleNews; 11 11 12 12 type … … 66 66 WebPagePortal := TWebPagePortal.Create(nil); 67 67 ModuleBase.Pages.RegisterPage(WebPagePortal, ''); 68 TWebPagePortal(WebPagePortal).ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 68 ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 69 TWebPagePortal(WebPagePortal).ModuleUser := ModuleUser; 70 TWebPagePortal(WebPagePortal).ModuleNews := TModuleNews(Manager.FindModuleByName('News')); 69 71 AfterStart; 70 72 end; … … 76 78 FreeAndNil(WebPagePortal); 77 79 ModuleBase := nil; 80 ModuleUser := nil; 78 81 AfterStop; 79 82 end; -
trunk/Modules/Portal/UPagePortal.pas
r105 r107 256 256 Output := Output + ShowPanel('Kamery', WebcamPanel) 257 257 else if Panel.Values['Module'] = 'NewsGroupList' then 258 //Output := Output + ShowPanel('Aktuality',259 //ModuleNews.Show,258 Output := Output + ShowPanel('Aktuality', 259 ModuleNews.Show(HandlerData)); //, 260 260 //['<a href="?Action=CustomizeNews">Upravit</a>']); 261 261 end; -
trunk/Modules/User/UModuleUser.pas
r105 r107 61 61 //RegisterPage(TUserControlPage, UserControlPage, ''); 62 62 User := TWebUser.Create; 63 //User.Database :=Database;63 User.Database := ModuleBase.Session.Database; 64 64 UserOnline := TWebOnlineUser.Create; 65 //UserOnline.Database :=Database;65 UserOnline.Database := ModuleBase.Session.Database; 66 66 AfterStart; 67 67 end; -
trunk/ZdechovNET.lpi
r105 r107 117 117 </Item7> 118 118 </RequiredPackages> 119 <Units Count="3 7">119 <Units Count="38"> 120 120 <Unit0> 121 121 <Filename Value="ZdechovNET.lpr"/> … … 338 338 <UnitName Value="UModuleBase"/> 339 339 </Unit36> 340 <Unit37> 341 <Filename Value="Modules/News/UNews.pas"/> 342 <IsPartOfProject Value="True"/> 343 <UnitName Value="UNews"/> 344 </Unit37> 340 345 </Units> 341 346 </ProjectOptions>
Note:
See TracChangeset
for help on using the changeset viewer.