Completed
Pull Request — master (#4093)
by Björn
13:14
created
lib/private/Template/JSConfigHelper.php 1 patch
Indentation   +207 added lines, -207 removed lines patch added patch discarded remove patch
@@ -33,235 +33,235 @@
 block discarded – undo
33 33
 
34 34
 class JSConfigHelper {
35 35
 
36
-	/** @var IL10N */
37
-	private $l;
36
+    /** @var IL10N */
37
+    private $l;
38 38
 
39
-	/** @var \OC_Defaults */
40
-	private $defaults;
39
+    /** @var \OC_Defaults */
40
+    private $defaults;
41 41
 
42
-	/** @var IAppManager */
43
-	private $appManager;
42
+    /** @var IAppManager */
43
+    private $appManager;
44 44
 
45
-	/** @var ISession */
46
-	private $session;
45
+    /** @var ISession */
46
+    private $session;
47 47
 
48
-	/** @var IUser|null */
49
-	private $currentUser;
48
+    /** @var IUser|null */
49
+    private $currentUser;
50 50
 
51
-	/** @var IConfig */
52
-	private $config;
51
+    /** @var IConfig */
52
+    private $config;
53 53
 
54
-	/** @var IGroupManager */
55
-	private $groupManager;
54
+    /** @var IGroupManager */
55
+    private $groupManager;
56 56
 
57
-	/** @var IniGetWrapper */
58
-	private $iniWrapper;
57
+    /** @var IniGetWrapper */
58
+    private $iniWrapper;
59 59
 
60
-	/** @var IURLGenerator */
61
-	private $urlGenerator;
60
+    /** @var IURLGenerator */
61
+    private $urlGenerator;
62 62
 
63
-	/**
64
-	 * @param IL10N $l
65
-	 * @param \OC_Defaults $defaults
66
-	 * @param IAppManager $appManager
67
-	 * @param ISession $session
68
-	 * @param IUser|null $currentUser
69
-	 * @param IConfig $config
70
-	 * @param IGroupManager $groupManager
71
-	 * @param IniGetWrapper $iniWrapper
72
-	 * @param IURLGenerator $urlGenerator
73
-	 */
74
-	public function __construct(IL10N $l,
75
-								\OC_Defaults $defaults,
76
-								IAppManager $appManager,
77
-								ISession $session,
78
-								$currentUser,
79
-								IConfig $config,
80
-								IGroupManager $groupManager,
81
-								IniGetWrapper $iniWrapper,
82
-								IURLGenerator $urlGenerator) {
83
-		$this->l = $l;
84
-		$this->defaults = $defaults;
85
-		$this->appManager = $appManager;
86
-		$this->session = $session;
87
-		$this->currentUser = $currentUser;
88
-		$this->config = $config;
89
-		$this->groupManager = $groupManager;
90
-		$this->iniWrapper = $iniWrapper;
91
-		$this->urlGenerator = $urlGenerator;
92
-	}
63
+    /**
64
+     * @param IL10N $l
65
+     * @param \OC_Defaults $defaults
66
+     * @param IAppManager $appManager
67
+     * @param ISession $session
68
+     * @param IUser|null $currentUser
69
+     * @param IConfig $config
70
+     * @param IGroupManager $groupManager
71
+     * @param IniGetWrapper $iniWrapper
72
+     * @param IURLGenerator $urlGenerator
73
+     */
74
+    public function __construct(IL10N $l,
75
+                                \OC_Defaults $defaults,
76
+                                IAppManager $appManager,
77
+                                ISession $session,
78
+                                $currentUser,
79
+                                IConfig $config,
80
+                                IGroupManager $groupManager,
81
+                                IniGetWrapper $iniWrapper,
82
+                                IURLGenerator $urlGenerator) {
83
+        $this->l = $l;
84
+        $this->defaults = $defaults;
85
+        $this->appManager = $appManager;
86
+        $this->session = $session;
87
+        $this->currentUser = $currentUser;
88
+        $this->config = $config;
89
+        $this->groupManager = $groupManager;
90
+        $this->iniWrapper = $iniWrapper;
91
+        $this->urlGenerator = $urlGenerator;
92
+    }
93 93
 
94
-	public function getConfig() {
94
+    public function getConfig() {
95 95
 
96
-		if ($this->currentUser !== null) {
97
-			$uid = $this->currentUser->getUID();
98
-		} else {
99
-			$uid = null;
100
-		}
96
+        if ($this->currentUser !== null) {
97
+            $uid = $this->currentUser->getUID();
98
+        } else {
99
+            $uid = null;
100
+        }
101 101
 
102
-		// Get the config
103
-		$apps_paths = [];
102
+        // Get the config
103
+        $apps_paths = [];
104 104
 
105
-		if ($this->currentUser === null) {
106
-			$apps = $this->appManager->getInstalledApps();
107
-		} else {
108
-			$apps = $this->appManager->getEnabledAppsForUser($this->currentUser);
109
-		}
105
+        if ($this->currentUser === null) {
106
+            $apps = $this->appManager->getInstalledApps();
107
+        } else {
108
+            $apps = $this->appManager->getEnabledAppsForUser($this->currentUser);
109
+        }
110 110
 
111
-		foreach($apps as $app) {
112
-			$apps_paths[$app] = \OC_App::getAppWebPath($app);
113
-		}
111
+        foreach($apps as $app) {
112
+            $apps_paths[$app] = \OC_App::getAppWebPath($app);
113
+        }
114 114
 
115 115
 
116
-		$enableLinkPasswordByDefault = $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no');
117
-		$enableLinkPasswordByDefault = ($enableLinkPasswordByDefault === 'yes') ? true : false;
118
-		$defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
119
-		$defaultExpireDate = $enforceDefaultExpireDate = null;
120
-		if ($defaultExpireDateEnabled) {
121
-			$defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
122
-			$enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
123
-		}
124
-		$outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
116
+        $enableLinkPasswordByDefault = $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no');
117
+        $enableLinkPasswordByDefault = ($enableLinkPasswordByDefault === 'yes') ? true : false;
118
+        $defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
119
+        $defaultExpireDate = $enforceDefaultExpireDate = null;
120
+        if ($defaultExpireDateEnabled) {
121
+            $defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
122
+            $enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
123
+        }
124
+        $outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
125 125
 
126
-		$countOfDataLocation = 0;
127
-		$dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
128
-		if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
129
-			$dataLocation = false;
130
-		}
126
+        $countOfDataLocation = 0;
127
+        $dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
128
+        if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
129
+            $dataLocation = false;
130
+        }
131 131
 
132
-		if ($this->currentUser instanceof IUser) {
133
-			$lastConfirmTimestamp = $this->session->get('last-password-confirm');
134
-			if (!is_int($lastConfirmTimestamp)) {
135
-				$lastConfirmTimestamp = 0;
136
-			}
137
-		} else {
138
-			$lastConfirmTimestamp = 0;
139
-		}
132
+        if ($this->currentUser instanceof IUser) {
133
+            $lastConfirmTimestamp = $this->session->get('last-password-confirm');
134
+            if (!is_int($lastConfirmTimestamp)) {
135
+                $lastConfirmTimestamp = 0;
136
+            }
137
+        } else {
138
+            $lastConfirmTimestamp = 0;
139
+        }
140 140
 
141
-		$array = [
142
-			"oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
143
-			"oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
144
-			"oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
145
-			"oc_webroot" => "\"".\OC::$WEBROOT."\"",
146
-			"oc_appswebroots" =>  str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
147
-			"datepickerFormatDate" => json_encode($this->l->l('jsdate', null)),
148
-			'nc_lastLogin' => $lastConfirmTimestamp,
149
-			"dayNames" =>  json_encode([
150
-				(string)$this->l->t('Sunday'),
151
-				(string)$this->l->t('Monday'),
152
-				(string)$this->l->t('Tuesday'),
153
-				(string)$this->l->t('Wednesday'),
154
-				(string)$this->l->t('Thursday'),
155
-				(string)$this->l->t('Friday'),
156
-				(string)$this->l->t('Saturday')
157
-			]),
158
-			"dayNamesShort" =>  json_encode([
159
-				(string)$this->l->t('Sun.'),
160
-				(string)$this->l->t('Mon.'),
161
-				(string)$this->l->t('Tue.'),
162
-				(string)$this->l->t('Wed.'),
163
-				(string)$this->l->t('Thu.'),
164
-				(string)$this->l->t('Fri.'),
165
-				(string)$this->l->t('Sat.')
166
-			]),
167
-			"dayNamesMin" =>  json_encode([
168
-				(string)$this->l->t('Su'),
169
-				(string)$this->l->t('Mo'),
170
-				(string)$this->l->t('Tu'),
171
-				(string)$this->l->t('We'),
172
-				(string)$this->l->t('Th'),
173
-				(string)$this->l->t('Fr'),
174
-				(string)$this->l->t('Sa')
175
-			]),
176
-			"monthNames" => json_encode([
177
-				(string)$this->l->t('January'),
178
-				(string)$this->l->t('February'),
179
-				(string)$this->l->t('March'),
180
-				(string)$this->l->t('April'),
181
-				(string)$this->l->t('May'),
182
-				(string)$this->l->t('June'),
183
-				(string)$this->l->t('July'),
184
-				(string)$this->l->t('August'),
185
-				(string)$this->l->t('September'),
186
-				(string)$this->l->t('October'),
187
-				(string)$this->l->t('November'),
188
-				(string)$this->l->t('December')
189
-			]),
190
-			"monthNamesShort" => json_encode([
191
-				(string)$this->l->t('Jan.'),
192
-				(string)$this->l->t('Feb.'),
193
-				(string)$this->l->t('Mar.'),
194
-				(string)$this->l->t('Apr.'),
195
-				(string)$this->l->t('May.'),
196
-				(string)$this->l->t('Jun.'),
197
-				(string)$this->l->t('Jul.'),
198
-				(string)$this->l->t('Aug.'),
199
-				(string)$this->l->t('Sep.'),
200
-				(string)$this->l->t('Oct.'),
201
-				(string)$this->l->t('Nov.'),
202
-				(string)$this->l->t('Dec.')
203
-			]),
204
-			"firstDay" => json_encode($this->l->l('firstday', null)) ,
205
-			"oc_config" => json_encode([
206
-				'session_lifetime'	=> min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')),
207
-				'session_keepalive'	=> $this->config->getSystemValue('session_keepalive', true),
208
-				'version'			=> implode('.', \OCP\Util::getVersion()),
209
-				'versionstring'		=> \OC_Util::getVersionString(),
210
-				'enable_avatars'	=> true, // here for legacy reasons - to not crash existing code that relies on this value
211
-				'lost_password_link'=> $this->config->getSystemValue('lost_password_link', null),
212
-				'modRewriteWorking'	=> ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'),
213
-				'sharing.maxAutocompleteResults' => intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)),
214
-				'sharing.minSearchStringLength' => intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)),
215
-				'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX,
216
-			]),
217
-			"oc_appconfig" => json_encode([
218
-				'core' => [
219
-					'defaultExpireDateEnabled' => $defaultExpireDateEnabled,
220
-					'defaultExpireDate' => $defaultExpireDate,
221
-					'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
222
-					'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
223
-					'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault,
224
-					'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
225
-					'resharingAllowed' => \OCP\Share::isResharingAllowed(),
226
-					'remoteShareAllowed' => $outgoingServer2serverShareEnabled,
227
-					'federatedCloudShareDoc' => $this->urlGenerator->linkToDocs('user-sharing-federated'),
228
-					'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing()
229
-				]
230
-			]),
231
-			"oc_defaults" => json_encode([
232
-				'entity' => $this->defaults->getEntity(),
233
-				'name' => $this->defaults->getName(),
234
-				'title' => $this->defaults->getTitle(),
235
-				'baseUrl' => $this->defaults->getBaseUrl(),
236
-				'syncClientUrl' => $this->defaults->getSyncClientUrl(),
237
-				'docBaseUrl' => $this->defaults->getDocBaseUrl(),
238
-				'docPlaceholderUrl' => $this->defaults->buildDocLinkToKey('PLACEHOLDER'),
239
-				'slogan' => $this->defaults->getSlogan(),
240
-				'logoClaim' => $this->defaults->getLogoClaim(),
241
-				'shortFooter' => $this->defaults->getShortFooter(),
242
-				'longFooter' => $this->defaults->getLongFooter(),
243
-				'folder' => \OC_Util::getTheme(),
244
-			]),
245
-		];
141
+        $array = [
142
+            "oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
143
+            "oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
144
+            "oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
145
+            "oc_webroot" => "\"".\OC::$WEBROOT."\"",
146
+            "oc_appswebroots" =>  str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
147
+            "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)),
148
+            'nc_lastLogin' => $lastConfirmTimestamp,
149
+            "dayNames" =>  json_encode([
150
+                (string)$this->l->t('Sunday'),
151
+                (string)$this->l->t('Monday'),
152
+                (string)$this->l->t('Tuesday'),
153
+                (string)$this->l->t('Wednesday'),
154
+                (string)$this->l->t('Thursday'),
155
+                (string)$this->l->t('Friday'),
156
+                (string)$this->l->t('Saturday')
157
+            ]),
158
+            "dayNamesShort" =>  json_encode([
159
+                (string)$this->l->t('Sun.'),
160
+                (string)$this->l->t('Mon.'),
161
+                (string)$this->l->t('Tue.'),
162
+                (string)$this->l->t('Wed.'),
163
+                (string)$this->l->t('Thu.'),
164
+                (string)$this->l->t('Fri.'),
165
+                (string)$this->l->t('Sat.')
166
+            ]),
167
+            "dayNamesMin" =>  json_encode([
168
+                (string)$this->l->t('Su'),
169
+                (string)$this->l->t('Mo'),
170
+                (string)$this->l->t('Tu'),
171
+                (string)$this->l->t('We'),
172
+                (string)$this->l->t('Th'),
173
+                (string)$this->l->t('Fr'),
174
+                (string)$this->l->t('Sa')
175
+            ]),
176
+            "monthNames" => json_encode([
177
+                (string)$this->l->t('January'),
178
+                (string)$this->l->t('February'),
179
+                (string)$this->l->t('March'),
180
+                (string)$this->l->t('April'),
181
+                (string)$this->l->t('May'),
182
+                (string)$this->l->t('June'),
183
+                (string)$this->l->t('July'),
184
+                (string)$this->l->t('August'),
185
+                (string)$this->l->t('September'),
186
+                (string)$this->l->t('October'),
187
+                (string)$this->l->t('November'),
188
+                (string)$this->l->t('December')
189
+            ]),
190
+            "monthNamesShort" => json_encode([
191
+                (string)$this->l->t('Jan.'),
192
+                (string)$this->l->t('Feb.'),
193
+                (string)$this->l->t('Mar.'),
194
+                (string)$this->l->t('Apr.'),
195
+                (string)$this->l->t('May.'),
196
+                (string)$this->l->t('Jun.'),
197
+                (string)$this->l->t('Jul.'),
198
+                (string)$this->l->t('Aug.'),
199
+                (string)$this->l->t('Sep.'),
200
+                (string)$this->l->t('Oct.'),
201
+                (string)$this->l->t('Nov.'),
202
+                (string)$this->l->t('Dec.')
203
+            ]),
204
+            "firstDay" => json_encode($this->l->l('firstday', null)) ,
205
+            "oc_config" => json_encode([
206
+                'session_lifetime'	=> min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')),
207
+                'session_keepalive'	=> $this->config->getSystemValue('session_keepalive', true),
208
+                'version'			=> implode('.', \OCP\Util::getVersion()),
209
+                'versionstring'		=> \OC_Util::getVersionString(),
210
+                'enable_avatars'	=> true, // here for legacy reasons - to not crash existing code that relies on this value
211
+                'lost_password_link'=> $this->config->getSystemValue('lost_password_link', null),
212
+                'modRewriteWorking'	=> ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'),
213
+                'sharing.maxAutocompleteResults' => intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)),
214
+                'sharing.minSearchStringLength' => intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)),
215
+                'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX,
216
+            ]),
217
+            "oc_appconfig" => json_encode([
218
+                'core' => [
219
+                    'defaultExpireDateEnabled' => $defaultExpireDateEnabled,
220
+                    'defaultExpireDate' => $defaultExpireDate,
221
+                    'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
222
+                    'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
223
+                    'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault,
224
+                    'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
225
+                    'resharingAllowed' => \OCP\Share::isResharingAllowed(),
226
+                    'remoteShareAllowed' => $outgoingServer2serverShareEnabled,
227
+                    'federatedCloudShareDoc' => $this->urlGenerator->linkToDocs('user-sharing-federated'),
228
+                    'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing()
229
+                ]
230
+            ]),
231
+            "oc_defaults" => json_encode([
232
+                'entity' => $this->defaults->getEntity(),
233
+                'name' => $this->defaults->getName(),
234
+                'title' => $this->defaults->getTitle(),
235
+                'baseUrl' => $this->defaults->getBaseUrl(),
236
+                'syncClientUrl' => $this->defaults->getSyncClientUrl(),
237
+                'docBaseUrl' => $this->defaults->getDocBaseUrl(),
238
+                'docPlaceholderUrl' => $this->defaults->buildDocLinkToKey('PLACEHOLDER'),
239
+                'slogan' => $this->defaults->getSlogan(),
240
+                'logoClaim' => $this->defaults->getLogoClaim(),
241
+                'shortFooter' => $this->defaults->getShortFooter(),
242
+                'longFooter' => $this->defaults->getLongFooter(),
243
+                'folder' => \OC_Util::getTheme(),
244
+            ]),
245
+        ];
246 246
 
247
-		if ($this->currentUser !== null) {
248
-			$array['oc_userconfig'] = json_encode([
249
-				'avatar' => [
250
-					'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0),
251
-				]
252
-			]);
253
-		}
247
+        if ($this->currentUser !== null) {
248
+            $array['oc_userconfig'] = json_encode([
249
+                'avatar' => [
250
+                    'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0),
251
+                ]
252
+            ]);
253
+        }
254 254
 
255
-		// Allow hooks to modify the output values
256
-		\OC_Hook::emit('\OCP\Config', 'js', array('array' => &$array));
255
+        // Allow hooks to modify the output values
256
+        \OC_Hook::emit('\OCP\Config', 'js', array('array' => &$array));
257 257
 
258
-		$result = '';
258
+        $result = '';
259 259
 
260
-		// Echo it
261
-		foreach ($array as  $setting => $value) {
262
-			$result .= 'var '. $setting . '='. $value . ';' . PHP_EOL;
263
-		}
260
+        // Echo it
261
+        foreach ($array as  $setting => $value) {
262
+            $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL;
263
+        }
264 264
 
265
-		return $result;
266
-	}
265
+        return $result;
266
+    }
267 267
 }
Please login to merge, or discard this patch.
lib/private/Settings/Admin/Sharing.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -30,61 +30,61 @@
 block discarded – undo
30 30
 use OCP\Util;
31 31
 
32 32
 class Sharing implements ISettings {
33
-	/** @var IConfig */
34
-	private $config;
33
+    /** @var IConfig */
34
+    private $config;
35 35
 
36
-	/**
37
-	 * @param IConfig $config
38
-	 */
39
-	public function __construct(IConfig $config) {
40
-		$this->config = $config;
41
-	}
36
+    /**
37
+     * @param IConfig $config
38
+     */
39
+    public function __construct(IConfig $config) {
40
+        $this->config = $config;
41
+    }
42 42
 
43
-	/**
44
-	 * @return TemplateResponse
45
-	 */
46
-	public function getForm() {
47
-		$excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
48
-		$excludeGroupsList = !is_null(json_decode($excludedGroups))
49
-			? implode('|', json_decode($excludedGroups, true)) : '';
43
+    /**
44
+     * @return TemplateResponse
45
+     */
46
+    public function getForm() {
47
+        $excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
48
+        $excludeGroupsList = !is_null(json_decode($excludedGroups))
49
+            ? implode('|', json_decode($excludedGroups, true)) : '';
50 50
 
51
-		$parameters = [
52
-			// Built-In Sharing
53
-			'allowGroupSharing'               => $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes'),
54
-			'allowLinks'                      => $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'),
55
-			'allowPublicUpload'               => $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'),
56
-			'allowResharing'                  => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'),
57
-			'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'),
58
-			'enforceLinkPassword'             => Util::isPublicLinkPasswordRequired(),
59
-			'onlyShareWithGroupMembers'       => Share::shareWithGroupMembersOnly(),
60
-			'shareAPIEnabled'                 => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'),
61
-			'shareDefaultExpireDateSet'       => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'),
62
-			'shareExpireAfterNDays'           => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),
63
-			'shareEnforceExpireDate'          => $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'),
64
-			'shareExcludeGroups'              => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes' ? true : false,
65
-			'shareExcludedGroupsList'         => $excludeGroupsList,
66
-			'publicShareDisclaimerText'       => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null),
67
-			'enableLinkPasswordByDefault'     => $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'),
68
-		];
51
+        $parameters = [
52
+            // Built-In Sharing
53
+            'allowGroupSharing'               => $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes'),
54
+            'allowLinks'                      => $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'),
55
+            'allowPublicUpload'               => $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'),
56
+            'allowResharing'                  => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'),
57
+            'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'),
58
+            'enforceLinkPassword'             => Util::isPublicLinkPasswordRequired(),
59
+            'onlyShareWithGroupMembers'       => Share::shareWithGroupMembersOnly(),
60
+            'shareAPIEnabled'                 => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'),
61
+            'shareDefaultExpireDateSet'       => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'),
62
+            'shareExpireAfterNDays'           => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),
63
+            'shareEnforceExpireDate'          => $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'),
64
+            'shareExcludeGroups'              => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes' ? true : false,
65
+            'shareExcludedGroupsList'         => $excludeGroupsList,
66
+            'publicShareDisclaimerText'       => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null),
67
+            'enableLinkPasswordByDefault'     => $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'),
68
+        ];
69 69
 
70
-		return new TemplateResponse('settings', 'admin/sharing', $parameters, '');
71
-	}
70
+        return new TemplateResponse('settings', 'admin/sharing', $parameters, '');
71
+    }
72 72
 
73
-	/**
74
-	 * @return string the section ID, e.g. 'sharing'
75
-	 */
76
-	public function getSection() {
77
-		return 'sharing';
78
-	}
73
+    /**
74
+     * @return string the section ID, e.g. 'sharing'
75
+     */
76
+    public function getSection() {
77
+        return 'sharing';
78
+    }
79 79
 
80
-	/**
81
-	 * @return int whether the form should be rather on the top or bottom of
82
-	 * the admin section. The forms are arranged in ascending order of the
83
-	 * priority values. It is required to return a value between 0 and 100.
84
-	 *
85
-	 * E.g.: 70
86
-	 */
87
-	public function getPriority() {
88
-		return 0;
89
-	}
80
+    /**
81
+     * @return int whether the form should be rather on the top or bottom of
82
+     * the admin section. The forms are arranged in ascending order of the
83
+     * priority values. It is required to return a value between 0 and 100.
84
+     *
85
+     * E.g.: 70
86
+     */
87
+    public function getPriority() {
88
+        return 0;
89
+    }
90 90
 }
Please login to merge, or discard this patch.