mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(app-info-shipped): add remote as its still available in code base
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
a6a228bd0a
commit
21426974b1
4 changed files with 42 additions and 31 deletions
|
|
@ -5,7 +5,7 @@
|
|||
- SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
|
||||
xsi:noNamespaceSchemaLocation="../../../resources/app-info-shipped.xsd">
|
||||
<id>files_sharing</id>
|
||||
<name>File sharing</name>
|
||||
<summary>File sharing</summary>
|
||||
|
|
@ -86,11 +86,11 @@ Turning the feature off removes shared files and folders on the server for all s
|
|||
</plugins>
|
||||
</collaboration>
|
||||
|
||||
<public>
|
||||
<files>public.php</files>
|
||||
</public>
|
||||
|
||||
<openmetrics>
|
||||
<exporter>OCA\Files_Sharing\OpenMetrics\SharesCountMetric</exporter>
|
||||
</openmetrics>
|
||||
|
||||
<public>
|
||||
<files>public.php</files>
|
||||
</public>
|
||||
</info>
|
||||
|
|
|
|||
|
|
@ -293,26 +293,29 @@ class InfoParser {
|
|||
* @return AppInfoDefinition
|
||||
*/
|
||||
public function applyL10N(array $data, string $lang): array {
|
||||
if (isset($data['name'])) {
|
||||
if (is_array($data['name'])) {
|
||||
$data['name'] = $this->findBestL10NOption($data['name'], $lang);
|
||||
}
|
||||
$data['name'] = trim($data['name']);
|
||||
}
|
||||
if (isset($data['summary'])) {
|
||||
if (is_array($data['summary'])) {
|
||||
$data['summary'] = $this->findBestL10NOption($data['summary'], $lang);
|
||||
}
|
||||
$data['summary'] = trim($data['summary']);
|
||||
}
|
||||
if (isset($data['description'])) {
|
||||
if (is_array($data['description'])) {
|
||||
$data['description'] = trim($this->findBestL10NOption($data['description'], $lang));
|
||||
}
|
||||
$data['description'] = trim($data['description']);
|
||||
// Ensure name is set and convert arrays to strings
|
||||
if (!isset($data['name'])) {
|
||||
$data['name'] = '';
|
||||
} elseif (is_array($data['name'])) {
|
||||
$data['name'] = $this->findBestL10NOption($data['name'], $lang);
|
||||
}
|
||||
$data['name'] = trim((string)$data['name']);
|
||||
|
||||
if (!isset($data['summary'])) {
|
||||
$data['summary'] = '';
|
||||
} elseif (is_array($data['summary'])) {
|
||||
$data['summary'] = $this->findBestL10NOption($data['summary'], $lang);
|
||||
}
|
||||
$data['summary'] = trim((string)$data['summary']);
|
||||
|
||||
// Ensure description is set and convert arrays to strings
|
||||
if (!isset($data['description'])) {
|
||||
$data['description'] = '';
|
||||
} elseif (is_array($data['description'])) {
|
||||
$data['description'] = trim($this->findBestL10NOption($data['description'], $lang));
|
||||
}
|
||||
$data['description'] = trim((string)$data['description']);
|
||||
|
||||
/** @var AppInfoDefinition $data */
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@ namespace OCP\App;
|
|||
* '@attributes'?: array{
|
||||
* lang?: non-empty-string,
|
||||
* },
|
||||
* '@value': non-empty-string,
|
||||
* '@value': string,
|
||||
* }
|
||||
*
|
||||
* @psalm-type AppInfoLocalizedData = array{
|
||||
* 'name': non-empty-string,
|
||||
* 'summary': non-empty-string,
|
||||
* 'description': non-empty-string,
|
||||
* 'name': string,
|
||||
* 'summary': string,
|
||||
* 'description': string,
|
||||
* }
|
||||
*
|
||||
* @psalm-type AppInfoRawXmlData = array{
|
||||
* 'name': non-empty-string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* 'summary': non-empty-string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* 'description': non-empty-string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* 'name': string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* 'summary': string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* 'description': string|AppInfoLocalizedEntry|list<string|AppInfoLocalizedEntry>,
|
||||
* }
|
||||
*
|
||||
* The enum definitions as per info.xsd:
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@
|
|||
maxOccurs="1" />
|
||||
<xs:element name="public" type="public" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="remote" type="remote" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="trash" type="trash" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="versions" type="versions" minOccurs="0"
|
||||
|
|
@ -619,7 +621,6 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<xs:complexType name="public">
|
||||
<xs:sequence>
|
||||
<xs:element name="webdav" type="path" minOccurs="0" maxOccurs="1"/>
|
||||
|
|
@ -627,6 +628,13 @@
|
|||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="remote">
|
||||
<xs:sequence>
|
||||
<xs:element name="webdav" type="path" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="files" type="path" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- dependencies -->
|
||||
<xs:complexType name="dependencies">
|
||||
<xs:sequence>
|
||||
|
|
|
|||
Loading…
Reference in a new issue