2005-11-30 17:48:06 +00:00
< ? php
2007-10-05 14:36:34 +00:00
/**
2005-11-30 17:48:06 +00:00
*
2014-05-27 20:18:06 +02:00
* This file is part of the phpBB Forum Software package .
*
* @ copyright ( c ) phpBB Limited < https :// www . phpbb . com >
* @ license GNU General Public License , version 2 ( GPL - 2.0 )
*
* For full copyright and license information , please see
* the docs / CREDITS . txt file .
2005-11-30 17:48:06 +00:00
*
*/
2007-10-05 14:36:34 +00:00
/**
* @ ignore
*/
if ( ! defined ( 'IN_PHPBB' ))
{
exit ;
}
2005-11-30 17:48:06 +00:00
class acp_language
{
2006-02-18 13:54:12 +00:00
var $u_action ;
2005-11-30 17:48:06 +00:00
var $main_files ;
var $language_header = '' ;
var $lang_header = '' ;
var $language_file = '' ;
var $language_directory = '' ;
function main ( $id , $mode )
{
2014-05-11 12:09:16 +02:00
global $config , $db , $user , $template ;
global $phpbb_root_path , $phpEx , $request ;
2005-11-30 17:48:06 +00:00
include_once ( $phpbb_root_path . 'includes/functions_user.' . $phpEx );
// Check and set some common vars
2007-10-03 15:05:54 +00:00
$action = ( isset ( $_POST [ 'update_details' ])) ? 'update_details' : '' ;
2007-10-14 11:35:32 +00:00
$action = ( isset ( $_POST [ 'remove_store' ])) ? 'details' : $action ;
2007-10-03 15:05:54 +00:00
2007-10-14 13:40:48 +00:00
$submit = ( empty ( $action ) && ! isset ( $_POST [ 'update' ]) && ! isset ( $_POST [ 'test_connection' ])) ? false : true ;
2007-10-03 15:05:54 +00:00
$action = ( empty ( $action )) ? request_var ( 'action' , '' ) : $action ;
$form_name = 'acp_lang' ;
add_form_key ( 'acp_lang' );
2005-11-30 17:48:06 +00:00
$lang_id = request_var ( 'id' , 0 );
2006-10-19 13:55:48 +00:00
$selected_lang_file = request_var ( 'language_file' , '|common.' . $phpEx );
list ( $this -> language_directory , $this -> language_file ) = explode ( '|' , $selected_lang_file );
2005-11-30 17:48:06 +00:00
$this -> language_directory = basename ( $this -> language_directory );
$this -> language_file = basename ( $this -> language_file );
$user -> add_lang ( 'acp/language' );
$this -> tpl_name = 'acp_language' ;
$this -> page_title = 'ACP_LANGUAGE_PACKS' ;
switch ( $action )
{
case 'update_details' :
2007-10-03 15:33:31 +00:00
if ( ! $submit || ! check_form_key ( $form_name ))
2007-10-03 15:05:54 +00:00
{
trigger_error ( $user -> lang [ 'FORM_INVALID' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
}
2005-11-30 17:48:06 +00:00
if ( ! $lang_id )
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'NO_LANG_ID' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2006-07-10 15:55:10 +00:00
$sql = ' SELECT *
FROM ' . LANG_TABLE . "
2005-11-30 17:48:06 +00:00
WHERE lang_id = $lang_id " ;
$result = $db -> sql_query ( $sql );
$row = $db -> sql_fetchrow ( $result );
$db -> sql_freeresult ( $result );
$sql_ary = array (
'lang_english_name' => request_var ( 'lang_english_name' , $row [ 'lang_english_name' ]),
2007-07-22 20:11:45 +00:00
'lang_local_name' => utf8_normalize_nfc ( request_var ( 'lang_local_name' , $row [ 'lang_local_name' ], true )),
'lang_author' => utf8_normalize_nfc ( request_var ( 'lang_author' , $row [ 'lang_author' ], true )),
2005-11-30 17:48:06 +00:00
);
2007-10-05 14:36:34 +00:00
$db -> sql_query ( 'UPDATE ' . LANG_TABLE . '
2005-11-30 17:48:06 +00:00
SET ' . $db->sql_build_array(' UPDATE ', $sql_ary) . '
WHERE lang_id = ' . $lang_id );
2007-02-18 13:42:08 +00:00
2005-11-30 17:48:06 +00:00
add_log ( 'admin' , 'LOG_LANGUAGE_PACK_UPDATED' , $sql_ary [ 'lang_english_name' ]);
2006-02-18 13:54:12 +00:00
trigger_error ( $user -> lang [ 'LANGUAGE_DETAILS_UPDATED' ] . adm_back_link ( $this -> u_action ));
2005-11-30 17:48:06 +00:00
break ;
case 'details' :
if ( ! $lang_id )
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'NO_LANG_ID' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2008-08-16 19:06:18 +00:00
2005-11-30 17:48:06 +00:00
$this -> page_title = 'LANGUAGE_PACK_DETAILS' ;
2006-07-10 15:55:10 +00:00
$sql = ' SELECT *
FROM ' . LANG_TABLE . '
2005-11-30 17:48:06 +00:00
WHERE lang_id = ' . $lang_id ;
$result = $db -> sql_query ( $sql );
$lang_entries = $db -> sql_fetchrow ( $result );
$db -> sql_freeresult ( $result );
2008-08-16 19:06:18 +00:00
2014-05-11 13:13:11 +02:00
if ( ! $lang_entries )
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:13:11 +02:00
trigger_error ( $user -> lang [ 'LANGUAGE_PACK_NOT_EXIST' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2014-05-11 13:10:51 +02:00
$lang_iso = $lang_entries [ 'lang_iso' ];
2006-02-19 14:17:12 +00:00
2005-11-30 17:48:06 +00:00
$template -> assign_vars ( array (
'S_DETAILS' => true ,
2006-02-18 13:54:12 +00:00
'U_ACTION' => $this -> u_action . " &action=details&id= $lang_id " ,
'U_BACK' => $this -> u_action ,
2014-05-11 12:09:16 +02:00
2005-11-30 17:48:06 +00:00
'LANG_LOCAL_NAME' => $lang_entries [ 'lang_local_name' ],
'LANG_ENGLISH_NAME' => $lang_entries [ 'lang_english_name' ],
2014-05-11 13:10:51 +02:00
'LANG_ISO' => $lang_iso ,
2005-11-30 17:48:06 +00:00
'LANG_AUTHOR' => $lang_entries [ 'lang_author' ],
2014-05-11 13:10:51 +02:00
'L_MISSING_FILES' => $user -> lang ( 'THOSE_MISSING_LANG_FILES' , $lang_entries [ 'lang_local_name' ]),
'L_MISSING_VARS_EXPLAIN' => $user -> lang ( 'THOSE_MISSING_LANG_VARIABLES' , $lang_entries [ 'lang_local_name' ]),
2014-05-11 12:09:16 +02:00
));
2005-11-30 17:48:06 +00:00
2014-05-11 13:10:51 +02:00
// If current lang is different from the default lang, then highlight missing files and variables
2005-11-30 17:48:06 +00:00
if ( $lang_iso != $config [ 'default_lang' ])
{
2014-05-11 13:10:51 +02:00
try
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
$iterator = new \RecursiveIteratorIterator (
new \phpbb\recursive_dot_prefix_filter_iterator (
new \RecursiveDirectoryIterator (
$phpbb_root_path . 'language/' . $config [ 'default_lang' ] . '/' ,
\FilesystemIterator :: SKIP_DOTS
)
),
\RecursiveIteratorIterator :: LEAVES_ONLY
);
2005-11-30 17:48:06 +00:00
}
2014-05-11 13:10:51 +02:00
catch ( \Exception $e )
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
return array ();
2005-11-30 17:48:06 +00:00
}
2014-05-11 13:10:51 +02:00
foreach ( $iterator as $file_info )
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
/** @var \RecursiveDirectoryIterator $file_info */
$relative_path = $iterator -> getInnerIterator () -> getSubPathname ();
$relative_path = str_replace ( DIRECTORY_SEPARATOR , '/' , $relative_path );
if ( file_exists ( $phpbb_root_path . 'language/' . $lang_iso . '/' . $relative_path ))
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
if ( substr ( $relative_path , 0 - strlen ( $phpEx )) === $phpEx )
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
$missing_vars = $this -> compare_language_files ( $config [ 'default_lang' ], $lang_iso , $relative_path );
2008-08-16 19:06:18 +00:00
2014-05-11 13:10:51 +02:00
if ( ! empty ( $missing_vars ))
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
$template -> assign_block_vars ( 'missing_varfile' , array (
'FILE_NAME' => $relative_path ,
));
foreach ( $missing_vars as $var )
{
$template -> assign_block_vars ( 'missing_varfile.variable' , array (
'VAR_NAME' => $var ,
));
}
2005-11-30 17:48:06 +00:00
}
}
}
2014-05-11 13:10:51 +02:00
else
2005-11-30 17:48:06 +00:00
{
2014-05-11 13:10:51 +02:00
$template -> assign_block_vars ( 'missing_files' , array (
'FILE_NAME' => $relative_path ,
));
2005-11-30 17:48:06 +00:00
}
}
}
return ;
break ;
case 'delete' :
2006-11-03 17:50:39 +00:00
2005-11-30 17:48:06 +00:00
if ( ! $lang_id )
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'NO_LANG_ID' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2006-11-03 17:50:39 +00:00
2006-07-10 15:55:10 +00:00
$sql = ' SELECT *
FROM ' . LANG_TABLE . '
2005-11-30 17:48:06 +00:00
WHERE lang_id = ' . $lang_id ;
$result = $db -> sql_query ( $sql );
$row = $db -> sql_fetchrow ( $result );
$db -> sql_freeresult ( $result );
if ( $row [ 'lang_iso' ] == $config [ 'default_lang' ])
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'NO_REMOVE_DEFAULT_LANG' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2009-06-24 13:31:04 +00:00
if ( confirm_box ( true ))
{
$db -> sql_query ( 'DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id );
2005-11-30 17:48:06 +00:00
2009-06-24 13:31:04 +00:00
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_lang = '" . $db->sql_escape($config[' default_lang ']) . "'
WHERE user_lang = '" . $db->sql_escape($row[' lang_iso ']) . "' " ;
$db -> sql_query ( $sql );
2006-11-03 17:50:39 +00:00
2009-06-24 13:31:04 +00:00
// We also need to remove the translated entries for custom profile fields - we want clean tables, don't we?
$sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' WHERE lang_id = ' . $lang_id ;
$db -> sql_query ( $sql );
2007-01-04 16:07:38 +00:00
2009-06-24 13:31:04 +00:00
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id ;
$db -> sql_query ( $sql );
2007-01-04 16:07:38 +00:00
2009-06-24 13:31:04 +00:00
add_log ( 'admin' , 'LOG_LANGUAGE_PACK_DELETED' , $row [ 'lang_english_name' ]);
2006-11-03 17:50:39 +00:00
2009-06-24 13:31:04 +00:00
trigger_error ( sprintf ( $user -> lang [ 'LANGUAGE_PACK_DELETED' ], $row [ 'lang_english_name' ]) . adm_back_link ( $this -> u_action ));
}
else
{
$s_hidden_fields = array (
'i' => $id ,
'mode' => $mode ,
'action' => $action ,
'id' => $lang_id ,
);
2014-05-11 13:23:41 +02:00
confirm_box ( false , $user -> lang ( 'DELETE_LANGUAGE_CONFIRM' , $row [ 'lang_english_name' ]), build_hidden_fields ( $s_hidden_fields ));
2009-06-24 13:31:04 +00:00
}
2005-11-30 17:48:06 +00:00
break ;
case 'install' :
$lang_iso = request_var ( 'iso' , '' );
$lang_iso = basename ( $lang_iso );
if ( ! $lang_iso || ! file_exists ( " { $phpbb_root_path } language/ $lang_iso /iso.txt " ))
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'LANGUAGE_PACK_NOT_EXIST' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
$file = file ( " { $phpbb_root_path } language/ $lang_iso /iso.txt " );
$lang_pack = array (
'iso' => $lang_iso ,
2006-06-06 20:53:46 +00:00
'name' => trim ( htmlspecialchars ( $file [ 0 ])),
2006-11-03 17:50:39 +00:00
'local_name' => trim ( htmlspecialchars ( $file [ 1 ], ENT_COMPAT , 'UTF-8' )),
'author' => trim ( htmlspecialchars ( $file [ 2 ], ENT_COMPAT , 'UTF-8' ))
2005-11-30 17:48:06 +00:00
);
unset ( $file );
2006-07-10 15:55:10 +00:00
$sql = ' SELECT lang_iso
FROM ' . LANG_TABLE . "
2005-11-30 17:48:06 +00:00
WHERE lang_iso = '" . $db->sql_escape($lang_iso) . "' " ;
$result = $db -> sql_query ( $sql );
2006-11-03 17:50:39 +00:00
$row = $db -> sql_fetchrow ( $result );
$db -> sql_freeresult ( $result );
2005-11-30 17:48:06 +00:00
2006-11-10 13:49:52 +00:00
if ( $row )
2005-11-30 17:48:06 +00:00
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'LANGUAGE_PACK_ALREADY_INSTALLED' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
if ( ! $lang_pack [ 'name' ] || ! $lang_pack [ 'local_name' ])
{
2006-08-28 15:50:33 +00:00
trigger_error ( $user -> lang [ 'INVALID_LANGUAGE_PACK' ] . adm_back_link ( $this -> u_action ), E_USER_WARNING );
2005-11-30 17:48:06 +00:00
}
2006-11-03 17:50:39 +00:00
2005-11-30 17:48:06 +00:00
// Add language pack
$sql_ary = array (
'lang_iso' => $lang_pack [ 'iso' ],
'lang_dir' => $lang_pack [ 'iso' ],
'lang_english_name' => $lang_pack [ 'name' ],
'lang_local_name' => $lang_pack [ 'local_name' ],
'lang_author' => $lang_pack [ 'author' ]
);
$db -> sql_query ( 'INSERT INTO ' . LANG_TABLE . ' ' . $db -> sql_build_array ( 'INSERT' , $sql_ary ));
2007-01-04 16:07:38 +00:00
$lang_id = $db -> sql_nextid ();
// Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier.
$sql = ' SELECT lang_id
FROM ' . LANG_TABLE . "
WHERE lang_iso = '" . $db->sql_escape($config[' default_lang ']) . "' " ;
$result = $db -> sql_query ( $sql );
$default_lang_id = ( int ) $db -> sql_fetchfield ( 'lang_id' );
$db -> sql_freeresult ( $result );
2011-10-29 23:04:18 +02:00
// We want to notify the admin that custom profile fields need to be updated for the new language.
$notify_cpf_update = false ;
2007-01-04 16:07:38 +00:00
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
$sql = ' SELECT field_id , lang_name , lang_explain , lang_default_value
FROM ' . PROFILE_LANG_TABLE . '
WHERE lang_id = ' . $default_lang_id ;
$result = $db -> sql_query ( $sql );
while ( $row = $db -> sql_fetchrow ( $result ))
{
$row [ 'lang_id' ] = $lang_id ;
$db -> sql_query ( 'INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db -> sql_build_array ( 'INSERT' , $row ));
2011-10-29 23:04:18 +02:00
$notify_cpf_update = true ;
2007-01-04 16:07:38 +00:00
}
$db -> sql_freeresult ( $result );
$sql = ' SELECT field_id , option_id , field_type , lang_value
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id = ' . $default_lang_id ;
$result = $db -> sql_query ( $sql );
while ( $row = $db -> sql_fetchrow ( $result ))
{
$row [ 'lang_id' ] = $lang_id ;
$db -> sql_query ( 'INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db -> sql_build_array ( 'INSERT' , $row ));
2011-10-29 23:04:18 +02:00
$notify_cpf_update = true ;
2007-01-04 16:07:38 +00:00
}
$db -> sql_freeresult ( $result );
2006-11-03 17:50:39 +00:00
2005-11-30 17:48:06 +00:00
add_log ( 'admin' , 'LOG_LANGUAGE_PACK_INSTALLED' , $lang_pack [ 'name' ]);
2006-11-03 17:50:39 +00:00
2011-10-29 23:04:18 +02:00
$message = sprintf ( $user -> lang [ 'LANGUAGE_PACK_INSTALLED' ], $lang_pack [ 'name' ]);
$message .= ( $notify_cpf_update ) ? '<br /><br />' . $user -> lang [ 'LANGUAGE_PACK_CPF_UPDATE' ] : '' ;
trigger_error ( $message . adm_back_link ( $this -> u_action ));
2005-11-30 17:48:06 +00:00
break ;
}
$sql = ' SELECT user_lang , COUNT ( user_lang ) AS lang_count
2007-10-05 14:36:34 +00:00
FROM ' . USERS_TABLE . '
2005-11-30 17:48:06 +00:00
GROUP BY user_lang ' ;
$result = $db -> sql_query ( $sql );
$lang_count = array ();
while ( $row = $db -> sql_fetchrow ( $result ))
{
$lang_count [ $row [ 'user_lang' ]] = $row [ 'lang_count' ];
}
$db -> sql_freeresult ( $result );
2007-10-05 14:36:34 +00:00
$sql = ' SELECT *
2006-07-10 15:55:10 +00:00
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name ' ;
2005-11-30 17:48:06 +00:00
$result = $db -> sql_query ( $sql );
$installed = array ();
while ( $row = $db -> sql_fetchrow ( $result ))
{
$installed [] = $row [ 'lang_iso' ];
$tagstyle = ( $row [ 'lang_iso' ] == $config [ 'default_lang' ]) ? '*' : '' ;
$template -> assign_block_vars ( 'lang' , array (
2006-11-03 17:50:39 +00:00
'U_DETAILS' => $this -> u_action . " &action=details&id= { $row [ 'lang_id' ] } " ,
'U_DOWNLOAD' => $this -> u_action . " &action=download&id= { $row [ 'lang_id' ] } " ,
'U_DELETE' => $this -> u_action . " &action=delete&id= { $row [ 'lang_id' ] } " ,
'ENGLISH_NAME' => $row [ 'lang_english_name' ],
'TAG' => $tagstyle ,
'LOCAL_NAME' => $row [ 'lang_local_name' ],
'ISO' => $row [ 'lang_iso' ],
'USED_BY' => ( isset ( $lang_count [ $row [ 'lang_iso' ]])) ? $lang_count [ $row [ 'lang_iso' ]] : 0 ,
));
2005-11-30 17:48:06 +00:00
}
$db -> sql_freeresult ( $result );
$new_ary = $iso = array ();
2007-01-20 17:58:27 +00:00
$dp = @ opendir ( " { $phpbb_root_path } language " );
2005-11-30 17:48:06 +00:00
2007-01-20 17:58:27 +00:00
if ( $dp )
2005-11-30 17:48:06 +00:00
{
2007-01-20 17:58:27 +00:00
while (( $file = readdir ( $dp )) !== false )
2005-11-30 17:48:06 +00:00
{
2010-03-13 11:37:06 +01:00
if ( $file [ 0 ] == '.' || ! is_dir ( $phpbb_root_path . 'language/' . $file ))
2010-02-17 12:49:05 +00:00
{
continue ;
}
2010-03-13 11:37:06 +01:00
if ( file_exists ( " { $phpbb_root_path } language/ $file /iso.txt " ))
2005-11-30 17:48:06 +00:00
{
2007-01-20 17:58:27 +00:00
if ( ! in_array ( $file , $installed ))
2005-11-30 17:48:06 +00:00
{
2007-01-20 17:58:27 +00:00
if ( $iso = file ( " { $phpbb_root_path } language/ $file /iso.txt " ))
2005-11-30 17:48:06 +00:00
{
2007-01-20 17:58:27 +00:00
if ( sizeof ( $iso ) == 3 )
{
$new_ary [ $file ] = array (
'iso' => $file ,
'name' => trim ( $iso [ 0 ]),
'local_name' => trim ( $iso [ 1 ]),
'author' => trim ( $iso [ 2 ])
);
}
2005-11-30 17:48:06 +00:00
}
}
}
}
2007-01-20 17:58:27 +00:00
closedir ( $dp );
2005-11-30 17:48:06 +00:00
}
2007-01-20 17:58:27 +00:00
2005-11-30 17:48:06 +00:00
unset ( $installed );
if ( sizeof ( $new_ary ))
{
foreach ( $new_ary as $iso => $lang_ary )
{
$template -> assign_block_vars ( 'notinst' , array (
2006-11-03 17:50:39 +00:00
'ISO' => htmlspecialchars ( $lang_ary [ 'iso' ]),
'LOCAL_NAME' => htmlspecialchars ( $lang_ary [ 'local_name' ], ENT_COMPAT , 'UTF-8' ),
'NAME' => htmlspecialchars ( $lang_ary [ 'name' ], ENT_COMPAT , 'UTF-8' ),
2006-02-18 13:54:12 +00:00
'U_INSTALL' => $this -> u_action . '&action=install&iso=' . urlencode ( $lang_ary [ 'iso' ]))
2005-11-30 17:48:06 +00:00
);
}
}
2006-11-03 17:50:39 +00:00
2005-11-30 17:48:06 +00:00
unset ( $new_ary );
}
/**
2014-05-11 13:10:51 +02:00
* Compare two language files
2005-11-30 17:48:06 +00:00
*/
2014-05-11 13:10:51 +02:00
function compare_language_files ( $source_lang , $dest_lang , $file )
2005-11-30 17:48:06 +00:00
{
global $phpbb_root_path ;
2014-05-11 13:10:51 +02:00
$source_file = $phpbb_root_path . 'language/' . $source_lang . '/' . $file ;
$dest_file = $phpbb_root_path . 'language/' . $dest_lang . '/' . $file ;
2005-11-30 17:48:06 +00:00
2014-05-11 13:10:51 +02:00
if ( ! file_exists ( $dest_file ))
2006-12-28 17:28:28 +00:00
{
2014-05-11 13:10:51 +02:00
return array ();
2005-11-30 17:48:06 +00:00
}
2006-11-03 17:50:39 +00:00
2005-11-30 17:48:06 +00:00
$lang = array ();
2014-05-11 13:10:51 +02:00
include ( $source_file );
2005-11-30 17:48:06 +00:00
$lang_entry_src = $lang ;
$lang = array ();
2014-05-11 13:10:51 +02:00
include ( $dest_file );
2005-11-30 17:48:06 +00:00
$lang_entry_dst = $lang ;
unset ( $lang );
2014-05-11 13:10:51 +02:00
return array_diff ( array_keys ( $lang_entry_src ), array_keys ( $lang_entry_dst ));
2006-07-02 21:42:54 +00:00
}
2005-11-30 17:48:06 +00:00
}