Ignore:
Timestamp:
Oct 28, 2012, 10:20:32 AM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazování odkazů v aktualitách.
  • Upraveno: Tabulka Product rozdělena na Product a StockItem. Upravena struktura.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/aktuality/news.php

    r440 r452  
    2222    {
    2323      $I = strpos($Content, 'http://');
    24       if(($I > 0) and ($Content{$I - 1} != '"'))
     24      if((($I == 0)) or
     25      (($I > 0) and ($Content{$I - 1} != '"')))
    2526      {
    2627        $Result .= substr($Content, 0, $I);
    2728        $Content = substr($Content, $I);
    28         if(strpos($Content, ' ') !== false)
    29           $URL = substr($Content, 0, strpos($Content, ' '));
    30           else $URL = substr($Content, 0);
    31         if(strpos($Content, '<') !== false)
    32           $URL = substr($Content, 0, strpos($Content, '<'));
    33           else $URL = substr($Content, 0);
     29        $URL = $Content;
     30        if(strpos($URL, '<') !== false) $URL = substr($URL, 0, strpos($URL, '<'));
     31        if(strpos($URL, ' ') !== false) $URL = substr($URL, 0, strpos($URL, ' '));
    3432        $Result .= '<a href="'.$URL.'">'.$URL.'</a>';
    3533        $Content = substr($Content, strlen($URL));
Note: See TracChangeset for help on using the changeset viewer.