Changeset 57 for trunk/Modules/Meet/Meet.php
- Timestamp:
- May 27, 2020, 8:04:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Meet.php
r55 r57 326 326 { 327 327 $Output = ''; 328 if (($Id != null) and is_numeric($Id)) $Where = 'Id='.$Id;329 else $Where = '1';328 $Where = '(Enabled=1)'; 329 if (($Id != null) and is_numeric($Id)) $Where .= ' AND (Id='.$Id.')'; 330 330 $DbResult = $this->Database->select('MeetSource', '*', $Where); 331 331 while ($DbRow = $DbResult->fetch_assoc()) … … 353 353 $Source->Name = $DbRow['Name']; 354 354 $this->Items[] = $Source; 355 $Output .= $Source-> Import();355 $Output .= $Source->DoImport(); 356 356 } 357 357 return $Output; … … 366 366 public $Id; 367 367 public $Database; 368 public $MeetItems; 369 public $AddCompareTime; 370 public $AddCompareRemoteId; 371 public $AddTimeInterval; 372 public $AddedCount; 373 374 function __construct() 375 { 376 $this->MeetItems = array(); 377 $this->AddedCount = 0; 378 $this->AddCompareTime = true; 379 $this->AddCompareRemoteId = false; 380 $this->AddTimeInterval = 0; 381 } 368 382 369 383 function Import() 370 384 { 385 return ''; 386 } 387 388 function DoImport() 389 { 390 $this->MeetItems = array(); 371 391 $this->AddedCount = 0; 372 $Output = 'Parsing '.$this->Name.' ('.$this->Id.')...</br>'; 392 $Output = 'Parsing '.$this->Name.' (#'.$this->Id.')...'; 393 $Output .= $this->Import(); 394 $Output .= ' parsed: '.count($this->MeetItems); 395 foreach ($this->MeetItems as $MeetItem) 396 { 397 $this->AddedCount += $MeetItem->AddIfNotExist($this->AddTimeInterval, $this->AddCompareTime, $this->AddCompareRemoteId); 398 } 399 $Output .= ', new added: '.$this->AddedCount; 400 $Output .= '</br>'."\n"; 373 401 return $Output; 374 402 }
Note:
See TracChangeset
for help on using the changeset viewer.