Changeset 15 for trunk/Import


Ignore:
Timestamp:
Dec 25, 2018, 9:56:40 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Get age from meet message text only if it isn't already set form form field.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Import/TanecniSkola.php

    r11 r15  
    7878          else $MeetItem->Gender = Gender::Undefined;
    7979        $MeetItem->Message = trim(GetTextBetween($Item, '<p class="message">', '</p>'));
    80         $MessageAge = GetAgeFromText($MeetItem->Message);
    81         if ($MessageAge != '') $MeetItem->Age = $MessageAge;
    82         $MessageHeight = GetHeightFromText($MeetItem->Message);
    83         if ($MessageHeight != '') $MeetItem->Height = $MessageHeight;
     80        if ($MenuItem->Age == '')
     81        {
     82          $MessageAge = GetAgeFromText($MeetItem->Message);
     83          if ($MessageAge != '') $MeetItem->Age = $MessageAge;
     84        }
     85        if ($MenuItem->Height == '')
     86        {
     87          $MessageHeight = GetHeightFromText($MeetItem->Message);
     88          if ($MessageHeight != '') $MeetItem->Height = $MessageHeight;
     89        }
    8490        $MeetItem->Location = 'Praha';
    8591        $MeetItem->Database = $this->Database;
Note: See TracChangeset for help on using the changeset viewer.