if ($do_hook) {
// NOTE! plugins here must assign output to template
// and NOT echo anything directly!!
- do_hook('generic_header');
+ global $null;
+ do_hook('generic_header', $null);
}
$header_tags .= $xtra;
* @param string target the target frame for this link
*/
function makeInternalLink($path, $text, $target='') {
- global $base_uri;
+ global $base_uri, $oTemplate;
// sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
- if ($target != '') {
- $target = " target=\"$target\"";
- }
// This is an inefficient hook and is only used by
// one plugin that still needs to patch this code,
// here just in case we find a good (non-visual?)
// use for the internal_link hook.
//
- //$hooktext = do_hook_function('internal_link',$text);
- //if ($hooktext != '')
- // $text = $hooktext;
+ //do_hook('internal_link', $text);
- return '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
+ return create_hyperlink($base_uri . $path, $text, $target);
}
/**
global $reply_focus, $hide_sm_attributions, $frame_top,
$provider_name, $provider_uri, $startMessage,
- $javascript_on, $action, $oTemplate;
+ $action, $oTemplate, $org_title;
if (empty($sBodyTagJs)) {
if (strpos($action, 'reply') !== FALSE && $reply_focus) {
$frame_top = '_top';
}
- if( $javascript_on || strpos($sHeaderJs, 'new_js_autodetect_results.value') ) {
+//FIXME: does checkForJavascript() make the 2nd part of the if() below unneccessary??
+ if( checkForJavascript() || strpos($sHeaderJs, 'new_js_autodetect_results.value') ) {
$js_includes = $oTemplate->get_javascript_includes(TRUE);
$sJsBlock = '';
foreach ($js_includes as $js_file) {
"\n<!--\n" .
$sHeaderJs . "\n\n// -->\n</script>\n";
}
- displayHtmlHeader ('SquirrelMail', $sJsBlock);
+ displayHtmlHeader ($org_title, $sJsBlock);
} else {
/* do not use JavaScript */
- displayHtmlHeader ('SquirrelMail');
+ displayHtmlHeader ($org_title);
$sBodyTagJs = '';
}
/*
*/
function compose_Header($color, $mailbox, $sHeaderJs='', $sBodyTagJs = '') {
- global $reply_focus, $javascript_on, $action, $oTemplate;
+ global $reply_focus, $action, $oTemplate;
if (empty($sBodyTagJs)) {
if (strpos($action, 'reply') !== FALSE && $reply_focus) {
/*
* Locate the first displayable form element (only when JavaScript on)
*/
- if($javascript_on) {
+ if(checkForJavascript()) {
if ($sHeaderJs) {
$sJsBlock = "\n<script type=\"text/javascript\">" .
"\n<!--\n" .