made [nid] available on the homepage.
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 29 Jun 2006 19:46:19 +0000 (19:46 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 29 Jun 2006 19:46:19 +0000 (19:46 -0000)
docs/include/lib/constants.inc.php
docs/include/lib/output.inc.php
docs/index.php

index d86328a..716e1ed 100644 (file)
@@ -291,6 +291,8 @@ $_field_formatting['blog_posts.title']           = AT_FORMAT_NONE;
 
 $_field_formatting['blog_posts_comments.comment'] = AT_FORMAT_ALL & ~AT_FORMAT_HTML;
 
+$_field_formatting['courses.banner'] = AT_FORMAT_ALL;
+
 if (isset($_GET['cid'])) {
        $cid = intval($_GET['cid']);
 } else if (isset($_POST['cid'])) {
index db24374..70b69cd 100644 (file)
@@ -581,6 +581,9 @@ function myCodes($text, $html = false) {
        if (isset($sequence_links['next']) && $sequence_links['next']['url']) {
                $text = str_replace('[nid]', $sequence_links['next']['url'], $text);
        }
+       if (isset($sequence_links['resume']) && $sequence_links['resume']['url']) {
+               $text = str_replace('[nid]', $sequence_links['resume']['url'], $text);
+       }
 
        /* contributed by Thomas M. Duffey <tduffey at homeboyz.com> */
        $html = !$html ? 0 : 1;
index 8af55b4..776f8b3 100644 (file)
@@ -79,7 +79,7 @@ if ($result && ($row = mysql_fetch_assoc($result))) {
 $sql = "SELECT banner FROM ".TABLE_PREFIX."courses WHERE course_id=$_SESSION[course_id]";
 $result = mysql_query($sql, $db);
 if ($row = mysql_fetch_assoc($result)) {
-       $savant->assign('banner', $row['banner']);
+       $savant->assign('banner', AT_print($row['banner'], 'courses.banner'));
 } else {
        $savant->assign('banner', '');
 }