-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
We have a handful of PARAM_ types which were deprecated in Moodle 2.0 (released back in November 2010). Some of those are still in use, and their usage has never emitted any kind of notification. Pretty crazy.
Let's deal with this legacy debt.
Trying to work out replacements.
xmldb
These are all in places like admin/tool/xmldb/actions/delete_field/delete_field.class.php. I'm inclined to suggest that most of these should be either PARAM_ALPHANUMEXT or PARAM_RAW.
table
Accepts [A-Z][a-z][0-9]_
Closest match: PARAM_ALPHANUMEXT – [A-Z][a-z][0-9]_-
field
Accepts [A-Z][a-z][0-9]_
Closest match: PARAM_ALPHANUMEXT – [A-Z][a-z][0-9]_-
index
Seems to use PARAM_ALPHANUM in some parts of it.
key
Seems to use PARAM_ALPHANUM in some parts of it.
after
Same as table name
Badges
Search
It's using PARAM_RAW in the get_user_badges() external method (and it seems the best replacement too).
Contentbank
Search
tusefomal - any thoughts?
xhprof
Probably all PARAM_RAW?
$runarr['url']
PARAM_RAW?
$runarr['runcomment']
PARAM_TEXT
$runarr['data']
PARAM_RAW?
message/externallib
searchtext
'searchtext' => new external_value(PARAM_CLEAN, 'String the user\'s fullname has to match to be found'),
|
I'm inclined to suggest maybe something like PARAM_TEXT. It's inserted straight into a DB query (via query params).
mod_data/textarea
content
PARAM_TEXT
mod_forum
name
PARAM_TEXT
mod_glossary
hook
Not a clue what this is. Sometimes it's treated as a string, sometimes an int.
name
Dependant on CFG value:
if (!empty($CFG->formatstringstriptags)) {
|
$mform->setType('name', PARAM_TEXT);
|
} else {
|
$mform->setType('name', PARAM_CLEANHTML);
|
}
|
concept
PARAM_TEXT - this is what's used for the actual concepts
- is blocked by
-
MDL-80005 Add PARAM_ definition class
-
- Closed
-