Return control to original script after including a custom script. Allows
more flexibility to add code to a page. If the original is to be completely replaced, the custom script must explicitly exit. Credit to Eloy.
This commit is contained in:
+1
-2
@@ -450,8 +450,7 @@ $CFG->httpswwwroot = $CFG->wwwroot;
|
||||
/// Use a custom script replacement if one exists
|
||||
if (!empty($CFG->customscripts)) {
|
||||
if (($customscript = custom_script_path()) !== false) {
|
||||
include ($customscript);
|
||||
exit;
|
||||
require ($customscript);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user