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

Remove obsolete param $obsolete from p() function

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: Libraries
    • Testing Instructions:
      Hide

      p() function is not used that often - but it can be found in one of those files - so test with any of the modules below:
      data/field/radiobutton/mod.html
      data/field/picture/mod.html
      data/field/multimenu/mod.html
      data/field/file/mod.html
      data/field/textarea/mod.html
      data/field/number/mod.html
      data/field/text/mod.html
      data/field/checkbox/mod.html
      data/field/date/mod.html
      data/field/menu/mod.html
      data/field/url/mod.html
      data/field/latlong/mod.html
      survey/report.php
      glossary/editcategories.html
      glossary/editcategories.php
      glossary/export.php
      glossary/formats.php
      forum/prune.html

      Make sure the $obsolete parameter is not used anywhere in core.

      Show
      p() function is not used that often - but it can be found in one of those files - so test with any of the modules below: data/field/radiobutton/mod.html data/field/picture/mod.html data/field/multimenu/mod.html data/field/file/mod.html data/field/textarea/mod.html data/field/number/mod.html data/field/text/mod.html data/field/checkbox/mod.html data/field/date/mod.html data/field/menu/mod.html data/field/url/mod.html data/field/latlong/mod.html survey/report.php glossary/editcategories.html glossary/editcategories.php glossary/export.php glossary/formats.php forum/prune.html Make sure the $obsolete parameter is not used anywhere in core.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50250-master

      Description

      /**
      ...
       * @todo Remove obsolete param $obsolete if not used anywhere
       *
       * @param string $var the string potentially containing HTML characters
       * @param boolean $obsolete no longer used.
       * @return string
       */
      function p($var, $obsolete = false) {
          echo s($var, $obsolete);
      }
      

      Second parameter is not used anywhere, I've checked with:
      ack-grep ' p(.*,'

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15