Changeset 41 for trunk


Ignore:
Timestamp:
Jun 18, 2019, 11:13:28 PM (5 years ago)
Author:
chronos
Message:
  • Modified: For Amblar meet import use time interval as there is no way to get precise time of item creation.
Location:
trunk/Modules/Meet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Meet/Import/Amblar.php

    r37 r41  
    7373      $MeetItem->Source = $this->Id;
    7474      $Output .= $this->ImportItem($MeetItem);
    75       $this->AddedCount += $MeetItem->AddIfNotExist();
     75      $this->AddedCount += $MeetItem->AddIfNotExist(24 * 60 * 60);
    7676    }
    7777    return $Output;
  • trunk/Modules/Meet/Meet.php

    r37 r41  
    348348  var $Level = '';
    349349
    350   function AddIfNotExist()
     350  function AddIfNotExist($TimeInterval = 0)
    351351  {
    352352    $DbResult = $this->Database->select('MeetItem', '*',
    353353      '(`Message` = "'.$this->Database->real_escape_string($this->Message).'") AND '.
    354354      '(`Email` = "'.$this->Database->real_escape_string($this->Email).'") AND '.
    355       '(`Time` = "'.$this->Database->real_escape_string(TimeToMysqlDateTime($this->Time)).'")');
     355      '(`Time` >= "'.$this->Database->real_escape_string(TimeToMysqlDateTime($this->Time - $TimeInterval)).'") AND '.
     356      '(`Time` <= "'.$this->Database->real_escape_string(TimeToMysqlDateTime($this->Time + $TimeInterval)).'")');
    356357    if ($DbResult->num_rows == 0)
    357358    {
Note: See TracChangeset for help on using the changeset viewer.