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
a348a6f4
Commit
a348a6f4
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
no loner use deprecated class \OC_Config
parent
e655d329
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
core/command/upgrade.php
+15
-2
15 additions, 2 deletions
core/command/upgrade.php
core/register_command.php
+1
-1
1 addition, 1 deletion
core/register_command.php
with
16 additions
and
3 deletions
core/command/upgrade.php
+
15
−
2
View file @
a348a6f4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
namespace
OC\Core\Command
;
namespace
OC\Core\Command
;
use
OC\Updater
;
use
OC\Updater
;
use
OCP\IConfig
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
...
@@ -24,6 +25,18 @@ class Upgrade extends Command {
...
@@ -24,6 +25,18 @@ class Upgrade extends Command {
public
$upgradeFailed
=
false
;
public
$upgradeFailed
=
false
;
/**
* @var IConfig
*/
private
$config
;
/**
* @param IConfig $config
*/
public
function
__construct
(
IConfig
$config
)
{
$this
->
config
=
$config
;
}
protected
function
configure
()
{
protected
function
configure
()
{
$this
$this
->
setName
(
'upgrade'
)
->
setName
(
'upgrade'
)
...
@@ -106,7 +119,7 @@ class Upgrade extends Command {
...
@@ -106,7 +119,7 @@ class Upgrade extends Command {
$this
->
postUpgradeCheck
(
$input
,
$output
);
$this
->
postUpgradeCheck
(
$input
,
$output
);
return
self
::
ERROR_SUCCESS
;
return
self
::
ERROR_SUCCESS
;
}
else
if
(
\OC_C
onfig
::
getValue
(
'maintenance'
,
false
))
{
}
else
if
(
$this
->
c
onfig
->
get
System
Value
(
'maintenance'
,
false
))
{
//Possible scenario: ownCloud core is updated but an app failed
//Possible scenario: ownCloud core is updated but an app failed
$output
->
writeln
(
'<warning>ownCloud is in maintenance mode</warning>'
);
$output
->
writeln
(
'<warning>ownCloud is in maintenance mode</warning>'
);
$output
->
write
(
'<comment>Maybe an upgrade is already in process. Please check the '
$output
->
write
(
'<comment>Maybe an upgrade is already in process. Please check the '
...
@@ -128,7 +141,7 @@ class Upgrade extends Command {
...
@@ -128,7 +141,7 @@ class Upgrade extends Command {
* @param OutputInterface $output output interface
* @param OutputInterface $output output interface
*/
*/
protected
function
postUpgradeCheck
(
InputInterface
$input
,
OutputInterface
$output
)
{
protected
function
postUpgradeCheck
(
InputInterface
$input
,
OutputInterface
$output
)
{
$trustedDomains
=
\OC_C
onfig
::
getValue
(
'trusted_domains'
,
array
());
$trustedDomains
=
$this
->
c
onfig
->
get
System
Value
(
'trusted_domains'
,
array
());
if
(
empty
(
$trustedDomains
))
{
if
(
empty
(
$trustedDomains
))
{
$output
->
write
(
$output
->
write
(
'<warning>The setting "trusted_domains" could not be '
.
'<warning>The setting "trusted_domains" could not be '
.
...
...
This diff is collapsed.
Click to expand it.
core/register_command.php
+
1
−
1
View file @
a348a6f4
...
@@ -12,7 +12,7 @@ $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
...
@@ -12,7 +12,7 @@ $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
$application
->
add
(
new
OC\Core\Command\Status
);
$application
->
add
(
new
OC\Core\Command\Status
);
$application
->
add
(
new
OC\Core\Command\Db\GenerateChangeScript
());
$application
->
add
(
new
OC\Core\Command\Db\GenerateChangeScript
());
$application
->
add
(
new
OC\Core\Command\Db\ConvertType
(
OC_Config
::
getObject
(),
new
\OC\DB\ConnectionFactory
()));
$application
->
add
(
new
OC\Core\Command\Db\ConvertType
(
OC_Config
::
getObject
(),
new
\OC\DB\ConnectionFactory
()));
$application
->
add
(
new
OC\Core\Command\Upgrade
());
$application
->
add
(
new
OC\Core\Command\Upgrade
(
\OC
::
$server
->
getConfig
()
));
$application
->
add
(
new
OC\Core\Command\Maintenance\SingleUser
());
$application
->
add
(
new
OC\Core\Command\Maintenance\SingleUser
());
$application
->
add
(
new
OC\Core\Command\Maintenance\Mode
(
OC_Config
::
getObject
()));
$application
->
add
(
new
OC\Core\Command\Maintenance\Mode
(
OC_Config
::
getObject
()));
$application
->
add
(
new
OC\Core\Command\App\Disable
());
$application
->
add
(
new
OC\Core\Command\App\Disable
());
...
...
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