equal
deleted
inserted
replaced
14 |
14 |
15 function page_Admin_LangManager() |
15 function page_Admin_LangManager() |
16 { |
16 { |
17 global $db, $session, $paths, $template, $plugins; // Common objects |
17 global $db, $session, $paths, $template, $plugins; // Common objects |
18 global $lang; |
18 global $lang; |
|
19 global $cache; |
19 if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
20 if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
20 { |
21 { |
21 $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
22 $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
22 echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
23 echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
23 echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
24 echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
492 // Remove cache files |
493 // Remove cache files |
493 $cache_file = ENANO_ROOT . "/cache/lang_{$lang_id}.php"; |
494 $cache_file = ENANO_ROOT . "/cache/lang_{$lang_id}.php"; |
494 if ( file_exists($cache_file) ) |
495 if ( file_exists($cache_file) ) |
495 @unlink($cache_file); |
496 @unlink($cache_file); |
496 |
497 |
|
498 $cache->purge("lang_{$lang_id}"); |
|
499 |
497 // Remove strings |
500 // Remove strings |
498 $q = $db->sql_query('DELETE FROM ' . table_prefix . "language_strings WHERE lang_id = $lang_id;"); |
501 $q = $db->sql_query('DELETE FROM ' . table_prefix . "language_strings WHERE lang_id = $lang_id;"); |
499 if ( !$q ) |
502 if ( !$q ) |
500 $db->_die(); |
503 $db->_die(); |
501 |
504 |