From: Hypolite Petovan Date: Sun, 21 Oct 2018 06:52:11 +0000 (-0400) Subject: Fix dbstructure console outputting addon structure as well X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2debdbd0c999642ae9516d269d617b0000d9c04f;p=friendica.git Fix dbstructure console outputting addon structure as well --- diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index f9335da8ed..9abae944ae 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -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; }