Ignore:
Timestamp:
Apr 19, 2022, 10:25:41 PM (3 years ago)
Author:
chronos
Message:
  • Added: Meet items import from La Tropcial school.
  • Modified: Use explicit types for class fields.
  • Modified: Use utf8mb4 encoding for database.
  • Fixed: Spam items checking was inverted.
File:
1 edited

Legend:

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

    r63 r65  
    2222      $Item = GetTextBetween($Content, $ItemStart, $ItemEnd);
    2323      $MeetItem = new MeetItem();
    24       $MeetItem->Time = trim(GetTextBetween($Item, '<span class="created">', '</span>'));
    25       $MeetItem->Time = str_replace('. ', '.', $MeetItem->Time);
    26       if (strpos($MeetItem->Time, 'dnes v') !== false)
    27         $MeetItem->Time = str_replace('dnes v', HumanDate(time()), $MeetItem->Time);
    28       if (strpos($MeetItem->Time, 'včera v') !== false)
    29         $MeetItem->Time = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $MeetItem->Time);
     24      $Time = trim(GetTextBetween($Item, '<span class="created">', '</span>'));
     25      $Time = str_replace('. ', '.', $Time);
     26      if (strpos($Time, 'dnes v') !== false)
     27        $Time = str_replace('dnes v', HumanDate(time()), $Time);
     28      if (strpos($Time, 'včera v') !== false)
     29        $Time = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $Time);
    3030      $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time);
    3131      $MeetItem->Name = trim(GetTextBetween($Item, '<div class="comment-name">', '</div>'));
Note: See TracChangeset for help on using the changeset viewer.