Skip to content
Browse files

Save translations version

  • Loading branch information...
1 parent 85d985a commit ccd12466668941afe880b8822b9b8c6ad5a6bd71 @vrana committed Sep 3, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 compile.php
View
8 compile.php
@@ -114,9 +114,15 @@ function put_file_lang($match) {
}
$all_translations[$lang] = $translation_ids;
}
+ $all_translations = serialize($all_translations);
+ $translations_version = crc32($all_translations);
return '$translations = &$_SESSION["translations"];
+if ($_SESSION["translations_version"] != ' . $translations_version . ') {
+ $translations = array();
+ $_SESSION["translations_version"] = ' . $translations_version . ';
+}
if ($_GET["lang"] || !$translations) {
- $all_translations = unserialize(lzw_decompress(\'' . add_apo_slashes(lzw_compress(serialize($all_translations))) . '\'));
+ $all_translations = unserialize(lzw_decompress(\'' . add_apo_slashes(lzw_compress($all_translations)) . '\'));
$translations = $all_translations[$LANG];
}
';

0 comments on commit ccd1246

Please sign in to comment.
Something went wrong with that request. Please try again.