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

Improve usage of globals in mod/chat/chatd.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.1
    • Fix Version/s: STABLE backlog
    • Component/s: Chat
    • Labels:
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      The $GLOBALS array is directly manipulated and there is a variable $CHAT_HTMLHEAD_JS that is access via 'global' but which doesn't seem to be set anywhere.

      Some like

      "$GLOBALS['CFG']->wwwroot"

      look like they could be replaced by

      $CFG->wwwroot

      .

      Some like the following... I have no idea.

      if ($info['quirks'] & QUIRK_CHUNK_UPDATE) {
          $output->html .= $GLOBALS['CHAT_DUMMY_DATA'];
          $output->html .= $GLOBALS['CHAT_DUMMY_DATA'];
          $output->html .= $GLOBALS['CHAT_DUMMY_DATA'];
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andyjdavis Andrew Davis
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: