}
$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');
$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:
?>