Browse Source

fix: dev: [nextcloud] allow dots in inner database

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
dev
Valentin Lab 5 years ago
parent
commit
3d23332631
  1. 13
      nextcloud/build/Dockerfile
  2. 14
      nextcloud/build/database-accept-dots.patch
  3. 1
      nextcloud/metadata.yml

13
nextcloud/build/Dockerfile

@ -0,0 +1,13 @@
## This is a cache of nextcloud image
FROM docker.0k.io/nextcloud:1.0.0
##
## What is following is only to patch nextcloud to remove
## some database name checks
##
COPY database-accept-dots.patch /tmp/
RUN cd /usr/src/nextcloud && \
patch -p1 < /tmp/database-accept-dots.patch

14
nextcloud/build/database-accept-dots.patch

@ -0,0 +1,14 @@
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index 0cbfecf..a821a2e 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -72,9 +72,6 @@ abstract class AbstractDatabase {
} elseif (empty($config['dbname'])) {
$errors[] = $this->trans->t("%s enter the database name.", [$this->dbprettyname]);
}
- if(substr_count($config['dbname'], '.') >= 1) {
- $errors[] = $this->trans->t("%s you may not use dots in the database name", array($this->dbprettyname));
- }
return $errors;
}

1
nextcloud/metadata.yml

@ -1,4 +1,3 @@
docker-image: docker.0k.io/nextcloud:1.0.0
data-resources:
- /var/www/html
- /var/lib/nextcloud/data

Loading…
Cancel
Save