plugins/SpecialUserFuncs.php
changeset 782 96848f04bbba
parent 743 0acb5d0f8328
child 799 4629ad98ee88
equal deleted inserted replaced
781:93a61032d33d 782:96848f04bbba
  2150   
  2150   
  2151   if ( $lang->lang_id == $lang_id )
  2151   if ( $lang->lang_id == $lang_id )
  2152     $lang_local =& $lang;
  2152     $lang_local =& $lang;
  2153   else
  2153   else
  2154     $lang_local = new Language($lang_id);
  2154     $lang_local = new Language($lang_id);
       
  2155     
       
  2156   $lang_local->get('meta_meta');
  2155   
  2157   
  2156   $lang_strings = enano_json_encode($lang_local->strings);
  2158   $lang_strings = enano_json_encode($lang_local->strings);
  2157   $etag = substr(sha1($lang_strings), 0, 20) . '-' . dechex($lang_local->lang_timestamp);
  2159   $etag = substr(sha1($lang_strings), 0, 20) . '-' . dechex($lang_local->lang_timestamp);
  2158   
  2160   
  2159   if ( isset($_SERVER['HTTP_IF_NONE_MATCH']) )
  2161   if ( isset($_SERVER['HTTP_IF_NONE_MATCH']) )
  2177   
  2179   
  2178   $lang_local->fetch();
  2180   $lang_local->fetch();
  2179   echo "if ( typeof(enano_lang) != 'object' )
  2181   echo "if ( typeof(enano_lang) != 'object' )
  2180   var enano_lang = new Object();
  2182   var enano_lang = new Object();
  2181 
  2183 
  2182 enano_lang[{$lang->lang_id}] = " . $lang_strings . ";";
  2184 enano_lang[{$lang_local->lang_id}] = " . $lang_strings . ";";
  2183 
  2185 
  2184   gzip_output();
  2186   gzip_output();
  2185   
  2187   
  2186   exit(0);
  2188   exit(0);
  2187 }
  2189 }