Changeset 31 for trunk/Import/Amblar.php
- Timestamp:
- Dec 30, 2018, 7:37:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/Amblar.php
r20 r31 55 55 $Type = trim(GetTextBetween($Item, ' ', ' ')); 56 56 if ($Type == 'odpovězeno') continue; 57 $MeetItem-> Date = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>'));58 if (mb_substr($MeetItem-> Date, 0, 4) == 'před')57 $MeetItem->Time = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>')); 58 if (mb_substr($MeetItem->Time, 0, 4) == 'před') 59 59 { 60 $Parts = explode(' ', $MeetItem-> Date);61 if ($Parts[2] == 'hours') $MeetItem-> Date = strtotime("-".$Parts[1]." hours");62 else if ($Parts[2] == 'dní') $MeetItem-> Date = strtotime("-".$Parts[1]." days");63 else if ($Parts[2] == 'dny') $MeetItem-> Date = strtotime("-".$Parts[1]." days");64 } else $MeetItem-> Date = HumanDateToTime($MeetItem->Date);60 $Parts = explode(' ', $MeetItem->Time); 61 if ($Parts[2] == 'hours') $MeetItem->Time = strtotime("-".$Parts[1]." hours"); 62 else if ($Parts[2] == 'dní') $MeetItem->Time = strtotime("-".$Parts[1]." days"); 63 else if ($Parts[2] == 'dny') $MeetItem->Time = strtotime("-".$Parts[1]." days"); 64 } else $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time.' '.HumanTime(time())); 65 65 $MeetItem->Email = ''; 66 66 $MeetItem->Message = '';
Note:
See TracChangeset
for help on using the changeset viewer.