Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
2656ac9e
Commit
2656ac9e
authored
11 years ago
by
Arthur Schiwon
Browse files
Options
Downloads
Patches
Plain Diff
non-ajax Upgrade script utility, usable via CLI or wget. Requires PR 4047.
parent
ae82f7fd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
upgrade.php
+76
-0
76 additions, 0 deletions
upgrade.php
with
76 additions
and
0 deletions
upgrade.php
0 → 100644
+
76
−
0
View file @
2656ac9e
<?php
/**
* ownCloud
*
* @author Arthur Schiwon
* @copyright 2013 Arthur Schiwon blizzz@owncloud.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
$RUNTIME_NOAPPS
=
true
;
//no apps, yet
require_once
'lib/base.php'
;
// Don't do anything if ownCloud has not been installed
if
(
!
OC_Config
::
getValue
(
'installed'
,
false
))
{
exit
(
0
);
}
$br
=
OC
::
$CLI
?
PHP_EOL
:
'<br/>'
;
if
(
OC
::
checkUpgrade
(
false
))
{
$updater
=
new
\OC\Updater
();
$updater
->
listen
(
'\OC\Updater'
,
'maintenanceStart'
,
function
()
use
(
$br
)
{
echo
'Turned on maintenance mode'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'maintenanceEnd'
,
function
()
use
(
$br
)
{
echo
'Turned off maintenance mode'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'dbUpgrade'
,
function
()
use
(
$br
)
{
echo
'Updated database'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'filecacheStart'
,
function
()
use
(
$br
)
{
echo
'Updating filecache, this may take really long...'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'filecacheDone'
,
function
()
use
(
$br
)
{
echo
'Updated filecache'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'filecacheProgress'
,
function
(
$out
)
use
(
$br
)
{
echo
'... '
.
$out
.
'% done ...'
.
$br
;
});
$updater
->
listen
(
'\OC\Updater'
,
'failure'
,
function
(
$message
)
use
(
$br
)
{
echo
$message
.
$br
;
OC_Config
::
setValue
(
'maintenance'
,
false
);
});
$updater
->
upgrade
();
}
else
{
if
(
OC_Config
::
getValue
(
'maintenance'
,
false
))
{
//Possible scenario: ownCloud core is updated but an app failed
echo
'ownCloud is in maintenance mode'
.
$br
;
echo
'Maybe an upgrade is already in process. Please check the '
.
'logfile (data/owncloud.log). If you want to re-run the '
.
'upgrade procedure, remove the "maintenance mode" from '
.
'config.php and call this script again.'
.
$br
;
}
else
{
echo
'ownCloud is already latest version'
.
$br
;
}
}
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