OSDN Git Service

Ticket4Plugin function fixed to use the mb-eumlator when mb isn't available.
authorkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Wed, 28 Feb 2007 21:12:33 +0000 (21:12 +0000)
committerkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Wed, 28 Feb 2007 21:12:33 +0000 (21:12 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@213 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/globalfunctions.php

index 3686370..3966005 100755 (executable)
@@ -13,8 +13,8 @@
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: globalfunctions.php,v 1.15 2007-02-17 04:39:59 shizuki Exp $
- * $NucleusJP: globalfunctions.php,v 1.14 2007/02/07 09:15:57 kimitake Exp $
+ * @version $Id: globalfunctions.php,v 1.16 2007-02-28 21:12:33 kmorimatsu Exp $
+ * $NucleusJP: globalfunctions.php,v 1.15 2007/02/17 04:39:59 shizuki Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -1560,12 +1560,18 @@ function ticketForPlugin(){
        if ( ( strstr(serverVar('REQUEST_URI'),'?') || serverVar('QUERY_STRING')
                        || strtoupper(serverVar('REQUEST_METHOD'))=='POST' )
                                && (!$manager->checkTicket()) ){
+
                if (!class_exists('PluginAdmin')) {
                        $language = getLanguageName();
                        include($DIR_LANG . ereg_replace( '[\\|/]', '', $language) . '.php');
                        include($DIR_LIBS . 'PLUGINADMIN.php');
                }
+               if (!(function_exists('mb_strimwidth') || extension_loaded('mbstring'))) {
+                       if (file_exists($DIR_LIBS.'mb_emulator/mb-emulator.php')) {
+                               global $mbemu_internals;
+                               include_once($DIR_LIBS.'mb_emulator/mb-emulator.php');
+                       }
+               }
                $oPluginAdmin = new PluginAdmin($plugin_name);
                $oPluginAdmin->start();
                echo '<p>' . _ERROR_BADTICKET . "</p>\n";