Completed
Push — stable12 ( b91394...cede17 )
by
unknown
30:59 queued 20:45
created
apps/comments/appinfo/app.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 		$application = new \OCP\AppFramework\App('comments');
51 51
 		return $application->getContainer()->query(\OCA\Comments\Notification\Notifier::class);
52 52
 	},
53
-	function () {
53
+	function() {
54 54
 		$l = \OC::$server->getL10N('comments');
55 55
 		return ['id' => 'comments', 'name' => $l->t('Comments')];
56 56
 	}
57 57
 );
58 58
 
59 59
 $commentsManager = \OC::$server->getCommentsManager();
60
-$commentsManager->registerEventHandler(function () {
60
+$commentsManager->registerEventHandler(function() {
61 61
 	$application = new \OCP\AppFramework\App('comments');
62 62
 	/** @var \OCA\Comments\EventHandler $handler */
63 63
 	$handler = $application->getContainer()->query(\OCA\Comments\EventHandler::class);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 $commentsManager->registerDisplayNameResolver('user', function($id) {
67 67
 	$manager = \OC::$server->getUserManager();
68 68
 	$user = $manager->get($id);
69
-	if(is_null($user)) {
69
+	if (is_null($user)) {
70 70
 		$l = \OC::$server->getL10N('comments');
71 71
 		$displayName = $l->t('Unknown user');
72 72
 	} else {
Please login to merge, or discard this patch.
apps/files_trashbin/templates/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 					<label for="select_all_trash">
28 28
 						<span class="hidden-visually"><?php p($l->t('Select all'))?></span>
29 29
 					</label>
30
-					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
30
+					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
31 31
 					<span id="selectedActionsList" class='selectedActions'>
32 32
 						<a href="" class="undelete">
33 33
 							<span class="icon icon-history"></span>
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 				</div>
38 38
 			</th>
39 39
 			<th id="headerDate" class="hidden column-mtime">
40
-				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Deleted' )); ?></span><span class="sort-indicator"></span></a>
40
+				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a>
41 41
 				<span class="selectedActions">
42 42
 					<a href="" class="delete-selected">
43 43
 						<span><?php p($l->t('Delete'))?></span>
Please login to merge, or discard this patch.
apps/files_trashbin/ajax/undelete.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
 $dir = '/';
33 33
 if (isset($_POST['dir'])) {
34
-	$dir = rtrim((string)$_POST['dir'], '/'). '/';
34
+	$dir = rtrim((string) $_POST['dir'], '/').'/';
35 35
 }
36 36
 $allFiles = false;
37
-if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true') {
37
+if (isset($_POST['allfiles']) && (string) $_POST['allfiles'] === 'true') {
38 38
 	$allFiles = true;
39 39
 	$list = array();
40 40
 	$dirListing = true;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	foreach (OCA\Files_Trashbin\Helper::getTrashFiles($dir, \OCP\User::getUser()) as $file) {
45 45
 		$fileName = $file['name'];
46 46
 		if (!$dirListing) {
47
-			$fileName .= '.d' . $file['mtime'];
47
+			$fileName .= '.d'.$file['mtime'];
48 48
 		}
49 49
 		$list[] = $fileName;
50 50
 	}
@@ -57,21 +57,21 @@  discard block
 block discarded – undo
57 57
 
58 58
 $i = 0;
59 59
 foreach ($list as $file) {
60
-	$path = $dir . '/' . $file;
60
+	$path = $dir.'/'.$file;
61 61
 	if ($dir === '/') {
62 62
 		$file = ltrim($file, '/');
63 63
 		$delimiter = strrpos($file, '.d');
64 64
 		$filename = substr($file, 0, $delimiter);
65
-		$timestamp =  substr($file, $delimiter+2);
65
+		$timestamp = substr($file, $delimiter + 2);
66 66
 	} else {
67 67
 		$path_parts = pathinfo($file);
68 68
 		$filename = $path_parts['basename'];
69 69
 		$timestamp = null;
70 70
 	}
71 71
 
72
-	if ( !OCA\Files_Trashbin\Trashbin::restore($path, $filename, $timestamp) ) {
72
+	if (!OCA\Files_Trashbin\Trashbin::restore($path, $filename, $timestamp)) {
73 73
 		$error[] = $filename;
74
-		\OCP\Util::writeLog('trashbin', 'can\'t restore ' . $filename, \OCP\Util::ERROR);
74
+		\OCP\Util::writeLog('trashbin', 'can\'t restore '.$filename, \OCP\Util::ERROR);
75 75
 	} else {
76 76
 		$success[$i]['filename'] = $file;
77 77
 		$success[$i]['timestamp'] = $timestamp;
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 
81 81
 }
82 82
 
83
-if ( $error ) {
83
+if ($error) {
84 84
 	$filelist = '';
85
-	foreach ( $error as $e ) {
85
+	foreach ($error as $e) {
86 86
 		$filelist .= $e.', ';
87 87
 	}
88 88
 	$l = OC::$server->getL10N('files_trashbin');
Please login to merge, or discard this patch.
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/lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 use OCA\Files_Trashbin\Expiration;
28 28
 
29 29
 class Application extends App {
30
-	public function __construct (array $urlParams = []) {
30
+	public function __construct(array $urlParams = []) {
31 31
 		parent::__construct('files_trashbin', $urlParams);
32 32
 
33 33
 		$container = $this->getContainer();
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Command/ExpireTrash.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 		\OC_Util::setupFS($user);
118 118
 
119 119
 		// Check if this user has a trashbin directory
120
-		$view = new \OC\Files\View('/' . $user);
120
+		$view = new \OC\Files\View('/'.$user);
121 121
 		if (!$view->is_dir('/files_trashbin/files')) {
122 122
 			return false;
123 123
 		}
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Command/CleanUp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@
 block discarded – undo
107 107
 	protected function removeDeletedFiles($uid) {
108 108
 		\OC_Util::tearDownFS();
109 109
 		\OC_Util::setupFS($uid);
110
-		if ($this->rootFolder->nodeExists('/' . $uid . '/files_trashbin')) {
111
-			$this->rootFolder->get('/' . $uid . '/files_trashbin')->delete();
110
+		if ($this->rootFolder->nodeExists('/'.$uid.'/files_trashbin')) {
111
+			$this->rootFolder->get('/'.$uid.'/files_trashbin')->delete();
112 112
 			$query = $this->dbConnection->getQueryBuilder();
113 113
 			$query->delete('files_trash')
114 114
 				->where($query->expr()->eq('user', $query->createParameter('uid')))
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Hooks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	 * to remove the used space for the trash bin stored in the database
40 40
 	 */
41 41
 	public static function deleteUser_hook($params) {
42
-		if( \OCP\App::isEnabled('files_trashbin') ) {
42
+		if (\OCP\App::isEnabled('files_trashbin')) {
43 43
 			$uid = $params['uid'];
44 44
 			Trashbin::deleteUser($uid);
45 45
 		}
Please login to merge, or discard this patch.