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

    r63 r65  
    2626
    2727      $MeetItem->Name = trim(GetTextBetween($Item, '<h3 class="panel-title tucne">', '/'));
    28       $MeetItem->Gender = trim(GetTextBetween($Item, ' ', '</h3'));
    29       if (strpos($MeetItem->Gender, 'partnerku') !== false) $MeetItem->Gender = Gender::Male;
    30         else if (strpos($MeetItem->Gender, 'partnera') !== false) $MeetItem->Gender = Gender::Female;
     28      $Gender = trim(GetTextBetween($Item, ' ', '</h3'));
     29      if (strpos($Gender, 'partnerku') !== false) $MeetItem->Gender = Gender::Male;
     30        else if (strpos($Gender, 'partnera') !== false) $MeetItem->Gender = Gender::Female;
    3131        else $MeetItem->Gender = Gender::Undefined;
    3232      $Small = GetTextBetween($Item, '<small>', '</small>');
     
    3636        $Small = substr($Small, strpos($Small, '/') + 1);
    3737      }
    38       $MeetItem->Time = trim($Small);
    39       $MeetItem->Time = HumanDateToTime($MeetItem->Time);
     38      $Time = trim($Small);
     39      $MeetItem->Time = HumanDateToTime($Time);
    4040      $MeetItem->Message = trim(GetTextBetween($Item, '<p class="lead">', '</p>'));
    4141      $MeetItem->Age = GetAgeFromText($MeetItem->Message);
     
    5555  }
    5656}
    57 
Note: See TracChangeset for help on using the changeset viewer.