diff options
Diffstat (limited to 'lib/private/db/pgsqltools.php')
-rw-r--r-- | lib/private/db/pgsqltools.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/db/pgsqltools.php b/lib/private/db/pgsqltools.php index 6d17f8f40f8..3896009add4 100644 --- a/lib/private/db/pgsqltools.php +++ b/lib/private/db/pgsqltools.php @@ -8,11 +8,23 @@ */ namespace OC\DB; +use OCP\IConfig; /** * Various PostgreSQL specific helper functions. */ class PgSqlTools { + + /** @var \OCP\IConfig */ + private $config; + + /** + * @param \OCP\IConfig $config + */ + public function __construct(IConfig $config) { + $this->config = $config; + } + /** * @brief Resynchronizes all sequences of a database after using INSERTs * without leaving out the auto-incremented column. @@ -22,7 +34,7 @@ class PgSqlTools { public function resynchronizeDatabaseSequences(Connection $conn) { $databaseName = $conn->getDatabase(); $conn->getConfiguration()-> - setFilterSchemaAssetsExpression('/^'.\OCP\Config::getSystemValue('dbtableprefix').'/'); + setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix') . '/'); foreach ($conn->getSchemaManager()->listSequences() as $sequence) { $sequenceName = $sequence->getName(); |