Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
aa0265bd
Commit
aa0265bd
authored
9 years ago
by
Morris Jobke
Browse files
Options
Downloads
Patches
Plain Diff
Replace OC_Config in setup
parent
2d1cc8aa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/setup/postgresql.php
+4
-3
4 additions, 3 deletions
lib/private/setup/postgresql.php
lib/private/setup/sqlite.php
+1
-1
1 addition, 1 deletion
lib/private/setup/sqlite.php
with
5 additions
and
4 deletions
lib/private/setup/postgresql.php
+
4
−
3
View file @
aa0265bd
...
@@ -66,7 +66,8 @@ class PostgreSQL extends AbstractDatabase {
...
@@ -66,7 +66,8 @@ class PostgreSQL extends AbstractDatabase {
$this
->
createDBUser
(
$connection
);
$this
->
createDBUser
(
$connection
);
}
}
\OC_Config
::
setValues
([
$systemConfig
=
\OC
::
$server
->
getSystemConfig
();
$systemConfig
->
setValues
([
'dbuser'
=>
$this
->
dbUser
,
'dbuser'
=>
$this
->
dbUser
,
'dbpassword'
=>
$this
->
dbPassword
,
'dbpassword'
=>
$this
->
dbPassword
,
]);
]);
...
@@ -78,8 +79,8 @@ class PostgreSQL extends AbstractDatabase {
...
@@ -78,8 +79,8 @@ class PostgreSQL extends AbstractDatabase {
pg_close
(
$connection
);
pg_close
(
$connection
);
// connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled
// connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled
$this
->
dbUser
=
\OC_
Config
::
getValue
(
'dbuser'
);
$this
->
dbUser
=
$system
Config
->
getValue
(
'dbuser'
);
$this
->
dbPassword
=
\OC_
Config
::
getValue
(
'dbpassword'
);
$this
->
dbPassword
=
$system
Config
->
getValue
(
'dbpassword'
);
$e_host
=
addslashes
(
$this
->
dbHost
);
$e_host
=
addslashes
(
$this
->
dbHost
);
$e_dbname
=
addslashes
(
$this
->
dbName
);
$e_dbname
=
addslashes
(
$this
->
dbName
);
...
...
This diff is collapsed.
Click to expand it.
lib/private/setup/sqlite.php
+
1
−
1
View file @
aa0265bd
...
@@ -31,7 +31,7 @@ class Sqlite extends AbstractDatabase {
...
@@ -31,7 +31,7 @@ class Sqlite extends AbstractDatabase {
}
}
public
function
setupDatabase
(
$username
)
{
public
function
setupDatabase
(
$username
)
{
$datadir
=
\OC
_
Config
::
getValue
(
'datadirectory'
);
$datadir
=
\OC
::
$server
->
getSystem
Config
()
->
getValue
(
'datadirectory'
);
//delete the old sqlite database first, might cause infinte loops otherwise
//delete the old sqlite database first, might cause infinte loops otherwise
if
(
file_exists
(
"
$datadir
/owncloud.db"
))
{
if
(
file_exists
(
"
$datadir
/owncloud.db"
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment