Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
522d81aa
Commit
522d81aa
authored
Dec 08, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fallback to old metadata format in plugin update check
parent
cc22ed46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Metadata.php
qa-include/Q2A/Util/Metadata.php
+10
-3
No files found.
qa-include/Q2A/Util/Metadata.php
View file @
522d81aa
...
...
@@ -45,10 +45,17 @@ class Q2A_Util_Metadata
* @param string $url URL linking to a metadata.json file
* @return array The metadata fetched from the file
*/
public
function
fetchFromUrl
(
$url
)
public
function
fetchFromUrl
(
$url
,
$type
=
'Plugin'
)
{
$content
=
qa_retrieve_url
(
$url
);
return
$this
->
getArrayFromJson
(
$content
);
$contents
=
qa_retrieve_url
(
$url
);
$metadata
=
$this
->
getArrayFromJson
(
$contents
);
// fall back to old metadata format
if
(
empty
(
$metadata
))
{
$metadata
=
qa_addon_metadata
(
$contents
,
$type
);
}
return
$metadata
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment