Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
apps/files_trashbin/ajax/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 \OC::$server->getSession()->close();
26 26
 
27 27
 // Load the files
28
-$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
29
-$sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name';
28
+$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : '';
29
+$sortAttribute = isset($_GET['sort']) ? (string) $_GET['sort'] : 'name';
30 30
 $sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false;
31 31
 $data = array();
32 32
 
Please login to merge, or discard this patch.
apps/files_trashbin/ajax/delete.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $folder = isset($_POST['dir']) ? $_POST['dir'] : '/';
32 32
 
33 33
 // "empty trash" command
34
-if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true'){
34
+if (isset($_POST['allfiles']) && (string) $_POST['allfiles'] === 'true') {
35 35
 	$deleteAll = true;
36 36
 	if ($folder === '/' || $folder === '') {
37 37
 		OCA\Files_Trashbin\Trashbin::deleteAll();
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 }
44 44
 else {
45 45
 	$deleteAll = false;
46
-	$files = (string)$_POST['files'];
46
+	$files = (string) $_POST['files'];
47 47
 	$list = json_decode($files);
48 48
 }
49 49
 
50
-$folder = rtrim($folder, '/') . '/';
50
+$folder = rtrim($folder, '/').'/';
51 51
 $error = array();
52 52
 $success = array();
53 53
 
@@ -57,16 +57,16 @@  discard block
 block discarded – undo
57 57
 		$file = ltrim($file, '/');
58 58
 		$delimiter = strrpos($file, '.d');
59 59
 		$filename = substr($file, 0, $delimiter);
60
-		$timestamp =  substr($file, $delimiter+2);
60
+		$timestamp = substr($file, $delimiter + 2);
61 61
 	} else {
62
-		$filename = $folder . '/' . $file;
62
+		$filename = $folder.'/'.$file;
63 63
 		$timestamp = null;
64 64
 	}
65 65
 
66 66
 	OCA\Files_Trashbin\Trashbin::delete($filename, \OCP\User::getUser(), $timestamp);
67 67
 	if (OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) {
68 68
 		$error[] = $filename;
69
-		\OCP\Util::writeLog('trashbin','can\'t delete ' . $filename . ' permanently.', \OCP\Util::ERROR);
69
+		\OCP\Util::writeLog('trashbin', 'can\'t delete '.$filename.' permanently.', \OCP\Util::ERROR);
70 70
 	}
71 71
 	// only list deleted files if not deleting everything
72 72
 	else if (!$deleteAll) {
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 }
78 78
 
79
-if ( $error ) {
79
+if ($error) {
80 80
 	$filelist = '';
81
-	foreach ( $error as $e ) {
81
+	foreach ($error as $e) {
82 82
 		$filelist .= $e.', ';
83 83
 	}
84 84
 	$l = \OC::$server->getL10N('files_trashbin');
Please login to merge, or discard this patch.
apps/files_trashbin/appinfo/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	$newObligation = 'auto';
32 32
 	if ($isExpirationEnabled) {
33 33
 		if (!is_null($oldObligation)) {
34
-			$newObligation = strval($oldObligation) . ', auto';
34
+			$newObligation = strval($oldObligation).', auto';
35 35
 		}
36 36
 	} else {
37 37
 		$newObligation = 'disabled';
Please login to merge, or discard this patch.
apps/admin_audit/lib/auditlogger.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
 	private function userManagementHooks() {
84 84
 		$userActions = new UserManagement($this->logger);
85 85
 
86
-		Util::connectHook('OC_User', 'post_createUser',	$userActions, 'create');
87
-		Util::connectHook('OC_User', 'post_deleteUser',	$userActions, 'delete');
86
+		Util::connectHook('OC_User', 'post_createUser', $userActions, 'create');
87
+		Util::connectHook('OC_User', 'post_deleteUser', $userActions, 'delete');
88 88
 		$this->userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']);
89 89
 	}
90 90
 	
91
-	private function groupHooks()  {
91
+	private function groupHooks() {
92 92
 		$groupActions = new GroupManagement($this->logger);
93
-		$this->groupManager->listen('\OC\Group', 'postRemoveUser',  [$groupActions, 'removeUser']);
94
-		$this->groupManager->listen('\OC\Group', 'postAddUser',  [$groupActions, 'addUser']);
93
+		$this->groupManager->listen('\OC\Group', 'postRemoveUser', [$groupActions, 'removeUser']);
94
+		$this->groupManager->listen('\OC\Group', 'postAddUser', [$groupActions, 'addUser']);
95 95
 	}
96 96
 
97 97
 	/**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	public function versionsHooks() {
174 174
 		$versionsActions = new Versions($this->logger);
175 175
 		Util::connectHook('\OCP\Versions', 'rollback', $versionsActions, 'rollback');
176
-		Util::connectHook('\OCP\Versions', 'delete',$versionsActions, 'delete');
176
+		Util::connectHook('\OCP\Versions', 'delete', $versionsActions, 'delete');
177 177
 	}
178 178
 
179 179
 	/**
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/usermanagement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	 * @param IUser $user
67 67
 	 */
68 68
 	public function setPassword(IUser $user) {
69
-		if($user->getBackendClassName() === 'Database') {
69
+		if ($user->getBackendClassName() === 'Database') {
70 70
 			$this->log(
71 71
 				'Password of user "%s" has been changed',
72 72
 				[
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/sharing.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param array $params
36 36
 	 */
37 37
 	public function shared(array $params) {
38
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
38
+		if ($params['shareType'] === Share::SHARE_TYPE_LINK) {
39 39
 			$this->log(
40 40
 				'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
41 41
 				$params,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 					'id',
48 48
 				]
49 49
 			);
50
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
50
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_USER) {
51 51
 			$this->log(
52 52
 				'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s"  (Share ID: %s)',
53 53
 				$params,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 					'id',
61 61
 				]
62 62
 			);
63
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
63
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) {
64 64
 			$this->log(
65 65
 				'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s"  (Share ID: %s)',
66 66
 				$params,
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @param array $params
83 83
 	 */
84 84
 	public function unshare(array $params) {
85
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
85
+		if ($params['shareType'] === Share::SHARE_TYPE_LINK) {
86 86
 			$this->log(
87 87
 				'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
88 88
 				$params,
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 					'id',
94 94
 				]
95 95
 			);
96
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
96
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_USER) {
97 97
 			$this->log(
98 98
 				'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
99 99
 				$params,
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 					'id',
106 106
 				]
107 107
 			);
108
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
108
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) {
109 109
 			$this->log(
110 110
 				'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
111 111
 				$params,
Please login to merge, or discard this patch.
apps/files_versions/ajax/getVersions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 OCP\JSON::callCheck();
29 29
 OCP\JSON::checkAppEnabled('files_versions');
30 30
 
31
-$source = (string)$_GET['source'];
32
-$start = (int)$_GET['start'];
31
+$source = (string) $_GET['source'];
32
+$start = (int) $_GET['start'];
33 33
 list ($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($source);
34 34
 $count = 5; //show the newest revisions
35 35
 $versions = OCA\Files_Versions\Storage::getVersions($uid, $filename, $source);
36
-if( $versions ) {
36
+if ($versions) {
37 37
 
38 38
 	$endReached = false;
39
-	if (count($versions) <= $start+$count) {
39
+	if (count($versions) <= $start + $count) {
40 40
 		$endReached = true;
41 41
 	}
42 42
 
Please login to merge, or discard this patch.
apps/files_versions/ajax/rollbackVersion.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
 OCP\JSON::checkAppEnabled('files_versions');
31 31
 OCP\JSON::callCheck();
32 32
 
33
-$file = (string)$_GET['file'];
34
-$revision=(int)$_GET['revision'];
33
+$file = (string) $_GET['file'];
34
+$revision = (int) $_GET['revision'];
35 35
 
36
-if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
37
-	OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
38
-}else{
36
+if (OCA\Files_Versions\Storage::rollback($file, $revision)) {
37
+	OCP\JSON::success(array("data" => array("revision" => $revision, "file" => $file)));
38
+} else {
39 39
 	$l = \OC::$server->getL10N('files_versions');
40
-	OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) ))));
40
+	OCP\JSON::error(array("data" => array("message" => $l->t("Could not revert: %s", array($file)))));
41 41
 }
Please login to merge, or discard this patch.
ocs/providers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 
26
-require_once __DIR__ . '/../lib/base.php';
26
+require_once __DIR__.'/../lib/base.php';
27 27
 
28 28
 header('Content-type: application/xml');
29 29
 
30 30
 $request = \OC::$server->getRequest();
31 31
 
32
-$url = $request->getServerProtocol() . '://' . substr($request->getServerHost() . $request->getRequestUri(), 0, -17).'ocs/v1.php/';
32
+$url = $request->getServerProtocol().'://'.substr($request->getServerHost().$request->getRequestUri(), 0, -17).'ocs/v1.php/';
33 33
 
34 34
 $writer = new XMLWriter();
35 35
 $writer->openURI('php://output');
36
-$writer->startDocument('1.0','UTF-8');
36
+$writer->startDocument('1.0', 'UTF-8');
37 37
 $writer->setIndent(4);
38 38
 $writer->startElement('providers');
39 39
 $writer->startElement('provider');
Please login to merge, or discard this patch.