Changeset 964 for trunk/Modules/News/News.php
- Timestamp:
- Feb 3, 2024, 11:35:58 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/News.php
r953 r964 27 27 $this->Description = 'News and news groups management'; 28 28 $this->Dependencies = array(ModuleUser::GetName(), ModuleLog::GetName(), ModuleFile::GetName()); 29 $this->SupportedModules = array('Search');30 29 $this->Models = array(NewsCategory::GetClassName(), News::GetClassName()); 31 30 } … … 37 36 $this->System->RegisterPage(['aktuality', 'rss'], 'PageNewsRss'); 38 37 $this->System->RegisterPage(['aktuality', 'aktualizace'], 'PageNewsUpdate'); 39 $this->System->FormManager->RegisterClass('News', array(38 Core::Cast($this->System)->FormManager->RegisterClass('News', array( 40 39 'Title' => 'Aktualita', 41 40 'Table' => 'News', … … 54 53 ), 55 54 )); 56 $this->System->FormManager->RegisterClass('NewsCategory', array(55 Core::Cast($this->System)->FormManager->RegisterClass('NewsCategory', array( 57 56 'Title' => 'Kategorie aktualit', 58 57 'Table' => 'NewsCategory', … … 66 65 ), 67 66 )); 68 $this->System->FormManager->RegisterFormType('TNewsCategory', array(67 Core::Cast($this->System)->FormManager->RegisterFormType('TNewsCategory', array( 69 68 'Type' => 'Reference', 70 69 'Table' => 'NewsCategory', … … 73 72 'Filter' => '1', 74 73 )); 75 $this->System->FormManager->RegisterFormType('TNewsList', array(74 Core::Cast($this->System)->FormManager->RegisterFormType('TNewsList', array( 76 75 'Type' => 'ManyToOne', 77 76 'Table' => 'News', … … 153 152 { 154 153 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 155 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 154 'ItemCount' => Core::Cast($this->System)->Config['Web']['News']['Count'], 'DaysAgo' => 155 Core::Cast($this->System)->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 156 156 $I++; 157 157 } … … 160 160 { 161 161 $NewsSettingCookie = unserialize($_COOKIE['NewsSetting']); 162 foreach ($this->NewsSetting as $Index => $this->New Setting)162 foreach ($this->NewsSetting as $Index => $this->NewsSetting) 163 163 { 164 164 if (array_key_exists($Index, $NewsSettingCookie)) 165 $this->NewsSetting[$Index] = array_merge($this->New Setting, $NewsSettingCookie[$Index]);165 $this->NewsSetting[$Index] = array_merge($this->NewsSetting, $NewsSettingCookie[$Index]); 166 166 } 167 167 }
Note:
See TracChangeset
for help on using the changeset viewer.