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

Private message popup does not limit number of characters to 200

    Details

      Description

      When sending a private message to a user greater than 200 characters, the code does not limit the number of characters appended by three dots (...). This is due to an incorrect syntax in the code.

      The code in lib/moodlelib.php implies that a substr() is used if the strlen() is greater than 200, but incorrect syntax forces this IF statement to always be false and therefore set the variable to display the full message.

        Gliffy Diagrams

          Activity

          Hide
          jaseeey Jason Ilicic added a comment - - edited
          Show
          jaseeey Jason Ilicic added a comment - - edited Corrected syntax and pushed to GitHub: https://github.com/jasonilicic/moodle/commit/0165d0197adc2ea4717ff4bd36c41a99f1802fc7
          Hide
          salvetore Michael de Raadt added a comment -

          Thanks for reporting this and providing a solution.

          Show
          salvetore Michael de Raadt added a comment - Thanks for reporting this and providing a solution.
          Hide
          skodak Petr Skoda added a comment -

          hmm, looks like we need to use textlib there

          Show
          skodak Petr Skoda added a comment - hmm, looks like we need to use textlib there
          Hide
          skodak Petr Skoda added a comment -

          ohlala, there are so many invalid strlen()s and substr()s all over the place, I have to file a separate issue for that...

          Show
          skodak Petr Skoda added a comment - ohlala, there are so many invalid strlen()s and substr()s all over the place, I have to file a separate issue for that...
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          rwijaya Rossiani Wijaya added a comment -

          Tested and it works great.

          Show
          rwijaya Rossiani Wijaya added a comment - Tested and it works great.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Many thanks for the hard work, this has been sent upstream and is available in all the git and cvs repositories.

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work, this has been sent upstream and is available in all the git and cvs repositories.

            People

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

              Dates

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