Skip to content

Commit

Permalink
MDL-33015 revert form actions to default back to FULLME
Browse files Browse the repository at this point in the history
This is a temporary workaround until we fix all admin pages to set up actual url properly in admin_externalpage_setup().
  • Loading branch information
skodak authored and marinaglancy committed May 21, 2012
1 parent 469a53a commit a38a17a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/formslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ abstract class moodleform {
* @param bool $editable
*/
function moodleform($action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true) {
global $CFG;
global $CFG, $FULLME;
if (empty($CFG->xmlstrictheaders)) {
// no standard mform in moodle should allow autocomplete with the exception of user signup
// this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
Expand All @@ -152,7 +152,14 @@ function moodleform($action=null, $customdata=null, $method='post', $target='',
}

if (empty($action)){
$action = strip_querystring(qualified_me());
// do not rely on PAGE->url here because dev often do not setup $actualurl properly in admin_externalpage_setup()
$action = strip_querystring($FULLME);
if (!empty($CFG->sslproxy)) {
// return only https links when using SSL proxy
$action = preg_replace('/^http:/', 'https:', $action, 1);
}
//TODO: use following instead of FULLME - see MDL-33015
//$action = strip_querystring(qualified_me());
}
// Assign custom data first, so that get_form_identifier can use it.
$this->_customdata = $customdata;
Expand Down

0 comments on commit a38a17a

Please sign in to comment.