Permalink
Browse files

feature:2823 Add triggers for login system, load function_plugins bef…

…ore function_user

git-svn-id: http://piwigo.org/svn/trunk@20325 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
mistic100 committed Jan 22, 2013
1 parent fa6cd51 commit bd58477644353bad70d237db12f3c5538fdee5e1
Showing with 11 additions and 2 deletions.
  1. +11 −2 include/functions.inc.php
View
@@ -21,14 +21,14 @@
// | USA. |
// +-----------------------------------------------------------------------+
+include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_cookie.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_html.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_tag.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/derivative_params.inc.php');
include_once( PHPWG_ROOT_PATH .'include/derivative_std_params.inc.php');
include_once( PHPWG_ROOT_PATH .'include/derivative.inc.php');
@@ -1256,7 +1256,8 @@ function load_language($filename, $dirname = '',
$target_charset = $options['target_charset'];
}
$target_charset = strtolower($target_charset);*/
- $source_file = '';
+ $source_file = '';
+ $selected_language = '';
foreach ($languages as $language)
{
$f = @$options['local'] ?
@@ -1265,6 +1266,7 @@ function load_language($filename, $dirname = '',
if (file_exists($f))
{
+ $selected_language = $language;
$source_file = $f;
break;
}
@@ -1281,6 +1283,13 @@ function load_language($filename, $dirname = '',
global $lang, $lang_info;
if ( !isset($lang) ) $lang=array();
if ( !isset($lang_info) ) $lang_info=array();
+
+ $parent_language = !empty($load_lang_info['parent']) ? $load_lang_info['parent'] : (
+ !empty($lang_info['parent']) ? $lang_info['parent'] : null );
+ if (!empty($parent_language))
+ {
+ @include(str_replace($selected_language, $parent_language, $source_file));
+ }
/* Note: target charset is always utf-8
if ( 'utf-8'!=$target_charset)

0 comments on commit bd58477

Please sign in to comment.