Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
4ed0a418
Commit
4ed0a418
authored
Nov 26, 2014
by
Morris Jobke
Browse files
Merge pull request #12414 from owncloud/delay-autoconfig-kill-2
autoconfig.php only to be deleted on successful installation
parents
c749570a
b68c07d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/setup/controller.php
View file @
4ed0a418
...
...
@@ -12,13 +12,21 @@ namespace OC\Core\Setup;
use
OCP\IConfig
;
class
Controller
{
/** @var \OCP\IConfig */
/**
* @var \OCP\IConfig
*/
protected
$config
;
/**
* @var string
*/
private
$autoConfigFile
;
/**
* @param IConfig $config
*/
function
__construct
(
IConfig
$config
)
{
$this
->
autoConfigFile
=
\
OC
::
$SERVERROOT
.
'/config/autoconfig.php'
;
$this
->
config
=
$config
;
}
...
...
@@ -64,15 +72,17 @@ class Controller {
}
public
function
finishSetup
()
{
if
(
file_exists
(
$this
->
autoConfigFile
))
{
unlink
(
$this
->
autoConfigFile
);
}
\
OC_Util
::
redirectToDefaultPage
();
}
public
function
loadAutoConfig
(
$post
)
{
$autosetup_file
=
\
OC
::
$SERVERROOT
.
'/config/autoconfig.php'
;
if
(
file_exists
(
$autosetup_file
))
{
if
(
file_exists
(
$this
->
autoConfigFile
))
{
\
OC_Log
::
write
(
'core'
,
'Autoconfig file found, setting up owncloud...'
,
\
OC_Log
::
INFO
);
$AUTOCONFIG
=
array
();
include
$
autosetup_f
ile
;
include
$
this
->
autoConfigF
ile
;
$post
=
array_merge
(
$post
,
$AUTOCONFIG
);
}
...
...
@@ -82,9 +92,6 @@ class Controller {
if
(
$dbIsSet
AND
$directoryIsSet
AND
$adminAccountIsSet
)
{
$post
[
'install'
]
=
'true'
;
if
(
file_exists
(
$autosetup_file
))
{
unlink
(
$autosetup_file
);
}
}
$post
[
'dbIsSet'
]
=
$dbIsSet
;
$post
[
'directoryIsSet'
]
=
$directoryIsSet
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment