Ignore:
Timestamp:
May 27, 2020, 8:04:56 PM (5 years ago)
Author:
chronos
Message:
  • Added: Allow to disable MeetSource in database.
  • Added: Show how many meet items were parsed and how many new added.
File:
1 edited

Legend:

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

    r41 r57  
    2929  {
    3030    $Output = parent::Import();
     31    $this->AddTimeInterval = 24 * 60 * 60;
    3132    $Content = file_get_contents($this->URL);
    3233
     
    5657      if ($Type == 'odpovězeno') continue;
    5758      $MeetItem->Time = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>'));
    58       if (mb_substr($MeetItem->Time, 0, 4) == 'před') 
    59       {           
     59      if (mb_substr($MeetItem->Time, 0, 4) == 'před')
     60      {
    6061        $Parts = explode(' ', $MeetItem->Time);
    6162        if ($Parts[2] == 'hours') $MeetItem->Time = strtotime("-".$Parts[1]." hours");
     
    7374      $MeetItem->Source = $this->Id;
    7475      $Output .= $this->ImportItem($MeetItem);
    75       $this->AddedCount += $MeetItem->AddIfNotExist(24 * 60 * 60);
     76      $this->MeetItems[] = $MeetItem;
    7677    }
    7778    return $Output;
Note: See TracChangeset for help on using the changeset viewer.