Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
apps/dav/templates/exception.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2
-	/** @var array $_ */
3
-	/** @var OC_L10N $l */
2
+    /** @var array $_ */
3
+    /** @var OC_L10N $l */
4 4
 
5 5
 style('core', ['styles', 'header']);
6 6
 ?>
Please login to merge, or discard this patch.
apps/dav/appinfo/app.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,27 +29,27 @@
 block discarded – undo
29 29
 $app->registerHooks();
30 30
 
31 31
 \OC::$server->registerService('CardDAVSyncService', function() use ($app) {
32
-	return $app->getSyncService();
32
+    return $app->getSyncService();
33 33
 });
34 34
 
35 35
 $eventDispatcher = \OC::$server->getEventDispatcher();
36 36
 
37 37
 $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove',
38
-	function(GenericEvent $event) use ($app) {
39
-		/** @var \OCA\DAV\CardDAV\CardDavBackend $cardDavBackend */
40
-		$cardDavBackend = $app->getContainer()->query('CardDavBackend');
41
-		$addressBookUri = $event->getSubject();
42
-		$addressBook = $cardDavBackend->getAddressBooksByUri('principals/system/system', $addressBookUri);
43
-		if (!is_null($addressBook)) {
44
-			$cardDavBackend->deleteAddressBook($addressBook['id']);
45
-		}
46
-	}
38
+    function(GenericEvent $event) use ($app) {
39
+        /** @var \OCA\DAV\CardDAV\CardDavBackend $cardDavBackend */
40
+        $cardDavBackend = $app->getContainer()->query('CardDavBackend');
41
+        $addressBookUri = $event->getSubject();
42
+        $addressBook = $cardDavBackend->getAddressBooksByUri('principals/system/system', $addressBookUri);
43
+        if (!is_null($addressBook)) {
44
+            $cardDavBackend->deleteAddressBook($addressBook['id']);
45
+        }
46
+    }
47 47
 );
48 48
 
49 49
 $cm = \OC::$server->getContactsManager();
50 50
 $cm->register(function() use ($cm, $app) {
51
-	$user = \OC::$server->getUserSession()->getUser();
52
-	if (!is_null($user)) {
53
-		$app->setupContactsProvider($cm, $user->getUID());
54
-	}
51
+    $user = \OC::$server->getUserSession()->getUser();
52
+    if (!is_null($user)) {
53
+        $app->setupContactsProvider($cm, $user->getUID());
54
+    }
55 55
 });
Please login to merge, or discard this patch.
apps/user_ldap/ajax/testConfiguration.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 $_POST['ldap_configuration_active'] = 1;
39 39
 
40 40
 try {
41
-	if ($connection->setConfiguration($_POST)) {
42
-		//Configuration is okay
43
-		if ($connection->bind()) {
44
-			/*
41
+    if ($connection->setConfiguration($_POST)) {
42
+        //Configuration is okay
43
+        if ($connection->bind()) {
44
+            /*
45 45
 			 * This shiny if block is an ugly hack to find out whether anonymous
46 46
 			 * bind is possible on AD or not. Because AD happily and constantly
47 47
 			 * replies with success to any anonymous bind request, we need to
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 			 * exception by the LDAP wrapper. We catch this. Other cases may
51 51
 			 * pass (like e.g. expected syntax error).
52 52
 			 */
53
-			try {
54
-				$ldapWrapper->read($connection->getConnectionResource(), '', 'objectClass=*', array('dn'));
55
-			} catch (\Exception $e) {
56
-				if($e->getCode() === 1) {
57
-					OCP\JSON::error(array('message' => $l->t('The configuration is invalid: anonymous bind is not allowed.')));
58
-					exit;
59
-				}
60
-			}
61
-			OCP\JSON::success(array('message'
62
-			=> $l->t('The configuration is valid and the connection could be established!')));
63
-		} else {
64
-			OCP\JSON::error(array('message'
65
-			=> $l->t('The configuration is valid, but the Bind failed. Please check the server settings and credentials.')));
66
-		}
67
-	} else {
68
-		OCP\JSON::error(array('message'
69
-		=> $l->t('The configuration is invalid. Please have a look at the logs for further details.')));
70
-	}
53
+            try {
54
+                $ldapWrapper->read($connection->getConnectionResource(), '', 'objectClass=*', array('dn'));
55
+            } catch (\Exception $e) {
56
+                if($e->getCode() === 1) {
57
+                    OCP\JSON::error(array('message' => $l->t('The configuration is invalid: anonymous bind is not allowed.')));
58
+                    exit;
59
+                }
60
+            }
61
+            OCP\JSON::success(array('message'
62
+            => $l->t('The configuration is valid and the connection could be established!')));
63
+        } else {
64
+            OCP\JSON::error(array('message'
65
+            => $l->t('The configuration is valid, but the Bind failed. Please check the server settings and credentials.')));
66
+        }
67
+    } else {
68
+        OCP\JSON::error(array('message'
69
+        => $l->t('The configuration is invalid. Please have a look at the logs for further details.')));
70
+    }
71 71
 } catch (\Exception $e) {
72
-	OCP\JSON::error(array('message' => $e->getMessage()));
72
+    OCP\JSON::error(array('message' => $e->getMessage()));
73 73
 }
Please login to merge, or discard this patch.
apps/user_ldap/appinfo/routes.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@
 block discarded – undo
23 23
 
24 24
 /** @var $this \OCP\Route\IRouter */
25 25
 $this->create('user_ldap_ajax_clearMappings', 'ajax/clearMappings.php')
26
-	->actionInclude('user_ldap/ajax/clearMappings.php');
26
+    ->actionInclude('user_ldap/ajax/clearMappings.php');
27 27
 $this->create('user_ldap_ajax_deleteConfiguration', 'ajax/deleteConfiguration.php')
28
-	->actionInclude('user_ldap/ajax/deleteConfiguration.php');
28
+    ->actionInclude('user_ldap/ajax/deleteConfiguration.php');
29 29
 $this->create('user_ldap_ajax_getConfiguration', 'ajax/getConfiguration.php')
30
-	->actionInclude('user_ldap/ajax/getConfiguration.php');
30
+    ->actionInclude('user_ldap/ajax/getConfiguration.php');
31 31
 $this->create('user_ldap_ajax_getNewServerConfigPrefix', 'ajax/getNewServerConfigPrefix.php')
32
-	->actionInclude('user_ldap/ajax/getNewServerConfigPrefix.php');
32
+    ->actionInclude('user_ldap/ajax/getNewServerConfigPrefix.php');
33 33
 $this->create('user_ldap_ajax_setConfiguration', 'ajax/setConfiguration.php')
34
-	->actionInclude('user_ldap/ajax/setConfiguration.php');
34
+    ->actionInclude('user_ldap/ajax/setConfiguration.php');
35 35
 $this->create('user_ldap_ajax_testConfiguration', 'ajax/testConfiguration.php')
36
-	->actionInclude('user_ldap/ajax/testConfiguration.php');
36
+    ->actionInclude('user_ldap/ajax/testConfiguration.php');
37 37
 $this->create('user_ldap_ajax_wizard', 'ajax/wizard.php')
38
-	->actionInclude('user_ldap/ajax/wizard.php');
38
+    ->actionInclude('user_ldap/ajax/wizard.php');
Please login to merge, or discard this patch.
apps/federation/appinfo/routes.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,26 +23,26 @@
 block discarded – undo
23 23
 $application = new \OCA\Federation\AppInfo\Application();
24 24
 
25 25
 $application->registerRoutes(
26
-	$this,
27
-	[
28
-		'routes' => [
29
-			[
30
-				'name' => 'Settings#addServer',
31
-				'url' => '/trusted-servers',
32
-				'verb' => 'POST'
33
-			],
34
-			[
35
-				'name' => 'Settings#removeServer',
36
-				'url' => '/trusted-servers/{id}',
37
-				'verb' => 'DELETE'
38
-			],
39
-			[
40
-				'name' => 'Settings#autoAddServers',
41
-				'url' => '/auto-add-servers',
42
-				'verb' => 'POST'
43
-			],
44
-		]
45
-	]
26
+    $this,
27
+    [
28
+        'routes' => [
29
+            [
30
+                'name' => 'Settings#addServer',
31
+                'url' => '/trusted-servers',
32
+                'verb' => 'POST'
33
+            ],
34
+            [
35
+                'name' => 'Settings#removeServer',
36
+                'url' => '/trusted-servers/{id}',
37
+                'verb' => 'DELETE'
38
+            ],
39
+            [
40
+                'name' => 'Settings#autoAddServers',
41
+                'url' => '/auto-add-servers',
42
+                'verb' => 'POST'
43
+            ],
44
+        ]
45
+    ]
46 46
 );
47 47
 
48 48
 $application->registerOCSApi();
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/trashbin.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@
 block discarded – undo
30 30
 
31 31
 class Trashbin extends Action {
32 32
 
33
-	public function delete($params) {
34
-		$this->log('File "%s" deleted from trash bin.',
35
-			['path' => $params['path']], ['path']
36
-		);
37
-	}
38
-
39
-	public function restore($params) {
40
-		$this->log('File "%s" restored from trash bin.',
41
-			['path' => $params['filePath']], ['path']
42
-		);
43
-	}
33
+    public function delete($params) {
34
+        $this->log('File "%s" deleted from trash bin.',
35
+            ['path' => $params['path']], ['path']
36
+        );
37
+    }
38
+
39
+    public function restore($params) {
40
+        $this->log('File "%s" restored from trash bin.',
41
+            ['path' => $params['filePath']], ['path']
42
+        );
43
+    }
44 44
 
45 45
 }
Please login to merge, or discard this patch.
apps/files/ajax/list.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -32,73 +32,73 @@
 block discarded – undo
32 32
 $dir = \OC\Files\Filesystem::normalizePath($dir);
33 33
 
34 34
 try {
35
-	$dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
36
-	if (!$dirInfo || !$dirInfo->getType() === 'dir') {
37
-		header("HTTP/1.0 404 Not Found");
38
-		exit();
39
-	}
35
+    $dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
36
+    if (!$dirInfo || !$dirInfo->getType() === 'dir') {
37
+        header("HTTP/1.0 404 Not Found");
38
+        exit();
39
+    }
40 40
 
41
-	$data = array();
42
-	$baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir=';
41
+    $data = array();
42
+    $baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir=';
43 43
 
44
-	$permissions = $dirInfo->getPermissions();
44
+    $permissions = $dirInfo->getPermissions();
45 45
 
46
-	$sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name';
47
-	$sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false;
48
-	$mimetypeFilters = isset($_GET['mimetypes']) ? json_decode($_GET['mimetypes']) : '';
46
+    $sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name';
47
+    $sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false;
48
+    $mimetypeFilters = isset($_GET['mimetypes']) ? json_decode($_GET['mimetypes']) : '';
49 49
 
50
-	$files = [];
51
-	// Clean up duplicates from array
52
-	if (is_array($mimetypeFilters) && count($mimetypeFilters)) {
53
-		$mimetypeFilters = array_unique($mimetypeFilters);
50
+    $files = [];
51
+    // Clean up duplicates from array
52
+    if (is_array($mimetypeFilters) && count($mimetypeFilters)) {
53
+        $mimetypeFilters = array_unique($mimetypeFilters);
54 54
 
55
-		if (!in_array('httpd/unix-directory', $mimetypeFilters)) {
56
-			// append folder filter to be able to browse folders
57
-			$mimetypeFilters[] = 'httpd/unix-directory';
58
-		}
55
+        if (!in_array('httpd/unix-directory', $mimetypeFilters)) {
56
+            // append folder filter to be able to browse folders
57
+            $mimetypeFilters[] = 'httpd/unix-directory';
58
+        }
59 59
 
60
-		// create filelist with mimetype filter - as getFiles only supports on
61
-		// mimetype filter at once we will filter this folder for each
62
-		// mimetypeFilter
63
-		foreach ($mimetypeFilters as $mimetypeFilter) {
64
-			$files = array_merge($files, \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection, $mimetypeFilter));
65
-		}
60
+        // create filelist with mimetype filter - as getFiles only supports on
61
+        // mimetype filter at once we will filter this folder for each
62
+        // mimetypeFilter
63
+        foreach ($mimetypeFilters as $mimetypeFilter) {
64
+            $files = array_merge($files, \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection, $mimetypeFilter));
65
+        }
66 66
 
67
-		// sort the files accordingly
68
-		$files = \OCA\Files\Helper::sortFiles($files, $sortAttribute, $sortDirection);
69
-	} else {
70
-		// create file list without mimetype filter
71
-		$files = \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection);
72
-	}
67
+        // sort the files accordingly
68
+        $files = \OCA\Files\Helper::sortFiles($files, $sortAttribute, $sortDirection);
69
+    } else {
70
+        // create file list without mimetype filter
71
+        $files = \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection);
72
+    }
73 73
 
74
-	$files = \OCA\Files\Helper::populateTags($files);
75
-	$data['directory'] = $dir;
76
-	$data['files'] = \OCA\Files\Helper::formatFileInfos($files);
77
-	$data['permissions'] = $permissions;
74
+    $files = \OCA\Files\Helper::populateTags($files);
75
+    $data['directory'] = $dir;
76
+    $data['files'] = \OCA\Files\Helper::formatFileInfos($files);
77
+    $data['permissions'] = $permissions;
78 78
 
79
-	OCP\JSON::success(array('data' => $data));
79
+    OCP\JSON::success(array('data' => $data));
80 80
 } catch (\OCP\Files\StorageNotAvailableException $e) {
81
-	\OCP\Util::logException('files', $e);
82
-	OCP\JSON::error(array(
83
-		'data' => array(
84
-			'exception' => '\OCP\Files\StorageNotAvailableException',
85
-			'message' => $l->t('Storage not available')
86
-		)
87
-	));
81
+    \OCP\Util::logException('files', $e);
82
+    OCP\JSON::error(array(
83
+        'data' => array(
84
+            'exception' => '\OCP\Files\StorageNotAvailableException',
85
+            'message' => $l->t('Storage not available')
86
+        )
87
+    ));
88 88
 } catch (\OCP\Files\StorageInvalidException $e) {
89
-	\OCP\Util::logException('files', $e);
90
-	OCP\JSON::error(array(
91
-		'data' => array(
92
-			'exception' => '\OCP\Files\StorageInvalidException',
93
-			'message' => $l->t('Storage invalid')
94
-		)
95
-	));
89
+    \OCP\Util::logException('files', $e);
90
+    OCP\JSON::error(array(
91
+        'data' => array(
92
+            'exception' => '\OCP\Files\StorageInvalidException',
93
+            'message' => $l->t('Storage invalid')
94
+        )
95
+    ));
96 96
 } catch (\Exception $e) {
97
-	\OCP\Util::logException('files', $e);
98
-	OCP\JSON::error(array(
99
-		'data' => array(
100
-			'exception' => '\Exception',
101
-			'message' => $l->t('Unknown error')
102
-		)
103
-	));
97
+    \OCP\Util::logException('files', $e);
98
+    OCP\JSON::error(array(
99
+        'data' => array(
100
+            'exception' => '\Exception',
101
+            'message' => $l->t('Unknown error')
102
+        )
103
+    ));
104 104
 }
Please login to merge, or discard this patch.
apps/encryption/templates/settings-personal.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	/** @var array $_ */
3
-	/** @var OC_L10N $l */
2
+    /** @var array $_ */
3
+    /** @var OC_L10N $l */
4 4
 script('encryption', 'settings-personal');
5 5
 script('core', 'multiselect');
6 6
 ?>
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 			<br />
21 21
 			<?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
22 22
 			<?php if (  $_["recoveryEnabledForUser"] ):
23
-					p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
24
-			endif; ?>
23
+                    p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
24
+            endif; ?>
25 25
 			<br />
26 26
 			<input
27 27
 				type="password"
Please login to merge, or discard this patch.
apps/files_versions/ajax/preview.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 \OC_Util::checkLoggedIn();
27 27
 
28 28
 if(!\OC_App::isEnabled('files_versions')){
29
-	exit;
29
+    exit;
30 30
 }
31 31
 
32 32
 $file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
@@ -36,31 +36,31 @@  discard block
 block discarded – undo
36 36
 $scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
37 37
 
38 38
 if($file === '' && $version === '') {
39
-	\OC_Response::setStatus(400); //400 Bad Request
40
-	\OCP\Util::writeLog('versions-preview', 'No file parameter was passed', \OCP\Util::DEBUG);
41
-	exit;
39
+    \OC_Response::setStatus(400); //400 Bad Request
40
+    \OCP\Util::writeLog('versions-preview', 'No file parameter was passed', \OCP\Util::DEBUG);
41
+    exit;
42 42
 }
43 43
 
44 44
 if($maxX === 0 || $maxY === 0) {
45
-	\OC_Response::setStatus(400); //400 Bad Request
46
-	\OCP\Util::writeLog('versions-preview', 'x and/or y set to 0', \OCP\Util::DEBUG);
47
-	exit;
45
+    \OC_Response::setStatus(400); //400 Bad Request
46
+    \OCP\Util::writeLog('versions-preview', 'x and/or y set to 0', \OCP\Util::DEBUG);
47
+    exit;
48 48
 }
49 49
 
50 50
 try {
51
-	list($user, $file) = \OCA\Files_Versions\Storage::getUidAndFilename($file);
52
-	$preview = new \OC\Preview($user, 'files_versions', $file.'.v'.$version);
53
-	$mimetype = \OC::$server->getMimeTypeDetector()->detectPath($file);
54
-	$preview->setMimetype($mimetype);
55
-	$preview->setMaxX($maxX);
56
-	$preview->setMaxY($maxY);
57
-	$preview->setScalingUp($scalingUp);
51
+    list($user, $file) = \OCA\Files_Versions\Storage::getUidAndFilename($file);
52
+    $preview = new \OC\Preview($user, 'files_versions', $file.'.v'.$version);
53
+    $mimetype = \OC::$server->getMimeTypeDetector()->detectPath($file);
54
+    $preview->setMimetype($mimetype);
55
+    $preview->setMaxX($maxX);
56
+    $preview->setMaxY($maxY);
57
+    $preview->setScalingUp($scalingUp);
58 58
 
59
-	$preview->showPreview();
59
+    $preview->showPreview();
60 60
 } catch (\OCP\Files\NotFoundException $e) {
61
-	\OC_Response::setStatus(404);
62
-	\OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
61
+    \OC_Response::setStatus(404);
62
+    \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
63 63
 } catch (\Exception $e) {
64
-	\OC_Response::setStatus(500);
65
-	\OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
64
+    \OC_Response::setStatus(500);
65
+    \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
66 66
 }
Please login to merge, or discard this patch.