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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
8e6409a9
Commit
8e6409a9
authored
Aug 1, 2014
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #10098 from owncloud/fix-10094-master
prevent PHP errors and enhance logging
parents
4886c858
a0ab4c24
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/ocsclient.php
+10
-8
10 additions, 8 deletions
lib/private/ocsclient.php
with
10 additions
and
8 deletions
lib/private/ocsclient.php
+
10
−
8
View file @
8e6409a9
...
@@ -59,7 +59,7 @@ class OC_OCSClient{
...
@@ -59,7 +59,7 @@ class OC_OCSClient{
/**
/**
* Get all the categories from the OCS server
* Get all the categories from the OCS server
* @return array an array of category ids
* @return array
|null
an array of category ids
or null
* @note returns NULL if config value appstoreenabled is set to false
* @note returns NULL if config value appstoreenabled is set to false
* This function returns a list of all the application categories on the OCS server
* This function returns a list of all the application categories on the OCS server
*/
*/
...
@@ -92,7 +92,7 @@ class OC_OCSClient{
...
@@ -92,7 +92,7 @@ class OC_OCSClient{
/**
/**
* Get all the applications from the OCS server
* Get all the applications from the OCS server
* @return array an array of application data
* @return array
|null
an array of application data
or null
*
*
* This function returns a list of all the applications on the OCS server
* This function returns a list of all the applications on the OCS server
* @param array|string $categories
* @param array|string $categories
...
@@ -150,7 +150,7 @@ class OC_OCSClient{
...
@@ -150,7 +150,7 @@ class OC_OCSClient{
/**
/**
* Get an the applications from the OCS server
* Get an the applications from the OCS server
* @param string $id
* @param string $id
* @return array an array of application data
* @return array
|null
an array of application data
or null
*
*
* This function returns an applications from the OCS server
* This function returns an applications from the OCS server
*/
*/
...
@@ -162,7 +162,7 @@ class OC_OCSClient{
...
@@ -162,7 +162,7 @@ class OC_OCSClient{
$xml
=
OC_OCSClient
::
getOCSresponse
(
$url
);
$xml
=
OC_OCSClient
::
getOCSresponse
(
$url
);
if
(
$xml
==
false
)
{
if
(
$xml
==
false
)
{
OC_Log
::
write
(
'core'
,
'Unable to parse OCS content
'
,
OC_Log
::
FATAL
);
OC_Log
::
write
(
'core'
,
'Unable to parse OCS content
for app '
.
$id
,
OC_Log
::
FATAL
);
return
null
;
return
null
;
}
}
$loadEntities
=
libxml_disable_entity_loader
(
true
);
$loadEntities
=
libxml_disable_entity_loader
(
true
);
...
@@ -170,6 +170,10 @@ class OC_OCSClient{
...
@@ -170,6 +170,10 @@ class OC_OCSClient{
libxml_disable_entity_loader
(
$loadEntities
);
libxml_disable_entity_loader
(
$loadEntities
);
$tmp
=
$data
->
data
->
content
;
$tmp
=
$data
->
data
->
content
;
if
(
is_null
(
$tmp
))
{
OC_Log
::
write
(
'core'
,
'Invalid OCS content returned for app '
.
$id
,
OC_Log
::
FATAL
);
return
null
;
}
$app
=
array
();
$app
=
array
();
$app
[
'id'
]
=
$tmp
->
id
;
$app
[
'id'
]
=
$tmp
->
id
;
$app
[
'name'
]
=
$tmp
->
name
;
$app
[
'name'
]
=
$tmp
->
name
;
...
@@ -192,7 +196,7 @@ class OC_OCSClient{
...
@@ -192,7 +196,7 @@ class OC_OCSClient{
/**
/**
* Get the download url for an application from the OCS server
* Get the download url for an application from the OCS server
* @return array an array of application data
* @return array
|null
an array of application data
or null
*
*
* This function returns an download url for an applications from the OCS server
* This function returns an download url for an applications from the OCS server
* @param string $id
* @param string $id
...
@@ -223,6 +227,4 @@ class OC_OCSClient{
...
@@ -223,6 +227,4 @@ class OC_OCSClient{
return
$app
;
return
$app
;
}
}
}
}
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