Changeset 738 for trunk/Modules/News
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- Location:
- trunk/Modules/News
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportKinoVatra.php
r622 r738 16 16 $doc = new DOMDocument(); 17 17 $doc->load($SourceURL); 18 foreach($doc->getElementsByTagName('item') as $node) 18 foreach($doc->getElementsByTagName('item') as $node) 19 19 { 20 20 $Title = $node->getElementsByTagName('title')->item(0)->nodeValue; 21 21 $Description = $node->getElementsByTagName('description')->item(0)->nodeValue; 22 $Link = $node->getElementsByTagName('link')->item(0)->nodeValue; 22 $Link = $node->getElementsByTagName('link')->item(0)->nodeValue; 23 23 $Date = $node->getElementsByTagName('pubDate')->item(0)->nodeValue; 24 24 25 25 $Description = strip_tags($Description); 26 26 $Description = str_replace("\r", '', $Description); … … 29 29 // $Date = substr($Date, $CommaPos + 1); 30 30 $Date = TimeToMysqlDateTime(strtotime($Date)); 31 31 32 32 $Query = 'SELECT Id FROM News WHERE (`Title`="'.$System->Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$System->Database->real_escape_string($Description).'") AND (`Link` = "'.$System->Database->real_escape_string($Link).'")'; 33 33 $DbResult = $System->Database->query($Query); -
trunk/Modules/News/News.php
r711 r738 67 67 )); 68 68 $this->System->FormManager->RegisterFormType('TNewsCategory', array( 69 70 71 72 73 69 'Type' => 'Reference', 70 'Table' => 'NewsCategory', 71 'Id' => 'Id', 72 'Name' => 'Caption', 73 'Filter' => '1', 74 74 )); 75 75 $this->System->FormManager->RegisterFormType('TNewsList', array( 76 77 78 79 80 81 )); 82 76 'Type' => 'ManyToOne', 77 'Table' => 'News', 78 'Id' => 'Id', 79 'Ref' => 'Category', 80 'Filter' => '1', 81 )); 82 83 83 if($this->System->ModuleManager->ModulePresent('Search')) 84 84 {
Note:
See TracChangeset
for help on using the changeset viewer.