equal
deleted
inserted
replaced
431 * UPGRADE STAGES |
431 * UPGRADE STAGES |
432 */ |
432 */ |
433 |
433 |
434 function stg_lang_import() |
434 function stg_lang_import() |
435 { |
435 { |
436 global $db, $languages; |
436 global $db, $languages, $do_langimport; |
437 |
437 |
438 define('IN_ENANO_UPGRADE_POST', 1); |
438 define('IN_ENANO_UPGRADE_POST', 1); |
439 |
439 |
440 // |
440 // |
441 // IMPORT NEW STRINGS |
441 // IMPORT NEW STRINGS |
458 foreach ( array('core', 'admin', 'user', 'tools') as $language_file ) |
458 foreach ( array('core', 'admin', 'user', 'tools') as $language_file ) |
459 { |
459 { |
460 // generate full path |
460 // generate full path |
461 $language_file = ENANO_ROOT . "/language/{$languages[$row['lang_code']]['dir']}/$language_file.json"; |
461 $language_file = ENANO_ROOT . "/language/{$languages[$row['lang_code']]['dir']}/$language_file.json"; |
462 // setting the second parameter to bool(true) causes it to skip existing strings |
462 // setting the second parameter to bool(true) causes it to skip existing strings |
463 if ( !$lang_local->import($language_file, true) ) |
463 if ( !$lang_local->import($language_file, ( !$do_langimport )) ) |
464 // on failure, report failure to libenanoinstall |
464 // on failure, report failure to libenanoinstall |
465 return false; |
465 return false; |
466 } |
466 } |
467 // unload this lang_local object to save memory |
467 // unload this lang_local object to save memory |
468 unset($lang_local); |
468 unset($lang_local); |