Changeset 16 for trunk/Import/TanecniSkola.php
- Timestamp:
- Dec 25, 2018, 10:14:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/TanecniSkola.php
r15 r16 70 70 if (array_key_exists($MeetItem->Height, $HeightRange)) 71 71 $MeetItem->Height = $HeightRange[$MeetItem->Height]; 72 $MeetItem->Weight = GetWeightFromText($MeetItem->Message);73 72 $MeetItem->Email = trim(GetTextBetween($Item, '">', '</a>')); 74 73 $MeetItem->Phone = trim(GetTextBetween($Item, 'tel.:', '<br />')); … … 78 77 else $MeetItem->Gender = Gender::Undefined; 79 78 $MeetItem->Message = trim(GetTextBetween($Item, '<p class="message">', '</p>')); 80 if ($MenuItem->Age == '') 79 $MeetItem->Weight = GetWeightFromText($MeetItem->Message); 80 // Update age only if it is not set already 81 if ($MeetItem->Age == '') 81 82 { 82 83 $MessageAge = GetAgeFromText($MeetItem->Message); 83 84 if ($MessageAge != '') $MeetItem->Age = $MessageAge; 84 85 } 85 if ($MenuItem->Height == '') 86 { 87 $MessageHeight = GetHeightFromText($MeetItem->Message); 88 if ($MessageHeight != '') $MeetItem->Height = $MessageHeight; 89 } 86 // Update height from message text even if height is already set 87 // because it can be more precise 88 $MessageHeight = GetHeightFromText($MeetItem->Message); 89 if ($MessageHeight != '') $MeetItem->Height = $MessageHeight; 90 90 $MeetItem->Location = 'Praha'; 91 91 $MeetItem->Database = $this->Database;
Note:
See TracChangeset
for help on using the changeset viewer.