Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22508

in lib/weblib.php function format_text_email() still accepts FORMAT_WIKI, which calls undefined function wiki_to_html()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 1.9.10, 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      in lib/weblib.php the following code segment needs updating to reflect deprecated and removed function:
      lines 1789 - 1795

          case FORMAT_WIKI:
                  $text = wiki_to_html($text);
              /// This expression turns links into something nice in a text format. (Russell Jungwirth)
              /// From: http://php.net/manual/en/function.eregi-replace.php and simplified
                  $text = eregi_replace('(<a [^<]*href=["|\']?([^ "\']*)["|\']?[^>]*>([^<]*)</a>)','\\3 [ \\2 ]', $text);
                  return strtr(strip_tags($text), array_flip(get_html_translation_table(HTML_ENTITIES)));
                  break;

      The wiki_to_html() function has been removed and throws a fatal error.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            skodak Petr Skoda added a comment -

            should be fixed now, thanks a lot for the report!

            Show
            skodak Petr Skoda added a comment - should be fixed now, thanks a lot for the report!

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Oct/10