Skip to content

Commit

Permalink
Merge pull request #3221 from nextcloud/backport/3200/stable25
Browse files Browse the repository at this point in the history
[stable25] [stable27] fix: Mobile support shall be enabled by default
  • Loading branch information
juliusknorr authored Oct 11, 2023
2 parents 0137bea + 882d4e1 commit 67093dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function getAppNamespace($key) {
/**
* Get a value by key
* @param string $key
* @param string|null $defaultValue The fallback value if no configuration and global fallback was found.
* @return string
*/
public function getAppValue($key) {
$defaultValue = null;
public function getAppValue($key, $defaultValue = null) {
if (array_key_exists($key, $this->defaults)) {
$defaultValue = $this->defaults[$key];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function getCapabilities() {
'mimetypes' => array_values($filteredMimetypes),
'mimetypesNoDefaultOpen' => array_values($optionalMimetypes),
'collabora' => $collaboraCapabilities,
'direct_editing' => isset($collaboraCapabilities['hasMobileSupport']) && $this->config->getAppValue('mobile_editing') ?: false,
'direct_editing' => ($collaboraCapabilities['hasMobileSupport'] ?? false) && $this->config->getAppValue('mobile_editing', 'yes') === 'yes',
'templates' => isset($collaboraCapabilities['hasTemplateSaveAs']) || isset($collaboraCapabilities['hasTemplateSource']) ?: false,
'productName' => $this->capabilitiesService->getProductName(),
'config' => [
Expand Down

0 comments on commit 67093dc

Please sign in to comment.