mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Added CFG->frametarget (defined by frametarget()) MDL-8050
This commit is contained in:
parent
b9ddb2d5ea
commit
d21a5865cf
@ -301,6 +301,9 @@ global $HTTPSPAGEREQUIRED;
|
||||
}
|
||||
$CFG->os = PHP_OS;
|
||||
|
||||
/// Set up default frame target string, based on $CFG->framename
|
||||
$CFG->frametarget = frametarget();
|
||||
|
||||
/// Setup cache dir for Smarty and others
|
||||
if (!file_exists($CFG->dataroot .'/cache')) {
|
||||
make_upload_directory('cache');
|
||||
|
@ -5632,5 +5632,19 @@ function disable_debugging() {
|
||||
$CFG->debug = $CFG->debug | 0x80000000; // switch the sign bit in integer number ;-)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns string to add a frame attribute, if required
|
||||
*/
|
||||
function frametarget() {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->framename) or ($CFG->framename == '_top')) {
|
||||
return '';
|
||||
} else {
|
||||
return ' target="'.$CFG->framename.'" ';
|
||||
}
|
||||
}
|
||||
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user