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
9cd7ecd5
Commit
9cd7ecd5
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Updater: pass update url as argument to update check
parent
58f473d7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/legacy/updater.php
+1
-1
1 addition, 1 deletion
lib/legacy/updater.php
lib/updater.php
+5
-5
5 additions, 5 deletions
lib/updater.php
with
6 additions
and
6 deletions
lib/legacy/updater.php
+
1
−
1
View file @
9cd7ecd5
...
...
@@ -9,6 +9,6 @@
class
OC_Updater
{
public
static
function
check
()
{
$updater
=
new
\OC\Updater
();
return
$updater
->
check
();
return
$updater
->
check
(
'http://apps.owncloud.com/updater.php'
);
}
}
This diff is collapsed.
Click to expand it.
lib/updater.php
+
5
−
5
View file @
9cd7ecd5
...
...
@@ -37,9 +37,10 @@ class Updater extends BasicEmitter {
/**
* Check if a new version is available
* @param string $updateUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php'
* @return array | bool
*/
public
function
check
()
{
public
function
check
(
$updaterUrl
)
{
// Look up the cache - it is invalidated all 30 minutes
if
((
\OC_Appconfig
::
getValue
(
'core'
,
'lastupdatedat'
)
+
1800
)
>
time
())
{
...
...
@@ -51,17 +52,16 @@ class Updater extends BasicEmitter {
if
(
\OC_Appconfig
::
getValue
(
'core'
,
'installedat'
,
''
)
==
''
)
{
\OC_Appconfig
::
setValue
(
'core'
,
'installedat'
,
microtime
(
true
));
}
$updaterurl
=
'http://apps.owncloud.com/updater.php'
;
;
$version
=
\OC_Util
::
getVersion
();
$version
[
'installed'
]
=
\OC_Appconfig
::
getValue
(
'core'
,
'installedat'
);
$version
[
'updated'
]
=
\OC_Appconfig
::
getValue
(
'core'
,
'lastupdatedat'
);
$version
[
'updatechannel'
]
=
'stable'
;
$version
[
'edition'
]
=
\OC_Util
::
getEditionString
();
$version
s
tring
=
implode
(
'x'
,
$version
);
$version
S
tring
=
implode
(
'x'
,
$version
);
//fetch xml data from updater
$url
=
$updater
u
rl
.
'?version='
.
$version
s
tring
;
$url
=
$updater
U
rl
.
'?version='
.
$version
S
tring
;
// set a sensible timeout of 10 sec to stay responsive even if the update server is down.
$ctx
=
stream_context_create
(
...
...
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