]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4614 from annando/dir-own-contact
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 17 Mar 2018 12:42:51 +0000 (08:42 -0400)
committerGitHub <noreply@github.com>
Sat, 17 Mar 2018 12:42:51 +0000 (08:42 -0400)
Fix: In the contact search you had been able to delete your own contact

include/dba.php
mod/install.php
src/Database/DBStructure.php
util/credits.txt
view/templates/htconfig.tpl

index 9ac26aaa109b125fd61df189090e16ea49e8405b..fc54eefeb36953f609c6a7ebfed886cb37ba090f 100644 (file)
@@ -101,6 +101,7 @@ class dba {
                        if (!$install) {
                                System::unavailable();
                        }
+                       return false;
                }
                $a->save_timestamp($stamp1, "network");
 
index 3adcb75aa45b007ab234fd6418bbccb8769cb3f8..4b4940d2777e27ec1a4ef33b6317fe4f1c41e820 100644 (file)
@@ -540,7 +540,7 @@ function load_database_rem($v, $i) {
 }
 
 function load_database() {
-       $errors = DBStructure::update(false, true);
+       $errors = DBStructure::update(false, true, true);
 
        return $errors;
 }
index a1ef3374f9d6833ae41c103c61d99047522a307c..7ab91a6e1104d58a4449e2bd5d1b7c21cded2438 100644 (file)
@@ -199,12 +199,13 @@ class DBStructure
         *
         * @param bool  $verbose
         * @param bool  $action     Whether to actually apply the update
+        * @param bool  $install    Is this the initial update during the installation?
         * @param array $tables     An array of the database tables
         * @param array $definition An array of the definition tables
         * @return string Empty string if the update is successful, error messages otherwise
         */
-       public static function update($verbose, $action, array $tables = null, array $definition = null) {
-               if ($action) {
+       public static function update($verbose, $action, $install = false, array $tables = null, array $definition = null) {
+               if ($action && !$install) {
                        Config::set('system', 'maintenance', 1);
                        Config::set('system', 'maintenance_reason', L10n::t(': Database update', DBM::date().' '.date('e')));
                }
@@ -455,7 +456,9 @@ class DBStructure
                                }
 
                                if ($action) {
-                                       Config::set('system', 'maintenance_reason', L10n::t('%s: updating %s table.', DBM::date().' '.date('e'), $name));
+                                       if (!$install) {
+                                               Config::set('system', 'maintenance_reason', L10n::t('%s: updating %s table.', DBM::date().' '.date('e'), $name));
+                                       }
 
                                        // Ensure index conversion to unique removes duplicates
                                        if ($is_unique && ($temp_name != $name)) {
@@ -505,15 +508,15 @@ class DBStructure
                        }
                }
 
-               if ($action) {
+               if ($action && !$install) {
                        Config::set('system', 'maintenance', 0);
                        Config::set('system', 'maintenance_reason', '');
-               }
 
-               if ($errors) {
-                       Config::set('system', 'dbupdate', DB_UPDATE_FAILED);
-               } else {
-                       Config::set('system', 'dbupdate', DB_UPDATE_SUCCESSFUL);
+                       if ($errors) {
+                               Config::set('system', 'dbupdate', DB_UPDATE_FAILED);
+                       } else {
+                               Config::set('system', 'dbupdate', DB_UPDATE_SUCCESSFUL);
+                       }
                }
 
                return $errors;
index 4753c6a5d2eec773aaf3438a0171ddc3d477cfcd..46647c9d455234530f77613d86bc934b98fc6e3f 100644 (file)
@@ -16,6 +16,7 @@ Andrej Stieben
 André Alves
 André Lohan
 Andy H3
+Andy Hee
 AndyHee
 Anthronaut
 Arian - Cazare Muncitori
@@ -28,6 +29,7 @@ beardyunixer
 Beatriz Vital
 Ben Roberts
 ben-utzer
+Benjamin Lorteau
 bufalo1973
 Calango Jr
 Carlos Solís
@@ -75,6 +77,7 @@ Frederico Gonçalves Guimarães
 Gerhard Seeber
 gerhard6380
 Gert Cauwenberg
+GLComo
 greeneyedred
 Gregory Smith
 Haakon Meland Eriksen
@@ -91,7 +94,6 @@ Jak
 Jakob
 Jens Tautenhahn
 jensp
-Jeroen S
 jeroenpraat
 Johannes Schwab
 John Brazil
@@ -169,6 +171,7 @@ Silke Meyer
 Simon L'nu
 Simó Albert i Beltran
 soko1
+St John Karp
 Stanislav N.
 StefOfficiel
 Sveinn í Felli
@@ -206,4 +209,5 @@ Zered
 zotlabs
 zottel
 Zvi ben Yaakov (a.k.a rdc)
-Михаил
\ No newline at end of file
+Михаил
+朱陈锬
\ No newline at end of file
index 1ecd9a2b4b67dd66c4bcf52badab307e4bdedbf8..f651a273f73ec8c7fd7a5bcc4ec39da2b3e407f1 100644 (file)
@@ -85,7 +85,7 @@ $a->config['system']['rino_encrypt'] = {{$rino}};
 // default system theme
 
 $a->config['system']['theme'] = 'vier';
-$a->config['system']['allowed_themes'] = 'vier,quattro,duepuntozero,smoothly';
+$a->config['system']['allowed_themes'] = 'vier,quattro,duepuntozero,smoothly,frio';
 
 // By default allow pseudonyms