Now links to forums are encoded properly
authorstronk7 <stronk7>
Thu, 6 May 2004 22:53:04 +0000 (22:53 +0000)
committerstronk7 <stronk7>
Thu, 6 May 2004 22:53:04 +0000 (22:53 +0000)
mod/forum/backuplib.php

index ca23d398b73bc50fb39154033d1eefd8bb6b1844..8711083d4d2b6de4036ea5778e8715540f287eda 100644 (file)
     //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);