Revision: 1209
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1209&view=rev
Author:   cimorrison
Date:     2009-10-01 22:46:01 +0000 (Thu, 01 Oct 2009)

Log Message:
-----------
Introduced a get_charset() function.  No functional change to MRBS.

Modified Paths:
--------------
    mrbs/trunk/web/Themes/default/header.inc
    mrbs/trunk/web/language.inc
    mrbs/trunk/web/style.inc

Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc    2009-09-27 20:08:20 UTC (rev 
1208)
+++ mrbs/trunk/web/Themes/default/header.inc    2009-10-01 22:46:01 UTC (rev 
1209)
@@ -6,7 +6,7 @@
 function print_theme_header($day, $month, $year, $area, $room)
 {
   global $mrbs_company, $mrbs_company_logo, $mrbs_company_url, 
$mrbs_company_more_info,
-    $search_str, $locale_warning, $unicode_encoding, $vocab;
+    $search_str, $locale_warning;
   global $PHP_SELF;
 
   // If we dont know the right date then make it up 
@@ -27,18 +27,7 @@
     $search_str = "";
   }
   
-  if ($unicode_encoding)
-  {
-    header("Content-Type: text/html; charset=utf-8");
-  }
-  else
-  {
-    // We use $vocab directly instead of get_vocab() because we have
-    // no requirement to convert the vocab text, we just output
-    // the charset
-    header("Content-Type: text/html; charset=".$vocab["charset"]);
-  }
-
+  header("Content-Type: text/html; charset=" . get_charset());
   header("Pragma: no-cache");                          // HTTP 1.0
   header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
 

Modified: mrbs/trunk/web/language.inc
===================================================================
--- mrbs/trunk/web/language.inc 2009-09-27 20:08:20 UTC (rev 1208)
+++ mrbs/trunk/web/language.inc 2009-10-01 22:46:01 UTC (rev 1209)
@@ -548,6 +548,16 @@
   }
 }
 
+
+function get_charset()
+{
+  global $unicode_encoding, $vocab;
+  // We use $vocab directly instead of get_vocab() because we have
+  // no requirement to convert the vocab text, we just output
+  // the charset
+  return ($unicode_encoding) ? "utf-8" : $vocab["charset"];
+}
+
 function get_server_os()
 {
   if (stristr(PHP_OS,"Darwin"))

Modified: mrbs/trunk/web/style.inc
===================================================================
--- mrbs/trunk/web/style.inc    2009-09-27 20:08:20 UTC (rev 1208)
+++ mrbs/trunk/web/style.inc    2009-10-01 22:46:01 UTC (rev 1209)
@@ -2,9 +2,6 @@
 
 // $Id$
 
-global $unicode_encoding;
-global $vocab; // outside of scope; needs to be denote as global
-
 // NOTE:  The filename for the stylesheet for <= IE6 must contain the string 
'ielte6'.
 // The href strings in the <link> tags below are used by InitActiveCell in 
xbLib.js to 
 // test whether the browser is IE6 or below - and therefore whether to use 
JavaScript
@@ -34,20 +31,7 @@
     <link rel="stylesheet" href="mrbs-ielte6.css" type="text/css">
     <![endif]-->
 
-    <meta http-equiv="Content-Type" content="text/html; charset=<?php
-
-if ($unicode_encoding)
-{
-  echo "utf-8";
-}
-else
-{
-  // We use $vocab directly instead of get_vocab() because we have
-  // no requirement to convert the vocab text, we just output
-  // the charset
-  echo $vocab["charset"];
-}
-?>">
+    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo 
get_charset(); ?>">
     <meta name="robots" content="noindex">
 <?php
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to