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
e8b423f6
Commit
e8b423f6
authored
12 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
style fixes
parent
665bb41c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/installer.php
+21
-21
21 additions, 21 deletions
lib/installer.php
with
21 additions
and
21 deletions
lib/installer.php
+
21
−
21
View file @
e8b423f6
...
...
@@ -259,18 +259,18 @@ class OC_Installer{
OC_App
::
enable
(
$ocsid
);
}
/**
* @brief Check if an update for the app is available
* @param $name name of the application
* @returns empt
r
y string is no update available or the version number of the update
*
* The function will check if an update for a version is available
*/
public
static
function
isUpdateAvailable
(
$app
)
{
/**
* @brief Check if an update for the app is available
* @param $name name of the application
* @returns empty string is no update available or the version number of the update
*
* The function will check if an update for a version is available
*/
public
static
function
isUpdateAvailable
(
$app
)
{
$ocsid
=
OC_Appconfig
::
getValue
(
$app
,
'ocsid'
,
''
);
if
(
$ocsid
<>
''
){
$ocsdata
=
OC_OCSClient
::
getApplication
(
$ocsid
);
$ocsversion
=
(
string
)
$ocsdata
[
'version'
];
$currentversion
=
OC_App
::
getAppVersion
(
$app
);
...
...
@@ -285,23 +285,23 @@ class OC_Installer{
return
(
''
);
}
}
}
/**
* @brief Check if app is already downloaded
* @param $name name of the application to remove
* @returns true/false
*
* The function will check if the app is already downloaded in the apps repository
*/
public
static
function
isDownloaded
(
$name
)
{
/**
* @brief Check if app is already downloaded
* @param $name name of the application to remove
* @returns true/false
*
* The function will check if the app is already downloaded in the apps repository
*/
public
static
function
isDownloaded
(
$name
)
{
$downloaded
=
false
;
foreach
(
OC
::
$APPSROOTS
as
$dir
)
{
if
(
is_dir
(
$dir
[
'path'
]
.
'/'
.
$name
))
$downloaded
=
true
;
if
(
is_dir
(
$dir
[
'path'
]
.
'/'
.
$name
))
$downloaded
=
true
;
}
return
(
$downloaded
);
}
}
/**
* @brief Removes an app
...
...
@@ -345,7 +345,7 @@ class OC_Installer{
// remove user files
}
if
(
OC_Installer
::
isDownloaded
(
$name
))
{
if
(
OC_Installer
::
isDownloaded
(
$name
))
{
$appdir
=
OC_App
::
getInstallPath
()
.
'/'
.
$name
;
OC_Helper
::
rmdirr
(
$appdir
);
...
...
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