]> git.mxchange.org Git - friendica.git/commitdiff
Fix dbstructure console outputting addon structure as well
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 21 Oct 2018 06:52:11 +0000 (02:52 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 22 Oct 2018 20:50:55 +0000 (16:50 -0400)
src/Database/DBStructure.php

index f9335da8edb7e08640a8f0567571a75aaeaae5c2..9abae944ae0e873d8b67a065a95f49fc2f49a07c 100644 (file)
@@ -173,7 +173,7 @@ class DBStructure
        }
 
        public static function printStructure() {
-               $database = self::definition();
+               $database = self::definition(false);
 
                echo "-- ------------------------------------------\n";
                echo "-- ".FRIENDICA_PLATFORM." ".FRIENDICA_VERSION." (".FRIENDICA_CODENAME,")\n";
@@ -833,10 +833,11 @@ class DBStructure
         * On first pass, defines DB_UPDATE_VERSION constant.
         *
         * @see config/dbstructure.php
+        * @param boolean $with_addons_structure Whether to tack on addons additional tables
         * @return array
         * @throws Exception
         */
-       public static function definition()
+       public static function definition($with_addons_structure = true)
        {
                if (!self::$definition) {
                        $a = \Friendica\BaseObject::getApp();
@@ -858,7 +859,9 @@ class DBStructure
                        $definition = self::$definition;
                }
 
-               Hook::callAll('dbstructure_definition', $definition);
+               if ($with_addons_structure) {
+                       Hook::callAll('dbstructure_definition', $definition);
+               }
 
                return $definition;
        }