Fixed <a href="???" /> substitution for multiline articles
authorshort <>
Tue, 8 Oct 2002 23:18:41 +0000 (23:18 +0000)
committershort <>
Tue, 8 Oct 2002 23:18:41 +0000 (23:18 +0000)
obsah.php

index f1737c9..1203d72 100644 (file)
--- a/obsah.php
+++ b/obsah.php
                                .  " and month=".$row["month"]
                                );
                while ($article_row=mysql_fetch_array($article_result))
-                       $contents=ereg_replace("$sep_obsah_contents(".quotemeta($article_row["name"]).")$page_obsah_contents",
+                       $contents=ereg_replace("$sep_obsah_contents(".quotemeta($article_row["name"]).")([\n$page_obsah_contents])",
                                        "$sep_obsah_contents"
                                                        ."<a href=\"clanek.php?year=".$row["year"]."&amp;month=".$row["month"]."&amp;id=".$article_row["id"]."\">"
                                                        ."\\1</a>"
-                                       ."$page_obsah_contents",$contents);
+                                       ."\\2",$contents);
                mysql_free_result($article_result);
 
                $contents=ereg_replace("http://[^[:space:]$page_obsah_contents$sep_obsah_contents]+",