]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
use icon for language selector instead of hotkey
[friendica.git] / boot.php
index 0495c97d7c89ebe55f272c14d724403f6cc333db..a67b96a085ca114371e66237144e96062f764a61 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -4,9 +4,9 @@ set_time_limit(0);
 ini_set('pcre.backtrack_limit', 250000);
 
 
-define ( 'FRIENDIKA_VERSION',      '2.2.995' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1002' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
-define ( 'DB_UPDATE_VERSION',      1059      );
+define ( 'DB_UPDATE_VERSION',      1060      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -481,17 +481,26 @@ function check_config(&$a) {
                $stored = intval($build);
                $current = intval(DB_UPDATE_VERSION);
                if(($stored < $current) && file_exists('update.php')) {
+
                        // We're reporting a different version than what is currently installed.
                        // Run any existing update scripts to bring the database up to current.
 
                        require_once('update.php');
-                       for($x = $stored; $x < $current; $x ++) {
-                               if(function_exists('update_' . $x)) {
-                                       $func = 'update_' . $x;
-                                       $func($a);
+
+                       // make sure that boot.php and update.php are the same release, we might be
+                       // updating right this very second and the correct version of the update.php
+                       // file may not be here yet. This can happen on a very busy site.
+
+                       if(DB_UPDATE_VERSION == UPDATE_VERSION) {
+
+                               for($x = $stored; $x < $current; $x ++) {
+                                       if(function_exists('update_' . $x)) {
+                                               $func = 'update_' . $x;
+                                               $func($a);
+                                       }
                                }
+                               set_config('system','build', DB_UPDATE_VERSION);
                        }
-                       set_config('system','build', DB_UPDATE_VERSION);
                }
        }
 
@@ -2757,6 +2766,7 @@ function unamp($s) {
 if(! function_exists('lang_selector')) {
 function lang_selector() {
        global $lang;
+       $o .= '<div id="lang-select-icon" class="icon language" title="' . t('Select an alternate language') . '" onclick="openClose(\'language-selector\');" ></div>';
        $o .= '<div id="language-selector" style="display: none;" >';
        $o .= '<form action="" method="post" ><select name="system_language" onchange="this.form.submit();" >';
        $langs = glob('view/*/strings.php');