From 1ea2e64c65456bedf9b2396edd6c5d00a7ecb8e0 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 6 May 2004 22:53:04 +0000 Subject: [PATCH] Now links to forums are encoded properly --- mod/forum/backuplib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/forum/backuplib.php b/mod/forum/backuplib.php index ca23d398b7..8711083d4d 100644 --- a/mod/forum/backuplib.php +++ b/mod/forum/backuplib.php @@ -290,7 +290,10 @@ //should have its own. They are called automatically from the backup procedure. function forum_encode_content_links ($content,$preferences) { - $base = '\$@WWWROOT@\$'; + global $CFG; + + $base = preg_quote($CFG->wwwroot,"/"); + //Link to the list of forums $buscar="/(".$base."\/mod\/forum\/index.php\?id\=)([0-9]+)/"; $result= preg_replace($buscar,'$@FORUMINDEX*$2@$',$content); -- 2.39.5