2010-04-09 Junichi Satoh <junichi@rworks.jp>

* include/functions_extensions.php: Changed the function to use,
	from substr() to mb_substr(). substr() can't handle multibyte strings
	correctly.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2553 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2010-04-09 07:32:42 +00:00
parent 4ff232d48e
commit 4583bb9ffe
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2010-04-09 Junichi Satoh <junichi@rworks.jp>
* include/functions_extensions.php: Changed the function to use,
from substr() to mb_substr(). substr() can't handle multibyte strings
correctly.
2010-04-08 Sancho Lerena <slerena@artica.es>
* include/config_process.php: Update build version.

View File

@ -157,9 +157,9 @@ function add_operation_menu_option ($name, $fatherId = null, $icon = null) {
/* $config['extension_file'] is set in load_extensions(), since that function must
be called before any function the extension call, we are sure it will
be set. */
$option_menu['name'] = substr ($name, 0, 15);
$option_menu['name'] = mb_substr ($name, 0, 15);
$extension = &$config['extensions'][$extension_file];
$option_menu['sec2'] = $extension['dir'].'/'.substr ($extension_file, 0, -4);
$option_menu['sec2'] = $extension['dir'].'/'.mb_substr ($extension_file, 0, -4);
$option_menu['fatherId'] = $fatherId;
$option_menu['icon'] = $icon;
$extension['operation_menu'] = $option_menu;
@ -181,9 +181,9 @@ function add_godmode_menu_option ($name, $acl,$fatherId = null, $icon = null) {
be called before any function the extension call, we are sure it will
be set. */
$option_menu['acl'] = $acl;
$option_menu['name'] = substr ($name, 0, 15);
$option_menu['name'] = mb_substr ($name, 0, 15);
$extension = &$config['extensions'][$extension_file];
$option_menu['sec2'] = $extension['dir'].'/'.substr ($extension_file, 0, -4);
$option_menu['sec2'] = $extension['dir'].'/'.mb_substr ($extension_file, 0, -4);
$option_menu['fatherId'] = $fatherId;
$option_menu['icon'] = $icon;
$extension['godmode_menu'] = $option_menu;