forked from science-ation/science-ation
Fix translation of headings for pre-translated headings, remove i18n calls from send_header calls that dont need it
This commit is contained in:
parent
fe07722b5b
commit
566fb9ea3c
@ -354,7 +354,7 @@ function happy($str,$type="normal")
|
||||
}
|
||||
|
||||
$HEADER_SENT=false;
|
||||
function send_header($title="", $nav=null, $icon=null)
|
||||
function send_header($title="", $nav=null, $icon=null, $titletranslated=false)
|
||||
{
|
||||
global $HEADER_SENT;
|
||||
global $config;
|
||||
@ -369,7 +369,7 @@ function send_header($title="", $nav=null, $icon=null)
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
||||
<head><title><? if($title) echo i18n($title); else echo i18n($config['fairname']); ?></title>
|
||||
<head><title><? if($title && !$titletranslated) echo i18n($title); else if($title) echo $title; else echo i18n($config['fairname']); ?></title>
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/theme/<?=$config['theme']?>/sfiab.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/tableeditor.css" type="text/css" media="all" />
|
||||
</head>
|
||||
@ -580,7 +580,10 @@ if(is_array($nav)) {
|
||||
foreach($nav as $t=>$l) {
|
||||
echo "<a href=\"{$config['SFIABDIRECTORY']}/$l\">".i18n($t).'</a> » ';
|
||||
}
|
||||
echo i18n($title);
|
||||
if(!$titletranslated)
|
||||
echo i18n($title);
|
||||
else
|
||||
echo $title;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
@ -606,8 +609,10 @@ else
|
||||
echo "<td>";
|
||||
|
||||
|
||||
if($title)
|
||||
if($title && !$titletranslated)
|
||||
echo "<h2>".i18n($title)."</h2>";
|
||||
else if($title)
|
||||
echo "<h2>".$title."</h2>";
|
||||
|
||||
//if we're under /admin or /config then we want to show the ? help icon
|
||||
if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config")
|
||||
@ -1023,7 +1028,7 @@ function output_page_cms($filename)
|
||||
if(mysql_num_rows($q))
|
||||
{
|
||||
$r=mysql_fetch_object($q);
|
||||
send_header($r->title);
|
||||
send_header($r->title,null,null,true);
|
||||
|
||||
if(file_exists("data/logo-200.gif") && $r->showlogo==1)
|
||||
echo "<img align=\"right\" src=\"".$config['SFIABDIRECTORY']."/data/logo-200.gif\" border=\"0\">";
|
||||
@ -1035,7 +1040,7 @@ function output_page_cms($filename)
|
||||
echo $r->text;
|
||||
}
|
||||
else {
|
||||
send_header(i18n("Error: File not found"));
|
||||
send_header("Error: File not found");
|
||||
echo error(i18n("The file you have requested (%1), does not exist on the server.",array($filename)));
|
||||
return;
|
||||
//not defined, lets grab the default text
|
||||
|
@ -23,7 +23,7 @@
|
||||
?>
|
||||
<?
|
||||
include "common.inc.php";
|
||||
send_header(i18n("Important Dates"),null,"important_dates");
|
||||
send_header("Important Dates",null,"important_dates");
|
||||
|
||||
echo "<table>";
|
||||
|
||||
|
@ -20,7 +20,7 @@ if($_GET['action']=="logout")
|
||||
unset($_SESSION['schoolaccesscode']);
|
||||
$happymsg=i18n("You have been logged out from the school access page");
|
||||
}
|
||||
send_header(i18n("School Access"));
|
||||
send_header("School Access");
|
||||
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@ include "common.inc.php";
|
||||
|
||||
if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
||||
{
|
||||
send_header(i18n("School Participant Invitations"));
|
||||
send_header("School Participant Invitations");
|
||||
|
||||
echo "<a href=\"schoolaccess.php\"><< ".i18n("Return to school access main page")."</a><br />";
|
||||
echo "<br />";
|
||||
|
Loading…
Reference in New Issue
Block a user