OSDN Git Service

http://nucleus-jp.sourceforge.jp/tracker/?do=details&id=39
authorkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sat, 3 Feb 2007 06:03:57 +0000 (06:03 +0000)
committerkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sat, 3 Feb 2007 06:03:57 +0000 (06:03 +0000)
reverted content type for admin area

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@181 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/globalfunctions.php

index 52a8504..1e302af 100755 (executable)
@@ -13,8 +13,8 @@
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2006 The Nucleus Group
-* @version $Id: globalfunctions.php,v 1.10 2007-01-31 10:02:58 kimitake Exp $
- * $NucleusJP: globalfunctions.php,v 1.9 2006/08/31 21:00:21 kimitake Exp $
+* @version $Id: globalfunctions.php,v 1.11 2007-02-03 06:03:57 kimitake Exp $
+ * $NucleusJP: globalfunctions.php,v 1.10 2007/01/31 10:02:58 kimitake Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -467,12 +467,26 @@ function sendContentType($contenttype, $pagetype = '', $charset = _CHARSET) {
 
                // v3.3: ($CONF['UsingAdminArea'] && !$CONF['debug']) gets removed,
                //       application/xhtml+xml seems to be working, so we're going to use it if we can.
+               //
+               // Note: reverted the following function in JP version
+               //
+       /*
+               // v3.3 code
                if (
                                ($contenttype == 'application/xhtml+xml')
                        &&      (!stristr(serverVar('HTTP_ACCEPT'), 'application/xhtml+xml') )
                        ) {
                        $contenttype = 'text/html';
                }
+       */
+               // v3.2x code
+               if (
+                               ($contenttype == 'application/xhtml+xml')
+                       &&      (($CONF['UsingAdminArea'] && !$CONF['debug']) || !stristr(serverVar('HTTP_ACCEPT'),'application/xhtml+xml'))
+                       )
+               {
+                       $contenttype = 'text/html';
+               }
 
                $manager->notify(
                        'PreSendContentType',
@@ -1734,4 +1748,4 @@ function ifset(&$var) {
        return null;
 }
 
-?>
\ No newline at end of file
+?>