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/Csts.php

    r63 r65  
    2424      $MeetItem = new MeetItem();
    2525
    26       $MeetItem->Gender = trim(html_entity_decode(GetTextBetween($Item, 'class="kategorie">', '<div')));
    27       if ($MeetItem->Gender == 'Hledám partnera') $MeetItem->Gender = Gender::Female;
    28         else if ($MeetItem->Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male;
     26      $Gender = trim(html_entity_decode(GetTextBetween($Item, 'class="kategorie">', '<div')));
     27      if ($Gender == 'Hledám partnera') $MeetItem->Gender = Gender::Female;
     28        else if ($Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male;
    2929        else $MeetItem->Gender = Gender::Undefined;
    3030      $MeetItem->Name = trim(html_entity_decode(GetTextBetween($Item, 'Vložil/a', ',')));
    31       $MeetItem->Time = trim(GetTextBetween($Item, ' ', '</th>'));
    32       $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time);
     31      $Time = trim(GetTextBetween($Item, ' ', '</th>'));
     32      $MeetItem->Time = HumanDateTimeToTime($Time);
    3333      $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm'));
    3434      $MeetItem->Message = trim(html_entity_decode(strip_tags(GetTextBetween($Item, '<td colspan="3">', '</td>'))));
Note: See TracChangeset for help on using the changeset viewer.