Issue Details (XML | Word | Printable)

Key: MDL-14279
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Mathieu Petit-Clair
Reporter: Mathieu Petit-Clair
Votes: 1
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Use get_file_url instead of manual slasharguments check

Created: 09/Apr/08 04:45 PM   Updated: 11/Jul/08 10:51 AM
Return to search
Component/s: General, RSS
Affects Version/s: 1.8, 1.9
Fix Version/s: 1.9.2

File Attachments: 1. Text File patch-get_file_url-18.txt (30 kB)
2. Text File patch-get_file_url-19.txt (31 kB)
3. Text File patch-get_file_url-19_20080707.txt (43 kB)

Issue Links:
Dependency
 

Participants: Bill Burgos, Eloy Lafuente (stronk7), Martin Dougiamas, Mathieu Petit-Clair, Petr Skoda and Ryan Smith
Security Level: None
Resolved date: 11/Jul/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
To fix MDL-13792, the function get_file_url was added. This bug aims to make use of it in every possible place. I will send in a big patch later (starting with 1.8) for review.

There is a problem with links to rss files, as most of them are to /rss/file.php, not /file.php. See /blog/rsslib.php, line 41, for one case of this. Possibilities :
 1) don't do anything, xml files shouldn't have non-ascii file names anyway
 2) modify get_file_url to make a link to /rss/file.php in these cases
 3) make a different function for rss links

I vote for #2. Petr? Eloy? What do you think?

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mathieu Petit-Clair committed 33 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 10/Jul/08 05:48 PM
MDL-14279: use get_file_url instead of checking $CFG->slashargument manually
MODIFY userpix/upgrade.php   Rev. 1.5.2.2    (+5 -8 lines)
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.13.8.2    (+3 -7 lines)
MODIFY mod/resource/type/ims/Attic/resource.class.php   Rev. 1.47.2.5    (+3 -6 lines)
MODIFY mod/scorm/loadSCO.php   Rev. 1.33.4.1    (+3 -6 lines)
MODIFY question/format/qti2/Attic/format.php   Rev. 1.12.4.2    (+5 -9 lines)
MODIFY mod/forum/lib.php   Rev. 1.609.2.63    (+2 -6 lines)
MODIFY mod/resource/type/file/Attic/resource.class.php   Rev. 1.71.2.12    (+4 -16 lines)
MODIFY theme/standardlogo/header.html   Rev. 1.26.2.2    (+4 -10 lines)
MODIFY userpix/index.php   Rev. 1.9.2.3    (+5 -8 lines)
MODIFY blog/rsslib.php   Rev. 1.12.2.1    (+2 -5 lines)
MODIFY lib/questionlib.php   Rev. 1.119.2.13    (+6 -12 lines)
MODIFY blog/lib.php   Rev. 1.80.2.16    (+2 -6 lines)
MODIFY question/format/hotpot/format.php   Rev. 1.12.4.5    (+3 -6 lines)
MODIFY mod/exercise/Attic/lib.php   Rev. 1.48.2.3    (+3 -6 lines)
MODIFY mod/forum/rsslib.php   Rev. 1.25.2.1    (+4 -6 lines)
MODIFY mod/hotpot/lib.php   Rev. 1.79.2.13    (+3 -6 lines)
MODIFY mod/lesson/importppt.php   Rev. 1.22.2.2    (+4 -7 lines)
MODIFY lib/weblib.php   Rev. 1.970.2.98    (+10 -19 lines)
MODIFY lib/wiki_to_markdown.php   Rev. 1.11.18.1    (+7 -15 lines)
MODIFY mod/lesson/mediafile.php   Rev. 1.13.2.1    (+4 -10 lines)
MODIFY question/format/qti2/Attic/qt_common.php   Rev. 1.4.2.1    (+2 -3 lines)
MODIFY mod/data/Attic/preset_class.php   Rev. 1.2.2.4    (+3 -2 lines)
MODIFY mod/glossary/lib.php   Rev. 1.193.2.14    (+2 -6 lines)
MODIFY file.php   Rev. 1.46.2.4    (+5 -1 lines)
MODIFY backup/restorelib.php   Rev. 1.283.2.48    (+3 -12 lines)
MODIFY lib/rsslib.php   Rev. 1.52.2.3    (+3 -7 lines)
MODIFY lib/filelib.php   Rev. 1.50.2.18    (+21 -6 lines)
MODIFY mod/data/field/picture/field.class.php   Rev. 1.24.2.2    (+8 -14 lines)
MODIFY mod/workshop/Attic/locallib.php   Rev. 1.43.2.2    (+4 -7 lines)
MODIFY mod/workshop/Attic/submissions.php   Rev. 1.60.2.3    (+4 -7 lines)
MODIFY mod/data/field/file/field.class.php   Rev. 1.17.2.5    (+3 -7 lines)
MODIFY question/export.php   Rev. 1.43.2.3    (+2 -7 lines)
MODIFY files/index.php   Rev. 1.121.2.6    (+3 -6 lines)
Mathieu Petit-Clair committed 30 files to 'Moodle CVS' - 10/Jul/08 05:55 PM
MDL-14279: use get_file_url instead of checking $CFG->slashargument manually (merge from 1.9)
MODIFY mod/data/field/picture/field.class.php   Rev. 1.28    (+8 -14 lines)
MODIFY mod/scorm/loadSCO.php   Rev. 1.37    (+3 -6 lines)
MODIFY theme/standardlogo/header.html   Rev. 1.28    (+4 -10 lines)
MODIFY userpix/index.php   Rev. 1.15    (+5 -8 lines)
MODIFY lib/wiki_to_markdown.php   Rev. 1.13    (+7 -15 lines)
MODIFY mod/data/Attic/preset_class.php   Rev. 1.8    (+3 -2 lines)
MODIFY backup/restorelib.php   Rev. 1.343    (+3 -12 lines)
MODIFY lib/questionlib.php   Rev. 1.146    (+6 -12 lines)
MODIFY mod/forum/rsslib.php   Rev. 1.27    (+4 -6 lines)
MODIFY mod/glossary/lib.php   Rev. 1.212    (+2 -6 lines)
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.19    (+3 -7 lines)
MODIFY lib/filelib.php   Rev. 1.72    (+21 -6 lines)
MODIFY question/format/hotpot/format.php   Rev. 1.18    (+3 -6 lines)
MODIFY files/index.php   Rev. 1.132    (+3 -6 lines)
MODIFY mod/hotpot/lib.php   Rev. 1.102    (+3 -6 lines)
MODIFY mod/data/field/file/field.class.php   Rev. 1.26    (+3 -7 lines)
MODIFY lib/weblib.php   Rev. 1.1101    (+10 -19 lines)
MODIFY blog/lib.php   Rev. 1.99    (+2 -6 lines)
MODIFY mod/lesson/mediafile.php   Rev. 1.17    (+3 -9 lines)
MODIFY userpix/upgrade.php   Rev. 1.10    (+5 -8 lines)
MODIFY mod/lesson/importppt.php   Rev. 1.28    (+4 -7 lines)
MODIFY mod/forum/lib.php   Rev. 1.685    (+2 -6 lines)
MODIFY file.php   Rev. 1.53    (+5 -1 lines)
MODIFY mod/resource/type/file/Attic/resource.class.php   Rev. 1.83    (+4 -16 lines)
MODIFY question/export.php   Rev. 1.49    (+2 -7 lines)
MODIFY question/format/qti2/Attic/format.php   Rev. 1.17    (+5 -9 lines)
MODIFY mod/resource/type/ims/Attic/resource.class.php   Rev. 1.52    (+3 -6 lines)
MODIFY question/format/qti2/Attic/qt_common.php   Rev. 1.5    (+2 -3 lines)
MODIFY lib/rsslib.php   Rev. 1.56    (+3 -7 lines)
MODIFY blog/rsslib.php   Rev. 1.15    (+2 -5 lines)
Mathieu Petit-Clair committed 3 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 11/Jul/08 10:28 AM
MDL-14279: Fixes for regressions created by the get_file_url massive change
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.13.8.3    (+2 -2 lines)
MODIFY files/index.php   Rev. 1.121.2.7    (+2 -2 lines)
MODIFY lib/filelib.php   Rev. 1.50.2.19    (+2 -1 lines)
Mathieu Petit-Clair committed 3 files to 'Moodle CVS' - 11/Jul/08 10:31 AM
MDL-14279: Fixes for regressions created by the get_file_url massive change (merge from 1.9)
MODIFY lib/filelib.php   Rev. 1.73    (+2 -1 lines)
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.20    (+2 -2 lines)
MODIFY files/index.php   Rev. 1.133    (+2 -2 lines)
gbateson committed 1 file to 'Moodle CVS' - 13/Jul/08 06:59 AM
MDL-14279 fixed typo in get_baseurl: get_file_url($this->filedir.'/') should be get_file_url($this->filedir).'/'
MODIFY mod/hotpot/lib.php   Rev. 1.103    (+2 -2 lines)
tjhunt committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 23/Jul/08 06:32 PM
MDL-15792 - Images in question don't display. This is a regression from MDL-14279. Fix thanks to Yolanda Ord��ez Rufat.
MODIFY lib/questionlib.php   Rev. 1.119.2.15    (+2 -2 lines)
tjhunt committed 1 file to 'Moodle CVS' - 23/Jul/08 06:32 PM
MDL-15792 - Images in question don't display. This is a regression from MDL-14279. Fix thanks to Yolanda Ord��ez Rufat.
MODIFY lib/questionlib.php   Rev. 1.151    (+2 -2 lines)