http://atutor.ca/atutor/mantis/view.php?id=4607
authorharris wong <hwong@ocad.ca>
Thu, 16 Dec 2010 19:35:58 +0000 (19:35 -0000)
committerharris wong <hwong@ocad.ca>
Thu, 16 Dec 2010 19:35:58 +0000 (19:35 -0000)
http://atutor.ca/atutor/mantis/view.php?id=4608

docs/inbox/index.php
docs/inbox/sent_messages.php
docs/include/lib/constants.inc.php
docs/mods/_standard/forums/dropdown/posts.inc.php
docs/mods/_standard/forums/html/forum.inc.php
docs/mods/_standard/forums/index.php
docs/mods/_standard/forums/lib/forums.inc.php

index c2789ed..9487ec8 100644 (file)
@@ -75,7 +75,7 @@ if (isset($_GET['view']) && $_GET['view']) {
                </div>
 
                <div class="forum-post-content">
-                       <h3><?php echo AT_Print(htmlspecialchars($row['subject'], ENT_COMPAT, "UTF-8"), 'messages.subject'); ?></h3>
+                       <h3><?php echo AT_print($row['subject'], 'messages.subject'); ?></h3>
                        <div>
                                <div class="forum-post-ctrl">
                                        <a href="inbox/send_message.php?reply=<?php echo $_GET['view']; ?>"><?php echo _AT('reply'); ?></a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?delete=<?php echo $_GET['view']; ?>"><?php echo _AT('delete'); ?></a>
@@ -84,7 +84,7 @@ if (isset($_GET['view']) && $_GET['view']) {
                        </div>
 
                        <div class="body">
-                               <p><?php echo AT_print(htmlspecialchars($row['body'], ENT_COMPAT, "UTF-8"), 'messages.body'); ?></p>
+                               <p><?php echo AT_print($row['body'], 'messages.body'); ?></p>
                        </div>
                </div>
 
index c6b81ec..fbbedd6 100644 (file)
@@ -86,7 +86,7 @@ if (isset($_GET['view']) && $_GET['view']) {
                </div>
 
                <div class="forum-post-content">
-                       <h3><?php echo AT_Print(htmlspecialchars($row['subject'], ENT_COMPAT, "UTF-8"), 'messages.subject'); ?></h3>
+                       <h3><?php echo AT_print($row['subject'], 'messages.subject'); ?></h3>
                        <div>
                                <div class="forum-post-ctrl">
                                        <a href="inbox/send_message.php?forward=<?php echo $_GET['view']; ?>"><?php echo _AT('forward'); ?></a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?delete=<?php echo $_GET['view']; ?>"><?php echo _AT('delete'); ?></a>
@@ -95,11 +95,10 @@ if (isset($_GET['view']) && $_GET['view']) {
                        </div>
 
                        <div class="body">
-                               <p><?php echo AT_print(htmlspecialchars($row['body'], ENT_COMPAT, "UTF-8"), 'messages.body'); ?></p>
+                               <p><?php echo AT_print($row['body'], 'messages.body'); ?></p>
                        </div>
                        <div style="clear: both; font-size:0.1em"></div>
                </div>
-       </div>
        </li>
        </ul>
        <?php
index 17e5505..712bd7f 100644 (file)
@@ -312,11 +312,11 @@ $_field_formatting['course_cats.cat_name']                = AT_FORMAT_NONE;
 
 $_field_formatting['courses.*']                                    = AT_FORMAT_ALL & ~AT_FORMAT_EMOTICONS & ~AT_FORMAT_ATCODES & ~AT_FORMAT_LINKS & ~AT_FORMAT_IMAGES;
 
-$_field_formatting['forums.title']                             = AT_FORMAT_NONE;
-$_field_formatting['forums.description']               = AT_FORMAT_ALL;
+$_field_formatting['forums.title']                             = AT_FORMAT_NONE | AT_FORMAT_QUOTES;
+$_field_formatting['forums.description']               = AT_FORMAT_ALL | AT_FORMAT_QUOTES;
 
-$_field_formatting['forums_threads.subject']   = AT_FORMAT_ALL & ~AT_FORMAT_HTML;
-$_field_formatting['forums_threads.body']              = AT_FORMAT_ALL & ~AT_FORMAT_HTML;
+$_field_formatting['forums_threads.subject']   = AT_FORMAT_ALL & ~AT_FORMAT_HTML | AT_FORMAT_QUOTES;
+$_field_formatting['forums_threads.body']              = AT_FORMAT_ALL & ~AT_FORMAT_HTML | AT_FORMAT_QUOTES;
 
 $_field_formatting['glossary.word']                            = AT_FORMAT_NONE;
 $_field_formatting['glossary.definition']              = AT_FORMAT_ALL & ~AT_FORMAT_HTML;
@@ -325,8 +325,8 @@ $_field_formatting['instructor_approvals.notes']= AT_FORMAT_NONE;
 
 $_field_formatting['members.*']                 = AT_FORMAT_NONE; /* wildcards are okay */
 
-$_field_formatting['messages.subject']                 = AT_FORMAT_EMOTICONS + AT_FORMAT_IMAGES;
-$_field_formatting['messages.body']                            = AT_FORMAT_EMOTICONS + AT_FORMAT_LINKS + AT_FORMAT_IMAGES + AT_FORMAT_ATCODES;
+$_field_formatting['messages.subject']                 = AT_FORMAT_EMOTICONS + AT_FORMAT_IMAGES | AT_FORMAT_QUOTES;
+$_field_formatting['messages.body']                            = AT_FORMAT_EMOTICONS + AT_FORMAT_LINKS + AT_FORMAT_IMAGES + AT_FORMAT_ATCODES | AT_FORMAT_QUOTES;
 
 $_field_formatting['news.title']                               = AT_FORMAT_EMOTICONS | AT_FORMAT_LINKS & ~AT_FORMAT_HTML;
 $_field_formatting['news.body']                                        = AT_FORMAT_ALL;
index b04db13..b40c974 100644 (file)
@@ -33,7 +33,7 @@ if ($forum_list != 0) {
 
        if (mysql_num_rows($result) > 0) {
                while ($row = mysql_fetch_assoc($result)) {
-                       echo '&#176; <a href="' . $_base_path.url_rewrite('mods/_standard/forums/forum/view.php?fid=' . $row['forum_id'] . SEP . 'pid=' . $row['post_id']) . '" title="' . $row['subject'] . ': ' . htmlspecialchars(get_display_name($row['member_id'])) . '">' . AT_print(validate_length($row['subject'], 20, VALIDATE_LENGTH_FOR_DISPLAY), 'forums_threads.subject') . '</a><br />';
+                       echo '&#176; <a href="' . $_base_path.url_rewrite('mods/_standard/forums/forum/view.php?fid=' . $row['forum_id'] . SEP . 'pid=' . $row['post_id']) . '" title="' . AT_print($row['subject'], 'forums_threads.subject') . ': ' . htmlspecialchars(get_display_name($row['member_id'])) . '">' . AT_print(validate_length($row['subject'], 20, VALIDATE_LENGTH_FOR_DISPLAY), 'forums_threads.subject') . '</a><br />';
                }
        } else {
                echo '<strong>'._AT('none_found').'</strong>';
index 62ba2df..6ac8bb9 100644 (file)
@@ -131,7 +131,7 @@ if (!($row = mysql_fetch_assoc($result))) {
                }
                
                if ($row['locked'] != 1) {
-                               echo '<a href="'.url_rewrite('mods/_standard/forums/forum/view.php?fid='.$fid.SEP.'pid='.$row['post_id']).'" title="'.$full_subject.'">'.$row['subject'].'</a>';
+                               echo '<a href="'.url_rewrite('mods/_standard/forums/forum/view.php?fid='.$fid.SEP.'pid='.$row['post_id']).'" title="'.AT_print($full_subject, 'forums_threads.subject').'">'.$row['subject'].'</a>';
 
                        if ($row['locked'] == 2) {
                                echo ' <i class="spacer">('._AT('post_lock').')</i>';
@@ -146,7 +146,7 @@ if (!($row = mysql_fetch_assoc($result))) {
                if ($num_pages_2 > 1) {
                        echo ' <small class="spacer">( Page: ';
                        for ($i=2; $i<=$num_pages_2; $i++) {
-                               echo '<a href="'.url_rewrite('mods/_standard/forums/forum/view.php?fid='.$fid.SEP.'pid='.$row['post_id'].SEP.'page='.$i).'" title="'.$full_subject.'">'.$i.'</a>';
+                               echo '<a href="'.url_rewrite('mods/_standard/forums/forum/view.php?fid='.$fid.SEP.'pid='.$row['post_id'].SEP.'page='.$i).'" title="'.AT_print($full_subject, 'forums_threads.subject').'">'.$i.'</a>';
 
                                if ($i<$num_pages_2){
                                        echo ' | ';
index 3b4dc34..c8bcd6b 100644 (file)
@@ -55,8 +55,8 @@ $all_forums = get_forums($_SESSION['course_id']);
        <?php foreach($all_forums['nonshared'] as $row): ?>\r
                <tr onmousedown="document.form['f<?php echo $row['forum_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['forum_id']; ?>">\r
                        <td width="10"><input type="radio" name="id" value="<?php echo $row['forum_id']; ?>" id="f<?php echo $row['forum_id']; ?>" /></td>\r
-                       <td><label for="f<?php echo $row['forum_id']; ?>"><?php echo AT_print(htmlentities_utf8($row['title']), 'forums.title'); ?></label></td>\r
-                       <td><?php echo AT_print(htmlentities_utf8($row['description']), 'forums.description'); ?></td>\r
+                       <td><label for="f<?php echo $row['forum_id']; ?>"><?php echo AT_print($row['title'], 'forums.title'); ?></label></td>\r
+                       <td><?php echo AT_print($row['description'], 'forums.description'); ?></td>\r
                        <td>\r
                                <?php if (!$row['mins_to_edit']): ?>\r
                                        <?php echo _AT('no'); ?>\r
index 84db652..1f8e427 100644 (file)
@@ -280,7 +280,7 @@ function print_entry($row) {
                </div>
 
                <div class="forum-post-content">
-                       <h3><?php echo AT_Print(htmlspecialchars($row['subject'], ENT_COMPAT, "UTF-8"), 'forums_threads.subject'); ?></h3>
+                       <h3><?php echo AT_print($row['subject'], 'forums_threads.subject'); ?></h3>
                        <div>
                                <div class="forum-post-ctrl">
                                        <?php if (authenticate(AT_PRIV_FORUMS, AT_PRIV_RETURN)): ?>
@@ -296,7 +296,7 @@ function print_entry($row) {
                        </div>
 
                        <div class="body">
-                               <p><?php echo AT_print(htmlspecialchars($row['body'], ENT_COMPAT, "UTF-8"), 'forums_threads.body'); ?></p>
+                               <p><?php echo AT_print($row['body'], 'forums_threads.body'); ?></p>
                        </div>
                </div>
        </li>