? config.php
? fix.diff
? result.lst
? test.php
Index: course/editsection.html
===================================================================
RCS file: /cvsroot/moodle/moodle/course/editsection.html,v
retrieving revision 1.15
diff -c -r1.15 editsection.html
*** course/editsection.html	1 Apr 2007 15:18:06 -0000	1.15
--- course/editsection.html	6 May 2008 03:59:53 -0000
***************
*** 7,15 ****
       <?php helpbutton("summaries", get_string("helpsummaries"), "moodle", true, true);
          echo "<br />";
          if ($usehtmleditor) { 
!            helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
          } else {   
!            helpbutton("text", get_string("helptext"), "moodle", true, true);   
          } 
       ?>
        <br />
--- 7,15 ----
       <?php helpbutton("summaries", get_string("helpsummaries"), "moodle", true, true);
          echo "<br />";
          if ($usehtmleditor) { 
!            helpbutton("richtext2", get_string("helprichtext"), "moodle", true, true);
          } else {   
!            helpbutton("text2", get_string("helptext"), "moodle", true, true);   
          } 
       ?>
        <br />
Index: lang/en_utf8/help/emoticons.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/emoticons.html,v
retrieving revision 1.9
diff -c -r1.9 emoticons.html
*** lang/en_utf8/help/emoticons.html	5 May 2008 13:28:50 -0000	1.9
--- lang/en_utf8/help/emoticons.html	6 May 2008 03:59:53 -0000
***************
*** 1,5 ****
! <html><head>
! <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>Using Smilies (emoticons)</h1>
  
  <table align="center" border="1">
    <tbody><tr valign="top">
--- 1,4 ----
! <h1>Using Smilies (emoticons)</h1>
  
  <table align="center" border="1">
    <tbody><tr valign="top">
***************
*** 122,125 ****
  
  <p>Note that the codes themselves are like little pictures - just turn your head to the left when looking at them</p>
  
- </body></html>
\ No newline at end of file
--- 121,123 ----
Index: lang/en_utf8/help/emoticons2.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/emoticons2.html,v
retrieving revision 1.1
diff -c -r1.1 emoticons2.html
*** lang/en_utf8/help/emoticons2.html	5 May 2008 13:31:11 -0000	1.1
--- lang/en_utf8/help/emoticons2.html	6 May 2008 03:59:53 -0000
***************
*** 1,5 ****
! <html><head>
! <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>Using Smilies (emoticons)</h1>
  <div id="emoticons">##emoticons_html##</div>
  <div style="clear: both;"></div>
  
--- 1,4 ----
! <h1>Using Smilies (emoticons)</h1>
  <div id="emoticons">##emoticons_html##</div>
  <div style="clear: both;"></div>
  
***************
*** 9,12 ****
  <p>To insert these icons in your text: just click the icon above, or type the associated text code directly in your text.</p>
  
  <p>Note that the codes themselves are like little pictures - just turn your head to the left when looking at them</p>
- </body></html>
\ No newline at end of file
--- 8,10 ----
Index: lang/en_utf8/help/index.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/index.html,v
retrieving revision 1.10
diff -c -r1.10 index.html
*** lang/en_utf8/help/index.html	16 Aug 2007 10:26:09 -0000	1.10
--- lang/en_utf8/help/index.html	6 May 2008 03:59:53 -0000
***************
*** 77,84 ****
    <li><a href="help.php?file=writing.html">Writing</a></li>
    <li><a href="help.php?file=textformat.html">Formatting Text</a></li>
    <li><a href="help.php?file=html.html">Editing HTML format</a></li>
!   <li><a href="help.php?file=text.html">Editing Text format</a></li>
    <li><a href="help.php?file=markdown.html">Editing Markdown format</a></li>
!   <li><a href="help.php?file=richtext.html">Using the Richtext HTML editor</a></li>
!   <li><a href="help.php?file=emoticons.html">Using Smilies (emoticons)</a></li>
  </ul>
--- 77,84 ----
    <li><a href="help.php?file=writing.html">Writing</a></li>
    <li><a href="help.php?file=textformat.html">Formatting Text</a></li>
    <li><a href="help.php?file=html.html">Editing HTML format</a></li>
!   <li><a href="help.php?file=text2.html">Editing Text format</a></li>
    <li><a href="help.php?file=markdown.html">Editing Markdown format</a></li>
!   <li><a href="help.php?file=richtext2.html">Using the Richtext HTML editor</a></li>
!   <li><a href="help.php?file=emoticons2.html">Using Smilies (emoticons)</a></li>
  </ul>
Index: lang/en_utf8/help/textformat.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/textformat.html,v
retrieving revision 1.4
diff -c -r1.4 textformat.html
*** lang/en_utf8/help/textformat.html	16 Aug 2007 10:25:52 -0000	1.4
--- lang/en_utf8/help/textformat.html	6 May 2008 03:59:53 -0000
***************
*** 22,28 ****
  <p>Your line breaks will be retained, and blank lines will start new paragraphs.</p>
  <p>Smiley characters such as :-) will automatically become their graphical equivalents.</p>
  <p>You can even embed HTML code if you want to and it will be retained.</p>
! <p class="moreinfo"><a href="help.php?file=text.html">More info about Moodle auto-formatting</a></p>
  </ul>
  
  
--- 22,28 ----
  <p>Your line breaks will be retained, and blank lines will start new paragraphs.</p>
  <p>Smiley characters such as :-) will automatically become their graphical equivalents.</p>
  <p>You can even embed HTML code if you want to and it will be retained.</p>
! <p class="moreinfo"><a href="help.php?file=text2.html">More info about Moodle auto-formatting</a></p>
  </ul>
  
  
***************
*** 38,44 ****
  
  <p>Unlike the Moodle auto-format, no automatic formatting is performed.</p>
  <p class="moreinfo"><a href="help.php?file=html.html">More info about HTML in Moodle</a></p>
! <p class="moreinfo"><a href="help.php?file=richtext.html">More info about the Richtext HTML editor</a></p>
  </div>
  
  
--- 38,44 ----
  
  <p>Unlike the Moodle auto-format, no automatic formatting is performed.</p>
  <p class="moreinfo"><a href="help.php?file=html.html">More info about HTML in Moodle</a></p>
! <p class="moreinfo"><a href="help.php?file=richtext2.html">More info about the Richtext HTML editor</a></p>
  </div>
  
  
Index: lib/javascript.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/javascript.php,v
retrieving revision 1.38
diff -c -r1.38 javascript.php
*** lib/javascript.php	2 May 2008 02:45:18 -0000	1.38
--- lib/javascript.php	6 May 2008 03:59:54 -0000
***************
*** 64,72 ****
--- 64,76 ----
  <?php
      if (!empty($SESSION->inserttextform)) {
          $insertfield = "opener.document.forms['$SESSION->inserttextform'].$SESSION->inserttextfield";
+         echo "  if(!opener.document.forms['$SESSION->inserttextform']){";
      } else {
          $insertfield = "opener.document.forms['theform'].message";
+         echo "  if(!opener.document.forms['theform']){";
      }
+     echo "    return;";
+     echo "  }";
      echo "  text = ' ' + text + ' ';\n";
      echo "  if ( $insertfield.createTextRange && $insertfield.caretPos) {\n";
      echo "    var caretPos = $insertfield.caretPos;\n";
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.1066
diff -c -r1.1066 weblib.php
*** lib/weblib.php	2 May 2008 16:11:30 -0000	1.1066
--- lib/weblib.php	6 May 2008 03:59:57 -0000
***************
*** 5862,5868 ****
      $SESSION->inserttextform = $form;
      $SESSION->inserttextfield = $field;
      $imagetext = '<img src="' . $CFG->pixpath . '/s/smiley.gif" alt="" class="emoticon" style="margin-left:3px; padding-right:1px;width:15px;height:15px;" />';
!     $help = helpbutton('emoticons', get_string('helpemoticons'), 'moodle', true, true, '', true, $imagetext);
      if (!$return){
          echo $help;
      } else {
--- 5862,5868 ----
      $SESSION->inserttextform = $form;
      $SESSION->inserttextfield = $field;
      $imagetext = '<img src="' . $CFG->pixpath . '/s/smiley.gif" alt="" class="emoticon" style="margin-left:3px; padding-right:1px;width:15px;height:15px;" />';
!     $help = helpbutton('emoticons2', get_string('helpemoticons'), 'moodle', true, true, '', true, $imagetext);
      if (!$return){
          echo $help;
      } else {
Index: mod/data/field/textarea/field.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/data/field/textarea/field.class.php,v
retrieving revision 1.19
diff -c -r1.19 field.class.php
*** mod/data/field/textarea/field.class.php	26 Feb 2007 06:56:09 -0000	1.19
--- mod/data/field/textarea/field.class.php	6 May 2008 03:59:59 -0000
***************
*** 49,55 ****
          if (can_use_richtext_editor()) {
              // Show a rich text html editor.
              $str .= $this->gen_textarea(true, $text);
!             $str .= helpbutton("richtext", get_string("helprichtext"), 'moodle', true, true, '', true);
              $str .= '<input type="hidden" name="field_' . $this->field->id . '_content1' . '" value="' . FORMAT_HTML . '" />';
  
          } else {
--- 49,55 ----
          if (can_use_richtext_editor()) {
              // Show a rich text html editor.
              $str .= $this->gen_textarea(true, $text);
!             $str .= helpbutton("richtext2", get_string("helprichtext"), 'moodle', true, true, '', true);
              $str .= '<input type="hidden" name="field_' . $this->field->id . '_content1' . '" value="' . FORMAT_HTML . '" />';
  
          } else {
Index: user/message.html
===================================================================
RCS file: /cvsroot/moodle/moodle/user/message.html,v
retrieving revision 1.7
diff -c -r1.7 message.html
*** user/message.html	18 Jun 2007 19:21:24 -0000	1.7
--- user/message.html	6 May 2008 04:00:00 -0000
***************
*** 22,28 ****
          helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
          echo "<br />";
          if ($usehtmleditor) {
!            helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
          } else {
             emoticonhelpbutton("theform", "message");
          }
--- 22,28 ----
          helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
          echo "<br />";
          if ($usehtmleditor) {
!            helpbutton("richtext2", get_string("helprichtext"), "moodle", true, true);
          } else {
             emoticonhelpbutton("theform", "message");
          }
