From d662fa8749913c8fded8e4b83562a6303878431c Mon Sep 17 00:00:00 2001 From: sakamocchi Date: Sun, 1 Jul 2012 01:49:03 +0900 Subject: [PATCH] =?utf8?q?MERGE:=20=E3=83=AA=E3=83=93=E3=82=B8=E3=83=A7?= =?utf8?q?=E3=83=B31894=E3=80=9C1990?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Revision 1894: CHANGE: make setlocale() do in include_translation() The aim of this patch is preventing from E_NOTICE/E_STRICT/E_WARNING generated by time/date-related function. If the PHP process has no locale settings, these functions generate these messages. What is that PHP process has locale settings: setlocale() is executed in the script in advance of executing time/date-related functions. To confirm this, this patch executes setlocale() in include_translation() in globalfunctions.php, refering to i18n::get_current_locale() or i18n::get_forced_locale(). But there are some problems: 1. Some translation files executes setlocale() when they are included. 2. Some templates includes LOCALE template and Template:read() execute setlocale() with it. 3. <%archivedate%> can given locale argument and execute setlocale() with it. 4. The arguments of setlocale() depends on each implement of C library. This causes apparent difference between Windows and the others. To solve these: 1. Remove for unification of setlocale() 2. Remove for unification of setlocale() 3. Deprecate for unification of setlocale() 4. Add _LOCALE_IN_WINDOWS constant value in each translation files and include_translation() include it when the server is running under windows operating system. http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1894 Revision 1895: supplemental for previous commit I did fail to patch for ja_Jpan_JP.EUC-JP.php at 1894. http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1895 Revision 1896: FIX: reference issue Making arguments be passed by reference > Function arguments @ php.net http://php.net/manual/en/functions.arguments.php According to PHP document, the value with reference: A. can be written in arguments of functions or class methods B. can't be given to arguments of calling functions or class methods In this grammer, A. function hoge(&$data) is OK B. hoge(&$data) isn't OK And if we want to give array as argument for calling function or class methods, we should put array to a variable once. This commit modify some codes related to these points http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1896 Revision 1897: ADD: give an argument for template name to <%commentnavlist%> tag Add missing argument for AdminActions::parse_commentnavlist(). And modify the comment of AdminActions::parse_itemnavlist() http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1897 Revision 1898: ADD: E_STRICT for $CONF['debug'] mode Previously E_ALL is set for $CONF['debug'] mode but E_STRICT should also be applied. http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1898 Revision 1899: FIX: Strict Standards Errors Some codes generates Strict Standards Errors. This commit fix these. http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1899 Revision 1890: FIX: enable update scripts to run previous version We changed upgrades scripts with some functions added in 4.0 but it's wrong. This commit fix it and add some codes for 4.0. http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1890 --- nucleus/libs/ACTIONS.php | 26 +++------- nucleus/libs/ADMIN.php | 3 +- nucleus/libs/AdminActions.php | 75 +++++++++++++++++++---------- nucleus/libs/BAN.php | 14 +++--- nucleus/libs/BLOG.php | 11 ++--- nucleus/libs/LINK.php | 10 ++-- nucleus/libs/MANAGER.php | 2 +- nucleus/libs/MEMBER.php | 4 +- nucleus/libs/SKIN.php | 2 +- nucleus/libs/TEMPLATE.php | 26 +++------- nucleus/libs/globalfunctions.php | 35 +++++++++++++- nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php | 5 +- nucleus/locales/bg_Cyrl_BG.UTF-8.php | 5 +- nucleus/locales/ca_Latn_ES.ISO-8859-1.php | 3 ++ nucleus/locales/ca_Latn_ES.UTF-8.php | 3 ++ nucleus/locales/cs_Latn_CZ.UTF-8.php | 3 ++ nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php | 3 ++ nucleus/locales/de_Latn_DE.ISO-8859-1.php | 3 ++ nucleus/locales/de_Latn_DE.UTF-8.php | 3 ++ nucleus/locales/el_Grek_GR.UTF-8.php | 3 ++ nucleus/locales/el_Grek_GR.WINDOWS-1253.php | 3 ++ nucleus/locales/en_Latn_US.ISO-8859-1.php | 3 ++ nucleus/locales/en_Latn_US.UTF-8.php | 3 ++ nucleus/locales/es_Latn_ES.ISO-8859-1.php | 3 ++ nucleus/locales/es_Latn_ES.UTF-8.php | 3 ++ nucleus/locales/fa_Arab_IR.UTF-8.php | 3 ++ nucleus/locales/fi_Latn_FI.ISO-8859-1.php | 3 ++ nucleus/locales/fi_Latn_FI.UTF-8.php | 3 ++ nucleus/locales/fr_Latn_FR.ISO-8859-15.php | 3 ++ nucleus/locales/fr_Latn_FR.UTF-8.php | 3 ++ nucleus/locales/gl_Latn_ES.ISO-8859-1.php | 3 ++ nucleus/locales/gl_Latn_ES.UTF-8.php | 3 ++ nucleus/locales/hr_Latn_HR.UTF-8.php | 3 ++ nucleus/locales/hr_Latn_HR.WINDOWS-1250.php | 3 ++ nucleus/locales/hu_Latn_HU.ISO-8859-2.php | 3 ++ nucleus/locales/hu_Latn_HU.UTF-8.php | 3 ++ nucleus/locales/id_Latn_ID.ISO-8859-1.php | 3 ++ nucleus/locales/id_Latn_ID.UTF-8.php | 3 ++ nucleus/locales/it_Latn_IT.ISO-8859-1.php | 3 ++ nucleus/locales/it_Latn_IT.UTF-8.php | 3 ++ nucleus/locales/ja_Jpan_JP.EUC-JP.php | 5 +- nucleus/locales/ja_Jpan_JP.UTF-8.php | 5 +- nucleus/locales/ko_Kore_KR.EUC-KR.php | 3 ++ nucleus/locales/ko_Kore_KR.UTF-8.php | 3 ++ nucleus/locales/ku_Arab_TR.UTF-8.php | 3 ++ nucleus/locales/lv_Latn_LV.ISO-8859-13.php | 3 ++ nucleus/locales/lv_Latn_LV.UTF-8.php | 3 ++ nucleus/locales/nl_Latn_NL.ISO-8859-15.php | 3 ++ nucleus/locales/nl_Latn_NL.UTF-8.php | 3 ++ nucleus/locales/pl_Latn_PL.UTF-8.php | 3 ++ nucleus/locales/pt_Latn_BR.ISO-8859-1.php | 3 ++ nucleus/locales/pt_Latn_BR.UTF-8.php | 3 ++ nucleus/locales/ro_Latn_RO.ISO-8859-1.php | 3 ++ nucleus/locales/ro_Latn_RO.UTF-8.php | 3 ++ nucleus/locales/ru_Cyrl_RU.UTF-8.php | 3 ++ nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php | 3 ++ nucleus/locales/sk_Latn_SK.ISO-8859-2.php | 3 ++ nucleus/locales/sk_Latn_SK.UTF-8.php | 3 ++ nucleus/locales/sr_Cyrl_RS.UTF-8.php | 3 ++ nucleus/locales/ur_Arab_PK.UTF-8.php | 3 ++ nucleus/locales/vi_Latn_VN.UTF-8.php | 3 ++ nucleus/locales/zh_Hans_CN.GB2312.php | 3 ++ nucleus/locales/zh_Hans_CN.UTF-8.php | 3 ++ nucleus/locales/zh_Hant_TW.UTF-8.php | 3 ++ nucleus/xmlrpc/api_metaweblog.inc.php | 4 +- nucleus/xmlrpc/api_mt.inc.php | 2 +- skins/admin/default/skinbackup.xml | 1 - skins/default/skinbackup.xml | 4 -- skins/grey/skinbackup.xml | 2 - 69 files changed, 285 insertions(+), 103 deletions(-) diff --git a/nucleus/libs/ACTIONS.php b/nucleus/libs/ACTIONS.php index 54c1b98..8053ec0 100644 --- a/nucleus/libs/ACTIONS.php +++ b/nucleus/libs/ACTIONS.php @@ -706,10 +706,10 @@ class Actions extends BaseActions * @param object $blog an instance of Blog class * @return void */ - private function preBlogContent($type, $blog) + private function preBlogContent($type, &$blog) { global $manager; - $data = array('blog' => $blog, 'type' => $type); + $data = array('blog' => &$blog, 'type' => $type); $manager->notify('PreBlogContent', $data); return; } @@ -722,10 +722,10 @@ class Actions extends BaseActions * @param objecct $blog an instance of Blog class * @return void */ - private function postBlogContent($type, $blog) + private function postBlogContent($type, &$blog) { global $manager; - $data = array('blog' => $blog, 'type' => $type); + $data = array('blog' => &$blog, 'type' => $type); $manager->notify('PostBlogContent', $data); return; } @@ -815,25 +815,13 @@ class Actions extends BaseActions * Actions::parse_archivedate() * %archivedate(locale,date format)% * - * @param string $locale + * @param deprecated $locale * @return void */ - public function parse_archivedate($locale = '-def-') + public function parse_archivedate($locale='') { global $archive; - /* - * TODO: these lines are no meaning because there is no $template. - if ( $locale == '-def-' ) - { - setlocale(LC_TIME, $template['LOCALE']); - } - else - { - setlocale(LC_TIME, $locale); - } - */ - // get archive date sscanf($archive,'%d-%d-%d',$y,$m,$d); @@ -976,11 +964,11 @@ class Actions extends BaseActions public function parse_blog($template, $amount = 10, $category = '') { global $blog, $startpos; + list($limit, $offset) = sscanf($amount, '%d(%d)'); $this->setBlogCategory($blog, $category); $this->preBlogContent('blog',$blog); $this->amountfound = $blog->readLog($template, $limit, $offset, $startpos); - $this->parse_benchmark(); $this->postBlogContent('blog',$blog); return; } diff --git a/nucleus/libs/ADMIN.php b/nucleus/libs/ADMIN.php index ce8d931..c72637c 100644 --- a/nucleus/libs/ADMIN.php +++ b/nucleus/libs/ADMIN.php @@ -813,7 +813,7 @@ class Admin $item =& $manager->getItem($itemid, 1, 1); $blog =& $manager->getBlog($item['blogid']); - $data = array('blog'=> $blog, 'item' => $item); + $data = array('blog'=> &$blog, 'item' => &$item); $manager->notify('PrepareItemForEdit', $data); if ( $blog->convertBreaks() ) @@ -3043,7 +3043,6 @@ class Admin self::addToTemplate($templateid, 'DATE_FOOTER', postVar('DATE_FOOTER')); self::addToTemplate($templateid, 'FORMAT_DATE', postVar('FORMAT_DATE')); self::addToTemplate($templateid, 'FORMAT_TIME', postVar('FORMAT_TIME')); - self::addToTemplate($templateid, 'LOCALE', postVar('LOCALE')); self::addToTemplate($templateid, 'SEARCH_HIGHLIGHT', postVar('SEARCH_HIGHLIGHT')); self::addToTemplate($templateid, 'SEARCH_NOTHINGFOUND', postVar('SEARCH_NOTHINGFOUND')); self::addToTemplate($templateid, 'POPUP_CODE', postVar('POPUP_CODE')); diff --git a/nucleus/libs/AdminActions.php b/nucleus/libs/AdminActions.php index 43bfc3c..428b73f 100644 --- a/nucleus/libs/AdminActions.php +++ b/nucleus/libs/AdminActions.php @@ -700,7 +700,8 @@ class AdminActions extends BaseActions if ( $resource->rowCount() > 0 ) { $template['content'] = 'actionlist'; - $this->parser->parse(showlist($resource, 'table', $template, $template_name)); + $action_list = showlist($resource, 'table', $template, $template_name); + $this->parser->parse($action_list); } else { @@ -854,7 +855,8 @@ class AdminActions extends BaseActions if ( $resource->rowCount() > 0 ) { $template['content'] = 'banlist'; - $this->parser-parse(showlist($resource, 'table', $template, $template_name)); + $ban_list = showlist($resource, 'table', $template, $template_name); + $this->parser-parse($ban_list); } else { @@ -1213,7 +1215,8 @@ class AdminActions extends BaseActions $template['extra'] = Entity::hsc(_MEMBERS_USESITELANG); } - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $skin_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($skin_select); return; } @@ -1257,7 +1260,8 @@ class AdminActions extends BaseActions $template['extra'] = Entity::hsc(_MEMBERS_USESITELANG); } - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $bookmarklet_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($bookmarklet_select); return; } @@ -1369,7 +1373,8 @@ class AdminActions extends BaseActions { $template['content'] = 'categorylist'; $template['tabindex'] = 200; - $this->parser->parse(listplug_batchlist('category', $resource, 'table', $template, $template_name)); + $category_list = listplug_batchlist('category', $resource, 'table', $template, $template_name); + $this->parser->parse($category_list); } else { @@ -1511,8 +1516,9 @@ class AdminActions extends BaseActions { $template['content'] = 'teamlist'; $template['tabindex'] = 10; - - $this->parser->parse(listplug_batchlist('team', $resource, 'table', $template, $template_name)); + + $team_list = listplug_batchlist('team', $resource, 'table', $template, $template_name); + $this->parser->parse($team_list); } else { @@ -1971,7 +1977,8 @@ class AdminActions extends BaseActions $template['tabindex'] = 10; $template['skinid'] = intRequestVar('skinid'); $template['skinname'] = $skin->getName(); - $this->parser->parse(showlist($normal_skintype, 'list_normalskinlist', $template, $template_name)); + $skin_list = showlist($normal_skintype, 'list_normalskinlist', $template, $template_name); + $this->parser->parse($skin_list); return; } @@ -1993,7 +2000,8 @@ class AdminActions extends BaseActions $template['name'] = 'DefaultBlog'; $template['selected'] = $CONF['DefaultBlog']; $template['tabindex'] = 10; - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $blog_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($blog_select); return; } @@ -2019,7 +2027,8 @@ class AdminActions extends BaseActions $template['selected'] = $blog->getDefaultCategory(); $template['tabindex'] = 110; - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $category_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($category_select); return; } @@ -2071,7 +2080,8 @@ class AdminActions extends BaseActions $query = sprintf($query, sql_table('skin_desc')); $template['tabindex'] = 50; - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $skin_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($skin_select); return; } @@ -2247,8 +2257,9 @@ class AdminActions extends BaseActions { $template['content'] = 'memberlist'; $template['tabindex'] = 10; - - $this->parser->parse(listplug_batchlist('member', $resource, 'table', $template, $template_name)); + + $member_list = listplug_batchlist('member', $resource, 'table', $template, $template_name); + $this->parser->parse($member_list); } else { @@ -2405,7 +2416,8 @@ class AdminActions extends BaseActions if ( sizeof($aOptions) > 0 ) { $template['content'] = 'plugoptionlist'; - $this->parser->parse(showlist($aOptions, 'table', $template, $template_name)); + $option_list = showlist($aOptions, 'table', $template, $template_name); + $this->parser->parse($option_list); } else { @@ -2654,7 +2666,8 @@ class AdminActions extends BaseActions { $content = $template[$ptname]; } - $this->parser->parse(listplug_templateEditRow($content, $ptdesc, $ptname, $help, $tabidx++, $big, $template_name)); + $tempate_textarea = listplug_templateEditRow($content, $ptdesc, $ptname, $help, $tabidx++, $big, $template_name); + $this->parser->parse($tempate_textarea); continue; } } @@ -2671,7 +2684,8 @@ class AdminActions extends BaseActions { $content = $template[$typename]; } - $this->parser->parse(listplug_templateEditRow($content, $typedesc, $typename, $help, $tabindex, $big, $template_name)); + $tempate_textarea = listplug_templateEditRow($content, $typedesc, $typename, $help, $tabindex, $big, $template_name); + $this->parser->parse($tempate_textarea); break; } @@ -3157,7 +3171,8 @@ class AdminActions extends BaseActions */ public function parse_inputyesno($name, $checkedval, $tabindex = 0, $value1 = 1, $value2 = 0, $yesval = _YES, $noval = _NO, $isAdmin = 0, $template_name = '') { - $this->parser->parse(listplug_input_yesno($name, $checkedval, $tabindex, $value1, $value2, $yesval, $noval, $isAdmin, $template_name)); + $input_yesno = listplug_input_yesno($name, $checkedval, $tabindex, $value1, $value2, $yesval, $noval, $isAdmin, $template_name); + $this->parser->parse($input_yesno); return; } @@ -3593,7 +3608,8 @@ class AdminActions extends BaseActions 'tabindex' => 10000, 'selected' => 0 ); - $this->parser->parse(showlist($query, 'select', $template, $template_name)); + $member_select = showlist($query, 'select', $template, $template_name); + $this->parser->parse($member_select); return; } @@ -3751,7 +3767,8 @@ class AdminActions extends BaseActions $template['content'] = 'pluginlist'; $template['tabindex'] = 10; - $this->parser->parse(showlist($query, 'table', $template, $template_name)); + $plugin_list = showlist($query, 'table', $template, $template_name); + $this->parser->parse($plugin_list); return; } @@ -3976,7 +3993,8 @@ class AdminActions extends BaseActions 'plugadmintooltip' => Entity::hsc($aInfo['tooltip']), 'plugadmintitle' => Entity::hsc($aInfo['title']), ); - $this->parser->parse(Template::fill($template['body'], $data)); + $body = Template::fill($template['body'], $data); + $this->parser->parse($body); } $this->parser->parse($template['foot']); } @@ -4093,8 +4111,9 @@ class AdminActions extends BaseActions $query = sprintf($query, sql_table('template_desc')); break; } - - $this->parser->parse(showlist($query, 'table', $show, $template_name)); + + $skin_list = showlist($query, 'table', $show, $template_name); + $this->parser->parse($skin_list); return; } @@ -4213,7 +4232,8 @@ class AdminActions extends BaseActions $template['tabindex'] = 10; $template['content'] = 'skinlist'; - $this->parser->parse(showlist($query, 'table', $template, $template_name)); + $skin_list = showlist($query, 'table', $template, $template_name); + $this->parser->parse($skin_list); return; } @@ -4296,7 +4316,8 @@ class AdminActions extends BaseActions $template['tabindex'] = 75; $template['skinid'] = $skin->getID(); $template['skinname'] = $skin->getName(); - $this->parser->parse(showlist($special_skintypes, 'list_specialskinlist', $template, $template_name)); + $skin_list = showlist($special_skintypes, 'list_specialskinlist', $template, $template_name); + $this->parser->parse($skin_list); } else { @@ -4502,7 +4523,8 @@ class AdminActions extends BaseActions $template['tabindex'] = 10; $template['content'] = 'templatelist'; - $this->parser->parse(showlist($query, 'table', $template, $template_name)); + $template_list = showlist($query, 'table', $template, $template_name); + $this->parser->parse($template_list); return; } @@ -4594,7 +4616,8 @@ class AdminActions extends BaseActions if ( $resource->rowCount() > 0 ) { $template['content'] = 'draftlist'; - $this->parser->parse(showlist($resource, 'table', $template, $template_name)); + $draft_list = showlist($resource, 'table', $template, $template_name); + $this->parser->parse($draft_list); } else { diff --git a/nucleus/libs/BAN.php b/nucleus/libs/BAN.php index b679899..18e034a 100644 --- a/nucleus/libs/BAN.php +++ b/nucleus/libs/BAN.php @@ -57,9 +57,9 @@ class Ban global $manager; $data = array( - 'blogid' => $blogid, - 'iprange' => &$iprange, - 'reason' => &$reason + 'blogid' => $blogid, + 'iprange' => &$iprange, + 'reason' => &$reason ); $manager->notify('PreAddBan', $data); @@ -79,11 +79,11 @@ class Ban public function removeBan($blogid, $iprange) { global $manager; - + $data = array( - 'blogid' => $blogid, - 'range' => $iprange - ); + 'blogid' => $blogid, + 'range' => $iprange + ); $manager->notify('PreDeleteBan', $data); $query = 'DELETE FROM %s WHERE blogid=%d and iprange=%s'; diff --git a/nucleus/libs/BLOG.php b/nucleus/libs/BLOG.php index 638329f..64ea623 100644 --- a/nucleus/libs/BLOG.php +++ b/nucleus/libs/BLOG.php @@ -184,7 +184,6 @@ class Blog private function showUsingQuery($templateName, $query, $highlight = '', $comments = 0, $dateheads = 1) { global $CONF, $manager, $currentTemplateName; - global $StartTime; $lastVisit = cookieVar($CONF['CookiePrefix'] .'lastVisit'); if ( $lastVisit != 0 ) @@ -229,7 +228,7 @@ class Blog if ( $old_date != 0 ) { $oldTS = strtotime($old_date); - $data = array('blog' => $this, 'timestamp' => $oldTS); + $data = array('blog' => &$this, 'timestamp' => $oldTS); $manager->notify('PreDateFoot', $data); if ( !in_array('DATE_FOOTER', $template) || empty($template['DATE_FOOTER']) ) @@ -244,7 +243,7 @@ class Blog $manager->notify('PostDateFoot', $data); } - $data = array('blog' => $this, 'timestamp' => $timestamp); + $data = array('blog' => &$this, 'timestamp' => $timestamp); $manager->notify('PreDateHead', $data); // note, to use templatvars in the dateheader, the %-characters need to be doubled in @@ -265,7 +264,7 @@ class Blog // parse item $parser->parse($template['ITEM_HEADER']); - $data = array('blog' => $this, 'item' => &$item); + $data = array('blog' => &$this, 'item' => &$item); $manager->notify('PreItem', $data); $parser->parse($template['ITEM']); $manager->notify('PostItem', $data); @@ -277,7 +276,7 @@ class Blog // add another date footer if there was at least one item if ( ($numrows > 0) && $dateheads ) { - $data = array('blog' => $this, 'timestamp' => strtotime($old_date)); + $data = array('blog' => &$this, 'timestamp' => strtotime($old_date)); $manager->notify('PreDateFoot', $data); $parser->parse($template['DATE_FOOTER']); $manager->notify('PostDateFoot', $data); @@ -942,7 +941,7 @@ class Blog * @param string $direction ASC/DESC * @return void */ - public function showBlogList($template, $bnametype, $orderby, $direction) + static public function showBlogList($template, $bnametype, $orderby, $direction) { global $CONF, $manager; diff --git a/nucleus/libs/LINK.php b/nucleus/libs/LINK.php index b202f1d..9285a2f 100644 --- a/nucleus/libs/LINK.php +++ b/nucleus/libs/LINK.php @@ -117,11 +117,11 @@ class Link if ($usePathInfo) { $data = array( - 'type' => $type, - 'params' => $params, - 'completed' => &$created, - 'url' => &$url - ); + 'type' => $type, + 'params' => $params, + 'completed' => &$created, + 'url' => &$url + ); $manager->notify('GenerateURL', $data); } diff --git a/nucleus/libs/MANAGER.php b/nucleus/libs/MANAGER.php index c88fb45..197c426 100644 --- a/nucleus/libs/MANAGER.php +++ b/nucleus/libs/MANAGER.php @@ -72,7 +72,7 @@ class Manager * $manager =& Manager::instance(); to get a reference to the object * instead of a copy */ - public static function &instance() + static public function &instance() { static $instance = array(); if ( empty($instance) ) diff --git a/nucleus/libs/MEMBER.php b/nucleus/libs/MEMBER.php index e26d5db..a0a1146 100644 --- a/nucleus/libs/MEMBER.php +++ b/nucleus/libs/MEMBER.php @@ -250,7 +250,7 @@ class Member } $errormessage = ''; - $data = array('member' => $this, 'username' => $login); + $data = array('member' => &$this, 'username' => $login); $manager->notify('LoginSuccess', $data); ActionLog::add(INFO, "Login successful for $login (sharedpc=$shared)"); } @@ -327,7 +327,7 @@ class Member /* remove cookies on logout */ setcookie("{$CONF['CookiePrefix']}user", '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']); setcookie("{$CONF['CookiePrefix']}loginkey", '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']); - $data = array('username' => cookieVar("{$CONF['CookiePrefix']}user") ); + $data = array('username' => cookieVar("{$CONF['CookiePrefix']}user")); $manager->notify('Logout', $data); } diff --git a/nucleus/libs/SKIN.php b/nucleus/libs/SKIN.php index 42e0f02..1cd58ea 100644 --- a/nucleus/libs/SKIN.php +++ b/nucleus/libs/SKIN.php @@ -320,7 +320,7 @@ class Skin global $currentSkinName, $manager, $CONF, $DIR_NUCLEUS; $data = array( - 'skin' => $this, + 'skin' => &$this, 'type' => $type ); $manager->notify("Init{$this->event_identifier}Parse", $data); diff --git a/nucleus/libs/TEMPLATE.php b/nucleus/libs/TEMPLATE.php index 3c07861..10af5d1 100644 --- a/nucleus/libs/TEMPLATE.php +++ b/nucleus/libs/TEMPLATE.php @@ -144,19 +144,19 @@ class Template global $manager; $data = array( - 'name' => &$name, - 'description' => &$desc - ); + 'name' => &$name, + 'description' => &$desc + ); $manager->notify('PreAddTemplate', $data); DB::execute('INSERT INTO '.sql_table('template_desc').' (tdname, tddesc) VALUES (' . DB::quoteValue($name) . ',' . DB::quoteValue($desc) . ')'); $newId = DB::getInsertId(); $data = array( - 'templateid' => $newId, - 'name' => $name, - 'description' => $desc - ); + 'templateid' => $newId, + 'name' => $name, + 'description' => $desc + ); $manager->notify('PostAddTemplate', $data); return $newId; @@ -185,18 +185,6 @@ class Template $template[$row['tpartname']] = $row['tcontent']; } - /* - * TODO: this is appropriate or not? - */ - if ( array_key_exists('LOCALE', $template) && !empty($template['LOCALE']) ) - { - setlocale(LC_TIME, $template['LOCALE']); - } - else - { - setlocale(LC_TIME,''); - } - return $template; } diff --git a/nucleus/libs/globalfunctions.php b/nucleus/libs/globalfunctions.php index 4ae5a19..2c443f6 100644 --- a/nucleus/libs/globalfunctions.php +++ b/nucleus/libs/globalfunctions.php @@ -51,7 +51,7 @@ if ( !isset($CONF) ) if ( array_key_exists('debug', $CONF) && $CONF['debug'] ) { /* report all errors! */ - error_reporting(E_ALL); + error_reporting(E_ALL | E_STRICT); } else { @@ -525,6 +525,39 @@ function include_translation(&$locale) $translation_file = $DIR_LOCALES . 'en_Latn_US.ISO-8859-1.php'; } include($translation_file); + + /* + * NOTE: + * PHP is written by C and utilize C library, whose APIs are defined in POSIX. + * + * setlocale() is one of APIs of C library. + * but the argument value for setlocale() depends on each implements + * + * The latest POSIX standard: + * The Open Group Base Specifications Issue 7 + * IEEE Std 1003.1™-2008 + * http://pubs.opengroup.org/onlinepubs/9699919799/mindex.html + * + * Microsoft's operating system uses their own implementation + * Language Strings + * http://msdn.microsoft.com/en-us/library/39cwe7zf%28v=vs.110%29.aspx + * Country/Region Strings + * http://msdn.microsoft.com/en-us/library/cdax410z%28v=vs.110%29.aspx + * + * Linux and Unix (in this meaning, Apple's OS X derives from UNIX) uses ISO standard. + * two characters language tag (ISO 639-1) + * two characters region and country lag (ISO 3166-1 alpha-1) + * + */ + if ( PHP_OS == "WIN32" || PHP_OS == "WINNT" ) + { + /* LOCALE_IN_WINDOWS is defined in each translation files */ + setlocale(LC_ALL, _LOCALE_IN_WINDOWS); + } + else + { + setlocale(LC_ALL, preg_replace('#(.+)_(.+)_(.+)#', '$1-$3', $locale)); + } return; } diff --git a/nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php b/nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php index a5cf6be..2a2f44b 100644 --- a/nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php +++ b/nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php @@ -11,9 +11,12 @@ * @version $Id: bg_Cyrl_BG.ISO-8859-5.php 1887 2012-06-17 08:30:08Z sakamocchi $ */ - /******************************************** +/******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/bg_Cyrl_BG.UTF-8.php b/nucleus/locales/bg_Cyrl_BG.UTF-8.php index 4800584..78fda76 100644 --- a/nucleus/locales/bg_Cyrl_BG.UTF-8.php +++ b/nucleus/locales/bg_Cyrl_BG.UTF-8.php @@ -11,9 +11,12 @@ * @version $Id: bg_Cyrl_BG.UTF-8.php 1887 2012-06-17 08:30:08Z sakamocchi $ */ - /******************************************** +/******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ca_Latn_ES.ISO-8859-1.php b/nucleus/locales/ca_Latn_ES.ISO-8859-1.php index 389e4f6..c72e033 100644 --- a/nucleus/locales/ca_Latn_ES.ISO-8859-1.php +++ b/nucleus/locales/ca_Latn_ES.ISO-8859-1.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ca_Latn_ES.UTF-8.php b/nucleus/locales/ca_Latn_ES.UTF-8.php index 19e27b2..726358a 100644 --- a/nucleus/locales/ca_Latn_ES.UTF-8.php +++ b/nucleus/locales/ca_Latn_ES.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/cs_Latn_CZ.UTF-8.php b/nucleus/locales/cs_Latn_CZ.UTF-8.php index 853cad3..e555896 100644 --- a/nucleus/locales/cs_Latn_CZ.UTF-8.php +++ b/nucleus/locales/cs_Latn_CZ.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'csy_cze'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php b/nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php index 9c16320..9656dae 100644 --- a/nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php +++ b/nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'csy_cze'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/de_Latn_DE.ISO-8859-1.php b/nucleus/locales/de_Latn_DE.ISO-8859-1.php index bbbc41b..7086293 100644 --- a/nucleus/locales/de_Latn_DE.ISO-8859-1.php +++ b/nucleus/locales/de_Latn_DE.ISO-8859-1.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'deu_deu'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/de_Latn_DE.UTF-8.php b/nucleus/locales/de_Latn_DE.UTF-8.php index 06f8f91..83ca26b 100644 --- a/nucleus/locales/de_Latn_DE.UTF-8.php +++ b/nucleus/locales/de_Latn_DE.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'deu_deu'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/el_Grek_GR.UTF-8.php b/nucleus/locales/el_Grek_GR.UTF-8.php index e04a912..c6d425c 100644 --- a/nucleus/locales/el_Grek_GR.UTF-8.php +++ b/nucleus/locales/el_Grek_GR.UTF-8.php @@ -15,6 +15,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ell_grc'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/el_Grek_GR.WINDOWS-1253.php b/nucleus/locales/el_Grek_GR.WINDOWS-1253.php index 8de7f08..57ee8da 100644 --- a/nucleus/locales/el_Grek_GR.WINDOWS-1253.php +++ b/nucleus/locales/el_Grek_GR.WINDOWS-1253.php @@ -15,6 +15,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ell_grc'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/en_Latn_US.ISO-8859-1.php b/nucleus/locales/en_Latn_US.ISO-8859-1.php index fc47096..62e3f90 100644 --- a/nucleus/locales/en_Latn_US.ISO-8859-1.php +++ b/nucleus/locales/en_Latn_US.ISO-8859-1.php @@ -11,6 +11,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'enu_usa'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/en_Latn_US.UTF-8.php b/nucleus/locales/en_Latn_US.UTF-8.php index 5f30ff1..691491a 100644 --- a/nucleus/locales/en_Latn_US.UTF-8.php +++ b/nucleus/locales/en_Latn_US.UTF-8.php @@ -11,6 +11,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'enu_usa'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/es_Latn_ES.ISO-8859-1.php b/nucleus/locales/es_Latn_ES.ISO-8859-1.php index 3d2fe1c..d8a4c41 100644 --- a/nucleus/locales/es_Latn_ES.ISO-8859-1.php +++ b/nucleus/locales/es_Latn_ES.ISO-8859-1.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'esp_esp'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/es_Latn_ES.UTF-8.php b/nucleus/locales/es_Latn_ES.UTF-8.php index ad2edfa..85e4d54 100644 --- a/nucleus/locales/es_Latn_ES.UTF-8.php +++ b/nucleus/locales/es_Latn_ES.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'esp_esp'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/fa_Arab_IR.UTF-8.php b/nucleus/locales/fa_Arab_IR.UTF-8.php index 639ca5d..2d99bef 100644 --- a/nucleus/locales/fa_Arab_IR.UTF-8.php +++ b/nucleus/locales/fa_Arab_IR.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/fi_Latn_FI.ISO-8859-1.php b/nucleus/locales/fi_Latn_FI.ISO-8859-1.php index 0374236..bc9f0d3 100644 --- a/nucleus/locales/fi_Latn_FI.ISO-8859-1.php +++ b/nucleus/locales/fi_Latn_FI.ISO-8859-1.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'fin_fin'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/fi_Latn_FI.UTF-8.php b/nucleus/locales/fi_Latn_FI.UTF-8.php index 4fadda1..e67e1a8 100644 --- a/nucleus/locales/fi_Latn_FI.UTF-8.php +++ b/nucleus/locales/fi_Latn_FI.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'fin_fin'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/fr_Latn_FR.ISO-8859-15.php b/nucleus/locales/fr_Latn_FR.ISO-8859-15.php index ddc9eb2..14f7a92 100644 --- a/nucleus/locales/fr_Latn_FR.ISO-8859-15.php +++ b/nucleus/locales/fr_Latn_FR.ISO-8859-15.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'fra_fra'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/fr_Latn_FR.UTF-8.php b/nucleus/locales/fr_Latn_FR.UTF-8.php index c2cc4e0..4164aa9 100644 --- a/nucleus/locales/fr_Latn_FR.UTF-8.php +++ b/nucleus/locales/fr_Latn_FR.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'fra_fra'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/gl_Latn_ES.ISO-8859-1.php b/nucleus/locales/gl_Latn_ES.ISO-8859-1.php index b76538b..d6717ae 100644 --- a/nucleus/locales/gl_Latn_ES.ISO-8859-1.php +++ b/nucleus/locales/gl_Latn_ES.ISO-8859-1.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/gl_Latn_ES.UTF-8.php b/nucleus/locales/gl_Latn_ES.UTF-8.php index 741a996..2149a55 100644 --- a/nucleus/locales/gl_Latn_ES.UTF-8.php +++ b/nucleus/locales/gl_Latn_ES.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/hr_Latn_HR.UTF-8.php b/nucleus/locales/hr_Latn_HR.UTF-8.php index 9ede2fb..9c45872 100644 --- a/nucleus/locales/hr_Latn_HR.UTF-8.php +++ b/nucleus/locales/hr_Latn_HR.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/hr_Latn_HR.WINDOWS-1250.php b/nucleus/locales/hr_Latn_HR.WINDOWS-1250.php index 7124d05..b3f2f8c 100644 --- a/nucleus/locales/hr_Latn_HR.WINDOWS-1250.php +++ b/nucleus/locales/hr_Latn_HR.WINDOWS-1250.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/hu_Latn_HU.ISO-8859-2.php b/nucleus/locales/hu_Latn_HU.ISO-8859-2.php index fc50a25..7f32090 100644 --- a/nucleus/locales/hu_Latn_HU.ISO-8859-2.php +++ b/nucleus/locales/hu_Latn_HU.ISO-8859-2.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'hun_hun'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/hu_Latn_HU.UTF-8.php b/nucleus/locales/hu_Latn_HU.UTF-8.php index b946a93..98c6787 100644 --- a/nucleus/locales/hu_Latn_HU.UTF-8.php +++ b/nucleus/locales/hu_Latn_HU.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'hun_hun'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/id_Latn_ID.ISO-8859-1.php b/nucleus/locales/id_Latn_ID.ISO-8859-1.php index 466aa2d..cf9b700 100644 --- a/nucleus/locales/id_Latn_ID.ISO-8859-1.php +++ b/nucleus/locales/id_Latn_ID.ISO-8859-1.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/id_Latn_ID.UTF-8.php b/nucleus/locales/id_Latn_ID.UTF-8.php index cb97a49..41129b9 100644 --- a/nucleus/locales/id_Latn_ID.UTF-8.php +++ b/nucleus/locales/id_Latn_ID.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/it_Latn_IT.ISO-8859-1.php b/nucleus/locales/it_Latn_IT.ISO-8859-1.php index 7ba0e96..aa8f421 100644 --- a/nucleus/locales/it_Latn_IT.ISO-8859-1.php +++ b/nucleus/locales/it_Latn_IT.ISO-8859-1.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ita_ita'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/it_Latn_IT.UTF-8.php b/nucleus/locales/it_Latn_IT.UTF-8.php index 0da5212..f7cf8af 100644 --- a/nucleus/locales/it_Latn_IT.UTF-8.php +++ b/nucleus/locales/it_Latn_IT.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ita_ita'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ja_Jpan_JP.EUC-JP.php b/nucleus/locales/ja_Jpan_JP.EUC-JP.php index bf164ca..af643ed 100644 --- a/nucleus/locales/ja_Jpan_JP.EUC-JP.php +++ b/nucleus/locales/ja_Jpan_JP.EUC-JP.php @@ -14,8 +14,11 @@ */ /******************************************** - * Start New for 4.0 * + * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'jpn_jpn'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'ǯ'); define('_LABEL_MONTH_UNIT', '·î'); diff --git a/nucleus/locales/ja_Jpan_JP.UTF-8.php b/nucleus/locales/ja_Jpan_JP.UTF-8.php index 635b8aa..60bbe36 100644 --- a/nucleus/locales/ja_Jpan_JP.UTF-8.php +++ b/nucleus/locales/ja_Jpan_JP.UTF-8.php @@ -14,8 +14,11 @@ */ /******************************************** - * Start New for 4.0 * + * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'jpn_jpn'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'å¹´'); define('_LABEL_MONTH_UNIT', '月'); diff --git a/nucleus/locales/ko_Kore_KR.EUC-KR.php b/nucleus/locales/ko_Kore_KR.EUC-KR.php index 174cc41..ae04f16 100644 --- a/nucleus/locales/ko_Kore_KR.EUC-KR.php +++ b/nucleus/locales/ko_Kore_KR.EUC-KR.php @@ -15,6 +15,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'kor_kor'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ko_Kore_KR.UTF-8.php b/nucleus/locales/ko_Kore_KR.UTF-8.php index 3289d8f..d987bea 100644 --- a/nucleus/locales/ko_Kore_KR.UTF-8.php +++ b/nucleus/locales/ko_Kore_KR.UTF-8.php @@ -15,6 +15,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'kor_kor'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ku_Arab_TR.UTF-8.php b/nucleus/locales/ku_Arab_TR.UTF-8.php index a7f6a5f..582fd21 100644 --- a/nucleus/locales/ku_Arab_TR.UTF-8.php +++ b/nucleus/locales/ku_Arab_TR.UTF-8.php @@ -15,6 +15,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/lv_Latn_LV.ISO-8859-13.php b/nucleus/locales/lv_Latn_LV.ISO-8859-13.php index c877f55..a79654f 100644 --- a/nucleus/locales/lv_Latn_LV.ISO-8859-13.php +++ b/nucleus/locales/lv_Latn_LV.ISO-8859-13.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/lv_Latn_LV.UTF-8.php b/nucleus/locales/lv_Latn_LV.UTF-8.php index b4aa6e1..fb23b94 100644 --- a/nucleus/locales/lv_Latn_LV.UTF-8.php +++ b/nucleus/locales/lv_Latn_LV.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/nl_Latn_NL.ISO-8859-15.php b/nucleus/locales/nl_Latn_NL.ISO-8859-15.php index 96219ca..b62d9bf 100644 --- a/nucleus/locales/nl_Latn_NL.ISO-8859-15.php +++ b/nucleus/locales/nl_Latn_NL.ISO-8859-15.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'nld_nld'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/nl_Latn_NL.UTF-8.php b/nucleus/locales/nl_Latn_NL.UTF-8.php index 6d72154..c946523 100644 --- a/nucleus/locales/nl_Latn_NL.UTF-8.php +++ b/nucleus/locales/nl_Latn_NL.UTF-8.php @@ -16,6 +16,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'nld_nld'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/pl_Latn_PL.UTF-8.php b/nucleus/locales/pl_Latn_PL.UTF-8.php index 58be4e4..20cdae8 100644 --- a/nucleus/locales/pl_Latn_PL.UTF-8.php +++ b/nucleus/locales/pl_Latn_PL.UTF-8.php @@ -19,6 +19,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'plk_pol'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'Rok'); define('_LABEL_MONTH_UNIT', 'Miesiąc'); diff --git a/nucleus/locales/pt_Latn_BR.ISO-8859-1.php b/nucleus/locales/pt_Latn_BR.ISO-8859-1.php index 42dc922..b686343 100644 --- a/nucleus/locales/pt_Latn_BR.ISO-8859-1.php +++ b/nucleus/locales/pt_Latn_BR.ISO-8859-1.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ptb_prt'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/pt_Latn_BR.UTF-8.php b/nucleus/locales/pt_Latn_BR.UTF-8.php index e540869..ae5a7b0 100644 --- a/nucleus/locales/pt_Latn_BR.UTF-8.php +++ b/nucleus/locales/pt_Latn_BR.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'ptb_prt'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ro_Latn_RO.ISO-8859-1.php b/nucleus/locales/ro_Latn_RO.ISO-8859-1.php index f80ed53..f790cef 100644 --- a/nucleus/locales/ro_Latn_RO.ISO-8859-1.php +++ b/nucleus/locales/ro_Latn_RO.ISO-8859-1.php @@ -20,6 +20,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ro_Latn_RO.UTF-8.php b/nucleus/locales/ro_Latn_RO.UTF-8.php index 630e823..f299b46 100644 --- a/nucleus/locales/ro_Latn_RO.UTF-8.php +++ b/nucleus/locales/ro_Latn_RO.UTF-8.php @@ -20,6 +20,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ru_Cyrl_RU.UTF-8.php b/nucleus/locales/ru_Cyrl_RU.UTF-8.php index 9cc57f0..0c4e8c7 100644 --- a/nucleus/locales/ru_Cyrl_RU.UTF-8.php +++ b/nucleus/locales/ru_Cyrl_RU.UTF-8.php @@ -18,6 +18,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'rus_rus'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php b/nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php index 56f0f47..e0c9d87 100644 --- a/nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php +++ b/nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php @@ -18,6 +18,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'rus_rus'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/sk_Latn_SK.ISO-8859-2.php b/nucleus/locales/sk_Latn_SK.ISO-8859-2.php index 2d2dc5c..9995e4f 100644 --- a/nucleus/locales/sk_Latn_SK.ISO-8859-2.php +++ b/nucleus/locales/sk_Latn_SK.ISO-8859-2.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'sky_svk'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/sk_Latn_SK.UTF-8.php b/nucleus/locales/sk_Latn_SK.UTF-8.php index 8c5db54..dd4c79d 100644 --- a/nucleus/locales/sk_Latn_SK.UTF-8.php +++ b/nucleus/locales/sk_Latn_SK.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'sky_svk'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/sr_Cyrl_RS.UTF-8.php b/nucleus/locales/sr_Cyrl_RS.UTF-8.php index 4c4e93e..4bf9c14 100644 --- a/nucleus/locales/sr_Cyrl_RS.UTF-8.php +++ b/nucleus/locales/sr_Cyrl_RS.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/ur_Arab_PK.UTF-8.php b/nucleus/locales/ur_Arab_PK.UTF-8.php index cfdbddc..c9e262b 100644 --- a/nucleus/locales/ur_Arab_PK.UTF-8.php +++ b/nucleus/locales/ur_Arab_PK.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/vi_Latn_VN.UTF-8.php b/nucleus/locales/vi_Latn_VN.UTF-8.php index c8b345d..68652bd 100644 --- a/nucleus/locales/vi_Latn_VN.UTF-8.php +++ b/nucleus/locales/vi_Latn_VN.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'C'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/zh_Hans_CN.GB2312.php b/nucleus/locales/zh_Hans_CN.GB2312.php index 026ba18..d961cce 100644 --- a/nucleus/locales/zh_Hans_CN.GB2312.php +++ b/nucleus/locales/zh_Hans_CN.GB2312.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'chs_chn'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/zh_Hans_CN.UTF-8.php b/nucleus/locales/zh_Hans_CN.UTF-8.php index 0d5729d..258770c 100644 --- a/nucleus/locales/zh_Hans_CN.UTF-8.php +++ b/nucleus/locales/zh_Hans_CN.UTF-8.php @@ -14,6 +14,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'chs_chn'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/locales/zh_Hant_TW.UTF-8.php b/nucleus/locales/zh_Hant_TW.UTF-8.php index 52833a9..5def15e 100644 --- a/nucleus/locales/zh_Hant_TW.UTF-8.php +++ b/nucleus/locales/zh_Hant_TW.UTF-8.php @@ -13,6 +13,9 @@ /******************************************** * Start New for 4.0 * ********************************************/ +/* argument value for setlocale() in Microsoft's windows operating system */ +define('_LOCALE_IN_WINDOWS', 'cht_twn'); + /* labels for date and time measurement unit */ define('_LABEL_YEAR_UNIT', 'year'); define('_LABEL_MONTH_UNIT', 'month'); diff --git a/nucleus/xmlrpc/api_metaweblog.inc.php b/nucleus/xmlrpc/api_metaweblog.inc.php index 97e08d0..ee580cb 100644 --- a/nucleus/xmlrpc/api_metaweblog.inc.php +++ b/nucleus/xmlrpc/api_metaweblog.inc.php @@ -75,7 +75,7 @@ $trackbacks[] = _getArrayVal($tblist, $i); } - $data = array('tb_id' => $itemid, 'urls' => & $trackbacks); + $data = array('tb_id' => $itemid, 'urls' => &$trackbacks); $manager->notify('SendTrackback', $data); } @@ -210,7 +210,7 @@ $trackbacks[] = _getArrayVal($tblist, $i); } - $data = array('tb_id' => $itemid, 'urls' => & $trackbacks); + $data = array('tb_id' => $itemid, 'urls' => &$trackbacks); $manager->notify('SendTrackback', $data); } diff --git a/nucleus/xmlrpc/api_mt.inc.php b/nucleus/xmlrpc/api_mt.inc.php index 0be5e36..81cfdf0 100644 --- a/nucleus/xmlrpc/api_mt.inc.php +++ b/nucleus/xmlrpc/api_mt.inc.php @@ -189,7 +189,7 @@ $trackbacks = array (); $tbstruct = array (); - $data = array('tb_id' => $itemid, 'trackbacks' => & $trackbacks); + $data = array('tb_id' => $itemid, 'trackbacks' => &$trackbacks); $manager->notify('RetrieveTrackback', $data); while (list(,$v) = each ($trackbacks)) { diff --git a/skins/admin/default/skinbackup.xml b/skins/admin/default/skinbackup.xml index a8b0bd8..1613a78 100644 --- a/skins/admin/default/skinbackup.xml +++ b/skins/admin/default/skinbackup.xml @@ -3216,7 +3216,6 @@ Nucleus CMS <%systemsettings(nucleusversion)%> <%systemsettings(nucleuscodename) <%edittemplateinfo(row,_TEMPLATE_DFOOTER, DATE_FOOTER, dateheads, 230)%> <%edittemplateinfo(row,_TEMPLATE_DFORMAT, FORMAT_DATE, datetime, 240)%> <%edittemplateinfo(row,_TEMPLATE_TFORMAT, FORMAT_TIME, datetime, 250)%> - <%edittemplateinfo(row,_TEMPLATE_LOCALE, LOCALE, locale, 260)%> diff --git a/skins/default/skinbackup.xml b/skins/default/skinbackup.xml index dfab004..c479efd 100644 --- a/skins/default/skinbackup.xml +++ b/skins/default/skinbackup.xml @@ -294,8 +294,6 @@ Posted by: <%author%> - - ]]> ]]> @@ -361,8 +359,6 @@ title="<%ip%> | Click to visit <%user%>'s website or send an email"> - - ]]> ]]> diff --git a/skins/grey/skinbackup.xml b/skins/grey/skinbackup.xml index 5382d61..0c6dafa 100644 --- a/skins/grey/skinbackup.xml +++ b/skins/grey/skinbackup.xml @@ -641,7 +641,6 @@ ]]> - ]]> ">[Read More!]]]> ]]> @@ -687,7 +686,6 @@ ]]> - ]]> ]]> \0]]> -- 2.11.0