public static function update_translation() { global $tmp_dir, $globalDebug; $error = ''; if ($globalDebug) { echo "Translation : Download..."; } update_db::download('http://www.acarsd.org/download/translation.php', $tmp_dir . 'translation.zip'); if (file_exists($tmp_dir . 'translation.zip')) { if ($globalDebug) { echo "Unzip..."; } update_db::unzip($tmp_dir . 'translation.zip'); if ($globalDebug) { echo "Add to DB..."; } $error = update_db::translation(); } else { $error = "File " . $tmp_dir . 'translation.zip' . " doesn't exist. Download failed."; } if ($error != '') { echo $error; exit; } elseif ($globalDebug) { echo "Done\n"; } }