From 8c3b28b0d0e7f721bc215a4d018dbc957a28914a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Jan 2022 18:50:18 +0100 Subject: [PATCH] Introduce method for future --- htdocs/core/db/DoliDB.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index fdbb755637a..4476228d509 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -70,6 +70,18 @@ abstract class DoliDB implements Database /** @var string */ public $error; + + + /** + * Return the DB prefix + * + * @return string The DB prefix + */ + public function prefix() + { + return (empty($this->prefix_db) ? MAIN_DB_PREFIX : $this->prefix_db); + } + /** * Format a SQL IF *