From 2debdbd0c999642ae9516d269d617b0000d9c04f Mon Sep 17 00:00:00 2001
From: Hypolite Petovan <hypolite@mrpetovan.com>
Date: Sun, 21 Oct 2018 02:52:11 -0400
Subject: [PATCH] Fix dbstructure console outputting addon structure as well

---
 src/Database/DBStructure.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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;
 	}