Changeset 15


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.
Location:
trunk
Files:
2 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;
  • trunk/index.php

    r13 r15  
    302302      if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm';
    303303      if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg';
    304       $Description .= '<br/>Škola: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>';
     304      $Description .= '<br/>Zdroj: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>';
    305305      $RSS->Items[] = array(
    306306        'Title' => $Title,
     
    332332    $Output .= $Content;
    333333    $Output .= '<br/><div class="footer">Kontakt: <a href="mailto:'.$Config['Contact'].'">'.$Config['Contact'].'</a> '.
    334        '<a href="https://svn.zdechov.net/trac/tanec/">Zdrojový kód</a></div>';
     334       '<a href="https://app.zdechov.net/tanec/">Zdrojový kód</a></div>';
    335335    $Output .= '</body></html>';
    336336    return($Output);
Note: See TracChangeset for help on using the changeset viewer.