Added CFG->frametarget (defined by frametarget()) MDL-8050

This commit is contained in:
moodler 2007-01-04 04:57:50 +00:00
parent b9ddb2d5ea
commit d21a5865cf
2 changed files with 17 additions and 0 deletions

View File

@ -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');

View File

@ -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:
?>