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

    r63 r65  
    2424      $MeetItem = new MeetItem();
    2525
    26       $MeetItem->Gender = trim(GetTextBetween($Item, "<td class='bunka_seznamka linel' width='45' ><img src='/pages/images/", '.gif'));
    27       if ($MeetItem->Gender == 'zena') $MeetItem->Gender = Gender::Male;
    28         else $MeetItem->Gender = Gender::Female;
     26      $Gender = trim(GetTextBetween($Item, "<td class='bunka_seznamka linel' width='45' ><img src='/pages/images/", '.gif'));
     27      if ($Gender == 'zena') $MeetItem->Gender = Gender::Male;
     28        else $Gender = Gender::Female;
    2929      $MeetItem->Name = trim(GetTextBetween($Item, "<span class='seznamka_nadpis'><b>", '</b>'));
    3030      $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm'));
     
    4242        $MeetItem->Email = trim(substr($MeetItem->Email, strpos($MeetItem->Email, '|') + 1));
    4343      } else $MeetItem->Phone = '';
    44       $MeetItem->Time = trim(GetTextBetween($Item, "<span id='datum1", '</span>'));
    45       $MeetItem->Time = substr($MeetItem->Time, strpos($MeetItem->Time, '>') + 1);
    46       $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time);
     44      $Time = trim(GetTextBetween($Item, "<span id='datum1", '</span>'));
     45      $Time = substr($Time, strpos($Time, '>') + 1);
     46      $MeetItem->Time = HumanDateTimeToTime($Time);
    4747      $MeetItem->Link = 'http://www.majkluvsvet.cz'.trim(GetTextBetween($Item, "<span class='linkk pravo'><a href='", "'>odkaz"));
    4848      $MeetItem->Database = $this->Database;
Note: See TracChangeset for help on using the changeset viewer.