Completed
Pull Request — master (#3838)
by Vars
12:18
created
apps/admin_audit/lib/actions/usermanagement.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -30,52 +30,52 @@
 block discarded – undo
30 30
  * @package OCA\Admin_Audit\Actions
31 31
  */
32 32
 class UserManagement extends Action {
33
-	/**
34
-	 * Log creation of users
35
-	 *
36
-	 * @param array $params
37
-	 */
38
-	public function create(array $params) {
39
-		$this->log(
40
-			'User created: "%s"',
41
-			$params,
42
-			[
43
-				'uid',
44
-			]
45
-		);
46
-	}
33
+    /**
34
+     * Log creation of users
35
+     *
36
+     * @param array $params
37
+     */
38
+    public function create(array $params) {
39
+        $this->log(
40
+            'User created: "%s"',
41
+            $params,
42
+            [
43
+                'uid',
44
+            ]
45
+        );
46
+    }
47 47
 
48
-	/**
49
-	 * Log deletion of users
50
-	 *
51
-	 * @param array $params
52
-	 */
53
-	public function delete(array $params) {
54
-		$this->log(
55
-			'User deleted: "%s"',
56
-			$params,
57
-			[
58
-				'uid',
59
-			]
60
-		);
61
-	}
48
+    /**
49
+     * Log deletion of users
50
+     *
51
+     * @param array $params
52
+     */
53
+    public function delete(array $params) {
54
+        $this->log(
55
+            'User deleted: "%s"',
56
+            $params,
57
+            [
58
+                'uid',
59
+            ]
60
+        );
61
+    }
62 62
 
63
-	/**
64
-	 * Logs changing of the user scope
65
-	 *
66
-	 * @param IUser $user
67
-	 */
68
-	public function setPassword(IUser $user) {
69
-		if($user->getBackendClassName() === 'Database') {
70
-			$this->log(
71
-				'Password of user "%s" has been changed',
72
-				[
73
-					'user' => $user->getUID(),
74
-				],
75
-				[
76
-					'user',
77
-				]
78
-			);
79
-		}
80
-	}
63
+    /**
64
+     * Logs changing of the user scope
65
+     *
66
+     * @param IUser $user
67
+     */
68
+    public function setPassword(IUser $user) {
69
+        if($user->getBackendClassName() === 'Database') {
70
+            $this->log(
71
+                'Password of user "%s" has been changed',
72
+                [
73
+                    'user' => $user->getUID(),
74
+                ],
75
+                [
76
+                    'user',
77
+                ]
78
+            );
79
+        }
80
+    }
81 81
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/action.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -25,64 +25,64 @@
 block discarded – undo
25 25
 use OCP\ILogger;
26 26
 
27 27
 class Action {
28
-	/** @var ILogger */
29
-	private $logger;
28
+    /** @var ILogger */
29
+    private $logger;
30 30
 
31
-	/**
32
-	 * @param ILogger $logger
33
-	 */
34
-	public function __construct(ILogger $logger) {
35
-		$this->logger = $logger;
36
-	}
31
+    /**
32
+     * @param ILogger $logger
33
+     */
34
+    public function __construct(ILogger $logger) {
35
+        $this->logger = $logger;
36
+    }
37 37
 
38
-	/**
39
-	 * Log a single action with a log level of info
40
-	 *
41
-	 * @param string $text
42
-	 * @param array $params
43
-	 * @param array $elements
44
-	 * @param bool $obfuscateParameters
45
-	 */
46
-	public function log($text,
47
-						array $params,
48
-						array $elements,
49
-						$obfuscateParameters = false) {
50
-		foreach($elements as $element) {
51
-			if(!isset($params[$element])) {
52
-				if ($obfuscateParameters) {
53
-					$this->logger->critical(
54
-						'$params["'.$element.'"] was missing.',
55
-						['app' => 'admin_audit']
56
-					);
57
-				} else {
58
-					$this->logger->critical(
59
-						sprintf(
60
-							'$params["'.$element.'"] was missing. Transferred value: %s',
61
-							print_r($params, true)
62
-						),
63
-						['app' => 'admin_audit']
64
-					);
65
-				}
66
-				return;
67
-			}
68
-		}
38
+    /**
39
+     * Log a single action with a log level of info
40
+     *
41
+     * @param string $text
42
+     * @param array $params
43
+     * @param array $elements
44
+     * @param bool $obfuscateParameters
45
+     */
46
+    public function log($text,
47
+                        array $params,
48
+                        array $elements,
49
+                        $obfuscateParameters = false) {
50
+        foreach($elements as $element) {
51
+            if(!isset($params[$element])) {
52
+                if ($obfuscateParameters) {
53
+                    $this->logger->critical(
54
+                        '$params["'.$element.'"] was missing.',
55
+                        ['app' => 'admin_audit']
56
+                    );
57
+                } else {
58
+                    $this->logger->critical(
59
+                        sprintf(
60
+                            '$params["'.$element.'"] was missing. Transferred value: %s',
61
+                            print_r($params, true)
62
+                        ),
63
+                        ['app' => 'admin_audit']
64
+                    );
65
+                }
66
+                return;
67
+            }
68
+        }
69 69
 
70
-		$replaceArray = [];
71
-		foreach($elements as $element) {
72
-			if($params[$element] instanceof \DateTime) {
73
-				$params[$element] = $params[$element]->format('Y-m-d H:i:s');
74
-			}
75
-			$replaceArray[] = $params[$element];
76
-		}
70
+        $replaceArray = [];
71
+        foreach($elements as $element) {
72
+            if($params[$element] instanceof \DateTime) {
73
+                $params[$element] = $params[$element]->format('Y-m-d H:i:s');
74
+            }
75
+            $replaceArray[] = $params[$element];
76
+        }
77 77
 
78
-		$this->logger->info(
79
-			vsprintf(
80
-				$text,
81
-				$replaceArray
82
-			),
83
-			[
84
-				'app' => 'admin_audit'
85
-			]
86
-		);
87
-	}
78
+        $this->logger->info(
79
+            vsprintf(
80
+                $text,
81
+                $replaceArray
82
+            ),
83
+            [
84
+                'app' => 'admin_audit'
85
+            ]
86
+        );
87
+    }
88 88
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/files.php 1 patch
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -28,110 +28,110 @@
 block discarded – undo
28 28
  * @package OCA\Admin_Audit\Actions
29 29
  */
30 30
 class Files extends Action {
31
-	/**
32
-	 * Logs file read actions
33
-	 *
34
-	 * @param array $params
35
-	 */
36
-	public function read(array $params) {
37
-		$this->log(
38
-			'File accessed: "%s"',
39
-			$params,
40
-			[
41
-				'path',
42
-			]
43
-		);
44
-	}
31
+    /**
32
+     * Logs file read actions
33
+     *
34
+     * @param array $params
35
+     */
36
+    public function read(array $params) {
37
+        $this->log(
38
+            'File accessed: "%s"',
39
+            $params,
40
+            [
41
+                'path',
42
+            ]
43
+        );
44
+    }
45 45
 
46
-	/**
47
-	 * Logs rename actions of files
48
-	 *
49
-	 * @param array $params
50
-	 */
51
-	public function rename(array $params) {
52
-		$this->log(
53
-			'File renamed: "%s" to "%s"',
54
-			$params,
55
-			[
56
-				'oldpath',
57
-				'newpath',
58
-			]
59
-		);
60
-	}
46
+    /**
47
+     * Logs rename actions of files
48
+     *
49
+     * @param array $params
50
+     */
51
+    public function rename(array $params) {
52
+        $this->log(
53
+            'File renamed: "%s" to "%s"',
54
+            $params,
55
+            [
56
+                'oldpath',
57
+                'newpath',
58
+            ]
59
+        );
60
+    }
61 61
 
62
-	/**
63
-	 * Logs creation of files
64
-	 *
65
-	 * @param array $params
66
-	 */
67
-	public function create(array $params) {
68
-		$this->log(
69
-			'File created: "%s"',
70
-			$params,
71
-			[
72
-				'path',
73
-			]
74
-		);
75
-	}
62
+    /**
63
+     * Logs creation of files
64
+     *
65
+     * @param array $params
66
+     */
67
+    public function create(array $params) {
68
+        $this->log(
69
+            'File created: "%s"',
70
+            $params,
71
+            [
72
+                'path',
73
+            ]
74
+        );
75
+    }
76 76
 
77
-	/**
78
-	 * Logs copying of files
79
-	 *
80
-	 * @param array $params
81
-	 */
82
-	public function copy(array $params) {
83
-		$this->log(
84
-			'File copied: "%s" to "%s"',
85
-			$params,
86
-			[
87
-				'oldpath',
88
-				'newpath',
89
-			]
90
-		);
91
-	}
77
+    /**
78
+     * Logs copying of files
79
+     *
80
+     * @param array $params
81
+     */
82
+    public function copy(array $params) {
83
+        $this->log(
84
+            'File copied: "%s" to "%s"',
85
+            $params,
86
+            [
87
+                'oldpath',
88
+                'newpath',
89
+            ]
90
+        );
91
+    }
92 92
 
93
-	/**
94
-	 * Logs writing of files
95
-	 *
96
-	 * @param array $params
97
-	 */
98
-	public function write(array $params) {
99
-		$this->log(
100
-			'File written to: "%s"',
101
-			$params,
102
-			[
103
-				'path',
104
-			]
105
-		);
106
-	}
93
+    /**
94
+     * Logs writing of files
95
+     *
96
+     * @param array $params
97
+     */
98
+    public function write(array $params) {
99
+        $this->log(
100
+            'File written to: "%s"',
101
+            $params,
102
+            [
103
+                'path',
104
+            ]
105
+        );
106
+    }
107 107
 
108
-	/**
109
-	 * Logs update of files
110
-	 *
111
-	 * @param array $params
112
-	 */
113
-	public function update(array $params) {
114
-		$this->log(
115
-			'File updated: "%s"',
116
-			$params,
117
-			[
118
-				'path',
119
-			]
120
-		);
121
-	}
108
+    /**
109
+     * Logs update of files
110
+     *
111
+     * @param array $params
112
+     */
113
+    public function update(array $params) {
114
+        $this->log(
115
+            'File updated: "%s"',
116
+            $params,
117
+            [
118
+                'path',
119
+            ]
120
+        );
121
+    }
122 122
 
123
-	/**
124
-	 * Logs deletions of files
125
-	 *
126
-	 * @param array $params
127
-	 */
128
-	public function delete(array $params) {
129
-		$this->log(
130
-			'File deleted: "%s"',
131
-			$params,
132
-			[
133
-				'path',
134
-			]
135
-		);
136
-	}
123
+    /**
124
+     * Logs deletions of files
125
+     *
126
+     * @param array $params
127
+     */
128
+    public function delete(array $params) {
129
+        $this->log(
130
+            'File deleted: "%s"',
131
+            $params,
132
+            [
133
+                'path',
134
+            ]
135
+        );
136
+    }
137 137
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/auth.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -28,33 +28,33 @@
 block discarded – undo
28 28
  * @package OCA\Admin_Audit\Actions
29 29
  */
30 30
 class Auth extends Action {
31
-	public function loginAttempt(array $params) {
32
-		$this->log(
33
-			'Login attempt: "%s"',
34
-			$params,
35
-			[
36
-				'uid',
37
-			],
38
-			true
39
-		);
40
-	}
31
+    public function loginAttempt(array $params) {
32
+        $this->log(
33
+            'Login attempt: "%s"',
34
+            $params,
35
+            [
36
+                'uid',
37
+            ],
38
+            true
39
+        );
40
+    }
41 41
 
42
-	public function loginSuccessful(array $params) {
43
-		$this->log(
44
-			'Login successful: "%s"',
45
-			$params,
46
-			[
47
-				'uid',
48
-			],
49
-			true
50
-		);
51
-	}
42
+    public function loginSuccessful(array $params) {
43
+        $this->log(
44
+            'Login successful: "%s"',
45
+            $params,
46
+            [
47
+                'uid',
48
+            ],
49
+            true
50
+        );
51
+    }
52 52
 
53
-	public function logout(array $params) {
54
-		$this->log(
55
-			'Logout occurred',
56
-			[],
57
-			[]
58
-		);
59
-	}
53
+    public function logout(array $params) {
54
+        $this->log(
55
+            'Logout occurred',
56
+            [],
57
+            []
58
+        );
59
+    }
60 60
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/versions.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@
 block discarded – undo
27 27
 
28 28
 class Versions extends Action {
29 29
 
30
-	public function rollback($params) {
31
-		$this->log('Version "%s" of "%s" was restored.',
32
-			[
33
-				'version' => $params['revision'],
34
-				'path' => $params['path']
35
-			],
36
-			['version', 'path']
37
-		);
38
-	}
30
+    public function rollback($params) {
31
+        $this->log('Version "%s" of "%s" was restored.',
32
+            [
33
+                'version' => $params['revision'],
34
+                'path' => $params['path']
35
+            ],
36
+            ['version', 'path']
37
+        );
38
+    }
39 39
 
40
-	public function delete($params) {
41
-		$this->log('Version "%s" was deleted.',
42
-			['path' => $params['path']],
43
-			['path']
44
-		);
45
-	}
40
+    public function delete($params) {
41
+        $this->log('Version "%s" was deleted.',
42
+            ['path' => $params['path']],
43
+            ['path']
44
+        );
45
+    }
46 46
 
47 47
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/sharing.php 1 patch
Indentation   +154 added lines, -154 removed lines patch added patch discarded remove patch
@@ -29,163 +29,163 @@
 block discarded – undo
29 29
  * @package OCA\Admin_Audit\Actions
30 30
  */
31 31
 class Sharing extends Action {
32
-	/**
33
-	 * Logs sharing of data
34
-	 *
35
-	 * @param array $params
36
-	 */
37
-	public function shared(array $params) {
38
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
39
-			$this->log(
40
-				'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
41
-				$params,
42
-				[
43
-					'itemType',
44
-					'itemTarget',
45
-					'itemSource',
46
-					'permissions',
47
-					'id',
48
-				]
49
-			);
50
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
51
-			$this->log(
52
-				'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s"  (Share ID: %s)',
53
-				$params,
54
-				[
55
-					'itemType',
56
-					'itemTarget',
57
-					'itemSource',
58
-					'shareWith',
59
-					'permissions',
60
-					'id',
61
-				]
62
-			);
63
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
64
-			$this->log(
65
-				'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s"  (Share ID: %s)',
66
-				$params,
67
-				[
68
-					'itemType',
69
-					'itemTarget',
70
-					'itemSource',
71
-					'shareWith',
72
-					'permissions',
73
-					'id',
74
-				]
75
-			);
76
-		}
77
-	}
32
+    /**
33
+     * Logs sharing of data
34
+     *
35
+     * @param array $params
36
+     */
37
+    public function shared(array $params) {
38
+        if($params['shareType'] === Share::SHARE_TYPE_LINK) {
39
+            $this->log(
40
+                'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
41
+                $params,
42
+                [
43
+                    'itemType',
44
+                    'itemTarget',
45
+                    'itemSource',
46
+                    'permissions',
47
+                    'id',
48
+                ]
49
+            );
50
+        } elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
51
+            $this->log(
52
+                'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s"  (Share ID: %s)',
53
+                $params,
54
+                [
55
+                    'itemType',
56
+                    'itemTarget',
57
+                    'itemSource',
58
+                    'shareWith',
59
+                    'permissions',
60
+                    'id',
61
+                ]
62
+            );
63
+        } elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
64
+            $this->log(
65
+                'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s"  (Share ID: %s)',
66
+                $params,
67
+                [
68
+                    'itemType',
69
+                    'itemTarget',
70
+                    'itemSource',
71
+                    'shareWith',
72
+                    'permissions',
73
+                    'id',
74
+                ]
75
+            );
76
+        }
77
+    }
78 78
 
79
-	/**
80
-	 * Logs unsharing of data
81
-	 *
82
-	 * @param array $params
83
-	 */
84
-	public function unshare(array $params) {
85
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
86
-			$this->log(
87
-				'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
88
-				$params,
89
-				[
90
-					'itemType',
91
-					'fileTarget',
92
-					'itemSource',
93
-					'id',
94
-				]
95
-			);
96
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
97
-			$this->log(
98
-				'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
99
-				$params,
100
-				[
101
-					'itemType',
102
-					'fileTarget',
103
-					'itemSource',
104
-					'shareWith',
105
-					'id',
106
-				]
107
-			);
108
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
109
-			$this->log(
110
-				'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
111
-				$params,
112
-				[
113
-					'itemType',
114
-					'fileTarget',
115
-					'itemSource',
116
-					'shareWith',
117
-					'id',
118
-				]
119
-			);
120
-		}
121
-	}
79
+    /**
80
+     * Logs unsharing of data
81
+     *
82
+     * @param array $params
83
+     */
84
+    public function unshare(array $params) {
85
+        if($params['shareType'] === Share::SHARE_TYPE_LINK) {
86
+            $this->log(
87
+                'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
88
+                $params,
89
+                [
90
+                    'itemType',
91
+                    'fileTarget',
92
+                    'itemSource',
93
+                    'id',
94
+                ]
95
+            );
96
+        } elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
97
+            $this->log(
98
+                'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
99
+                $params,
100
+                [
101
+                    'itemType',
102
+                    'fileTarget',
103
+                    'itemSource',
104
+                    'shareWith',
105
+                    'id',
106
+                ]
107
+            );
108
+        } elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
109
+            $this->log(
110
+                'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
111
+                $params,
112
+                [
113
+                    'itemType',
114
+                    'fileTarget',
115
+                    'itemSource',
116
+                    'shareWith',
117
+                    'id',
118
+                ]
119
+            );
120
+        }
121
+    }
122 122
 
123
-	/**
124
-	 * Logs the updating of permission changes for shares
125
-	 *
126
-	 * @param array $params
127
-	 */
128
-	public function updatePermissions(array $params) {
129
-		$this->log(
130
-			'The permissions of the shared %s "%s" with ID "%s" have been changed to "%s"',
131
-			$params,
132
-			[
133
-				'itemType',
134
-				'path',
135
-				'itemSource',
136
-				'permissions',
137
-			]
138
-		);
139
-	}
123
+    /**
124
+     * Logs the updating of permission changes for shares
125
+     *
126
+     * @param array $params
127
+     */
128
+    public function updatePermissions(array $params) {
129
+        $this->log(
130
+            'The permissions of the shared %s "%s" with ID "%s" have been changed to "%s"',
131
+            $params,
132
+            [
133
+                'itemType',
134
+                'path',
135
+                'itemSource',
136
+                'permissions',
137
+            ]
138
+        );
139
+    }
140 140
 
141
-	/**
142
-	 * Logs the password changes for a share
143
-	 *
144
-	 * @param array $params
145
-	 */
146
-	public function updatePassword(array $params) {
147
-		$this->log(
148
-			'The password of the publicly shared %s "%s" with ID "%s" has been changed',
149
-			$params,
150
-			[
151
-				'itemType',
152
-				'token',
153
-				'itemSource',
154
-			]
155
-		);
156
-	}
141
+    /**
142
+     * Logs the password changes for a share
143
+     *
144
+     * @param array $params
145
+     */
146
+    public function updatePassword(array $params) {
147
+        $this->log(
148
+            'The password of the publicly shared %s "%s" with ID "%s" has been changed',
149
+            $params,
150
+            [
151
+                'itemType',
152
+                'token',
153
+                'itemSource',
154
+            ]
155
+        );
156
+    }
157 157
 
158
-	/**
159
-	 * Logs the expiration date changes for a share
160
-	 *
161
-	 * @param array $params
162
-	 */
163
-	public function updateExpirationDate(array $params) {
164
-		$this->log(
165
-			'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
166
-			$params,
167
-			[
168
-				'itemType',
169
-				'itemSource',
170
-				'date',
171
-			]
172
-		);
173
-	}
158
+    /**
159
+     * Logs the expiration date changes for a share
160
+     *
161
+     * @param array $params
162
+     */
163
+    public function updateExpirationDate(array $params) {
164
+        $this->log(
165
+            'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
166
+            $params,
167
+            [
168
+                'itemType',
169
+                'itemSource',
170
+                'date',
171
+            ]
172
+        );
173
+    }
174 174
 
175
-	/**
176
-	 * Logs access of shared files
177
-	 *
178
-	 * @param array $params
179
-	 */
180
-	public function shareAccessed(array $params) {
181
-		$this->log(
182
-			'The shared %s with the token "%s" by "%s" has been accessed.',
183
-			$params,
184
-			[
185
-				'itemType',
186
-				'token',
187
-				'uidOwner',
188
-			]
189
-		);
190
-	}
175
+    /**
176
+     * Logs access of shared files
177
+     *
178
+     * @param array $params
179
+     */
180
+    public function shareAccessed(array $params) {
181
+        $this->log(
182
+            'The shared %s with the token "%s" by "%s" has been accessed.',
183
+            $params,
184
+            [
185
+                'itemType',
186
+                'token',
187
+                'uidOwner',
188
+            ]
189
+        );
190
+    }
191 191
 }
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/trashbin.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
 
28 28
 class Trashbin extends Action {
29 29
 
30
-	public function delete($params) {
31
-		$this->log('File "%s" deleted from trash bin.',
32
-			['path' => $params['path']], ['path']
33
-		);
34
-	}
30
+    public function delete($params) {
31
+        $this->log('File "%s" deleted from trash bin.',
32
+            ['path' => $params['path']], ['path']
33
+        );
34
+    }
35 35
 
36
-	public function restore($params) {
37
-		$this->log('File "%s" restored from trash bin.',
38
-			['path' => $params['filePath']], ['path']
39
-		);
40
-	}
36
+    public function restore($params) {
37
+        $this->log('File "%s" restored from trash bin.',
38
+            ['path' => $params['filePath']], ['path']
39
+        );
40
+    }
41 41
 
42 42
 }
Please login to merge, or discard this patch.
apps/admin_audit/appinfo/app.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-
4 3
  *
5 4
  * @author Bjoern Schiessle <[email protected]>
6 5
  * @author Lukas Reschke <[email protected]>
Please login to merge, or discard this patch.
apps/files_versions/ajax/getVersions.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,22 +35,22 @@
 block discarded – undo
35 35
 $versions = OCA\Files_Versions\Storage::getVersions($uid, $filename, $source);
36 36
 if( $versions ) {
37 37
 
38
-	$endReached = false;
39
-	if (count($versions) <= $start+$count) {
40
-		$endReached = true;
41
-	}
38
+    $endReached = false;
39
+    if (count($versions) <= $start+$count) {
40
+        $endReached = true;
41
+    }
42 42
 
43
-	$versions = array_slice($versions, $start, $count);
43
+    $versions = array_slice($versions, $start, $count);
44 44
 
45
-	// remove owner path from request to not disclose it to the recipient
46
-	foreach ($versions as $version) {
47
-		unset($version['path']);
48
-	}
45
+    // remove owner path from request to not disclose it to the recipient
46
+    foreach ($versions as $version) {
47
+        unset($version['path']);
48
+    }
49 49
 
50
-	\OCP\JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
50
+    \OCP\JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
51 51
 
52 52
 } else {
53 53
 
54
-	\OCP\JSON::success(array('data' => array('versions' => [], 'endReached' => true)));
54
+    \OCP\JSON::success(array('data' => array('versions' => [], 'endReached' => true)));
55 55
 
56 56
 }
Please login to merge, or discard this patch.