X Tutup
Skip to content

Commit a2d95c4

Browse files
committed
Add product to version in capabilities response
This has been introduced by oCIS recently to announce oCIS with a proper product name. The web ui (as just another API client) defaults to "ownCloud" if the property is not set. With this enhancement we show the product name for ownCloud Server as well so that clients don't have to guess a sane default.
1 parent b338530 commit a2d95c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/Controller/CloudController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ public function __construct($appName, IRequest $request) {
4141
*/
4242
public function getCapabilities() {
4343
$result = [];
44+
$defaults = new \OCP\Defaults();
4445
list($major, $minor, $micro) = \OCP\Util::getVersion();
4546
$result['version'] = [
4647
'major' => $major,
4748
'minor' => $minor,
4849
'micro' => $micro,
4950
'string' => \OC_Util::getVersionString(),
5051
'edition' => \OC_Util::getEditionString(),
52+
'product' => $defaults->getName(),
5153
];
5254

5355
$result['capabilities'] = \OC::$server->getCapabilitiesManager()->getCapabilities();

0 commit comments

Comments
 (0)
X Tutup