diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 15:26:12 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-03 08:58:12 +0200 |
commit | 71fa0a75bf152b763fb3ee86dc5102b0c29d27b5 (patch) | |
tree | f3b347219d96e28331083fe33cf3b709119f5d48 /lib/private/App/InfoParser.php | |
parent | adf7e7295ed94a04bd9fcb056b81e664b45b4f07 (diff) | |
download | nextcloud-server-71fa0a75bf152b763fb3ee86dc5102b0c29d27b5.tar.gz nextcloud-server-71fa0a75bf152b763fb3ee86dc5102b0c29d27b5.zip |
Allow declaration of background jobs in info.xml
Diffstat (limited to 'lib/private/App/InfoParser.php')
-rw-r--r-- | lib/private/App/InfoParser.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index 21422d40603..e9456550206 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -89,6 +89,9 @@ class InfoParser { if (!array_key_exists('uninstall', $array['repair-steps'])) { $array['repair-steps']['uninstall'] = []; } + if (!array_key_exists('background-jobs', $array)) { + $array['background-jobs'] = []; + } if (array_key_exists('documentation', $array) && is_array($array['documentation'])) { foreach ($array['documentation'] as $key => $url) { @@ -128,6 +131,9 @@ class InfoParser { if (isset($array['repair-steps']['uninstall']['step']) && is_array($array['repair-steps']['uninstall']['step'])) { $array['repair-steps']['uninstall'] = $array['repair-steps']['uninstall']['step']; } + if (isset($array['background-jobs']['job']) && is_array($array['background-jobs']['job'])) { + $array['background-jobs'] = $array['background-jobs']['job']; + } return $array; } @@ -147,10 +153,7 @@ class InfoParser { if (!isset($array[$element])) { $array[$element] = ""; } - /** - * @var \SimpleXMLElement $node - */ - + /** @var \SimpleXMLElement $node */ // Has attributes if ($attributes = $node->attributes()) { $data = [ |