]> git.pld-linux.org Git - packages/clickheat.git/blob - languages.patch
- drop obsolete and outdated manual inclusion of rpm macros
[packages/clickheat.git] / languages.patch
1 --- clickheat/index.php~        2011-04-20 00:53:09.000000000 +0300
2 +++ clickheat/index.php 2011-04-20 00:53:11.781485704 +0300
3 @@ -72,7 +72,7 @@
4  {
5         $lang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
6  }
7 -if (!isset($lang) || !in_array($lang, $__languages))
8 +if (!isset($lang) || !in_array($lang, $__languages) || !file_exists(CLICKHEAT_ROOT.'languages/'.$lang.'.php'))
9  {
10         $lang = 'en';
11  }
12 --- clickheat/view.php~ 2011-03-08 13:51:16.000000000 +0200
13 +++ clickheat/view.php  2011-04-20 00:52:19.615980496 +0300
14 @@ -92,6 +92,9 @@
15  <?php
16  foreach ($__languages as $lang)
17  {
18 +       if (!file_exists(CLICKHEAT_ROOT.'languages/'.$lang.'.php')) {
19 +               continue;
20 +       }
21         echo '<a href="', CLICKHEAT_INDEX_PATH, 'language=', $lang, '"><img src="', CLICKHEAT_PATH, 'images/flags/', $lang, '.png" width="18" height="12" alt="', $lang, '" /></a> ';
22  }
23  ?><br />
24 --- clickheat/login.php~        2011-03-08 13:51:16.000000000 +0200
25 +++ clickheat/login.php 2011-04-20 00:52:40.036830709 +0300
26 @@ -17,6 +17,9 @@
27  <?php
28  foreach ($__languages as $lang) 
29  {
30 +       if (!file_exists(CLICKHEAT_ROOT.'languages/'.$lang.'.php')) {
31 +               continue;
32 +       }
33         echo '<a href="', CLICKHEAT_INDEX_PATH, 'language=', $lang, '"><img src="', CLICKHEAT_PATH, 'images/flags/', $lang, '.png" width="18" height="12" alt="', $lang, '" /></a> ';
34  }
35  ?></div>
This page took 0.077188 seconds and 3 git commands to generate.