Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
core/templates/update.admin.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 		<h2 class="title"><?php p($l->t('App update required')); ?></h2>
5 5
 		<?php } else { ?>
6 6
 		<h2 class="title"><?php p($l->t('%s will be updated to version %s',
7
-			array($_['productName'], $_['version']))); ?></h2>
7
+            array($_['productName'], $_['version']))); ?></h2>
8 8
 		<?php } ?>
9 9
 		<?php if (!empty($_['appsToUpgrade'])) { ?>
10 10
 		<div class="infogroup">
Please login to merge, or discard this patch.
core/templates/mail.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 <?php
14 14
 print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
15 15
 if ( isset($_['expiration']) ) {
16
-	p($l->t("The share will expire on %s.", array($_['expiration'])));
17
-	print_unescaped('<br><br>');
16
+    p($l->t("The share will expire on %s.", array($_['expiration'])));
17
+    print_unescaped('<br><br>');
18 18
 }
19 19
 // TRANSLATORS term at the end of a mail
20 20
 p($l->t('Cheers!'));
Please login to merge, or discard this patch.
core/search/ajax/search.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,32 +31,32 @@
 block discarded – undo
31 31
 \OC::$server->getSession()->close();
32 32
 
33 33
 if (isset($_GET['query'])) {
34
-	$query = $_GET['query'];
34
+    $query = $_GET['query'];
35 35
 } else {
36
-	$query = '';
36
+    $query = '';
37 37
 }
38 38
 if (isset($_GET['inApps'])) {
39
-	$inApps = $_GET['inApps'];
40
-	if (is_string($inApps)) {
41
-		$inApps = array($inApps);
42
-	}
39
+    $inApps = $_GET['inApps'];
40
+    if (is_string($inApps)) {
41
+        $inApps = array($inApps);
42
+    }
43 43
 } else {
44
-	$inApps = array();
44
+    $inApps = array();
45 45
 }
46 46
 if (isset($_GET['page'])) {
47
-	$page = (int)$_GET['page'];
47
+    $page = (int)$_GET['page'];
48 48
 } else {
49
-	$page = 1;
49
+    $page = 1;
50 50
 }
51 51
 if (isset($_GET['size'])) {
52
-	$size = (int)$_GET['size'];
52
+    $size = (int)$_GET['size'];
53 53
 } else {
54
-	$size = 30;
54
+    $size = 30;
55 55
 }
56 56
 if($query) {
57
-	$result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58
-	OC_JSON::encodedPrint($result);
57
+    $result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58
+    OC_JSON::encodedPrint($result);
59 59
 }
60 60
 else {
61
-	echo 'false';
61
+    echo 'false';
62 62
 }
Please login to merge, or discard this patch.
settings/templates/settings.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
  */?>
6 6
 
7 7
 <?php foreach($_['forms'] as $form) {
8
-	print_unescaped($form);
8
+    print_unescaped($form);
9 9
 };
Please login to merge, or discard this patch.
settings/templates/users/main.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 script('settings', [
9
-	'users/deleteHandler',
10
-	'users/filter',
11
-	'users/users',
12
-	'users/groups'
9
+    'users/deleteHandler',
10
+    'users/filter',
11
+    'users/users',
12
+    'users/groups'
13 13
 ]);
14 14
 script('core', [
15
-	'multiselect',
16
-	'singleselect'
15
+    'multiselect',
16
+    'singleselect'
17 17
 ]);
18 18
 style('settings', 'settings');
19 19
 
20 20
 $userlistParams = array();
21 21
 $allGroups=array();
22 22
 foreach($_["adminGroup"] as $group) {
23
-	$allGroups[] = $group['name'];
23
+    $allGroups[] = $group['name'];
24 24
 }
25 25
 foreach($_["groups"] as $group) {
26
-	$allGroups[] = $group['name'];
26
+    $allGroups[] = $group['name'];
27 27
 }
28 28
 $userlistParams['subadmingroups'] = $allGroups;
29 29
 $userlistParams['allGroups'] = json_encode($allGroups);
Please login to merge, or discard this patch.
settings/help.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
 
37 37
 
38 38
 if(isset($_GET['mode']) and $_GET['mode'] === 'admin') {
39
-	$url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' );
40
-	$style1='';
41
-	$style2=' active';
39
+    $url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' );
40
+    $style1='';
41
+    $style2=' active';
42 42
 }else{
43
-	$url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' );
44
-	$style1=' active';
45
-	$style2='';
43
+    $url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' );
44
+    $style1=' active';
45
+    $style2='';
46 46
 }
47 47
 
48 48
 $url1=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=user';
Please login to merge, or discard this patch.
apps/files_trashbin/appinfo/routes.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
 $application = new Application();
28 28
 
29 29
 $this->create('core_ajax_trashbin_preview', 'ajax/preview.php')
30
-	->actionInclude('files_trashbin/ajax/preview.php');
30
+    ->actionInclude('files_trashbin/ajax/preview.php');
31 31
 $this->create('files_trashbin_ajax_delete', 'ajax/delete.php')
32
-	->actionInclude('files_trashbin/ajax/delete.php');
32
+    ->actionInclude('files_trashbin/ajax/delete.php');
33 33
 $this->create('files_trashbin_ajax_isEmpty', 'ajax/isEmpty.php')
34
-	->actionInclude('files_trashbin/ajax/isEmpty.php');
34
+    ->actionInclude('files_trashbin/ajax/isEmpty.php');
35 35
 $this->create('files_trashbin_ajax_list', 'ajax/list.php')
36
-	->actionInclude('files_trashbin/ajax/list.php');
36
+    ->actionInclude('files_trashbin/ajax/list.php');
37 37
 $this->create('files_trashbin_ajax_undelete', 'ajax/undelete.php')
38
-	->actionInclude('files_trashbin/ajax/undelete.php');
38
+    ->actionInclude('files_trashbin/ajax/undelete.php');
39 39
 
Please login to merge, or discard this patch.
apps/systemtags/appinfo/app.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -28,40 +28,40 @@  discard block
 block discarded – undo
28 28
 
29 29
 $eventDispatcher = \OC::$server->getEventDispatcher();
30 30
 $eventDispatcher->addListener(
31
-	'OCA\Files::loadAdditionalScripts',
32
-	function() {
33
-		// FIXME: no public API for these ?
34
-		\OC_Util::addVendorScript('select2/select2');
35
-		\OC_Util::addVendorStyle('select2/select2');
36
-		\OCP\Util::addScript('select2-toggleselect');
37
-		\OCP\Util::addScript('oc-backbone-webdav');
38
-		\OCP\Util::addScript('systemtags/systemtags');
39
-		\OCP\Util::addScript('systemtags/systemtagmodel');
40
-		\OCP\Util::addScript('systemtags/systemtagsmappingcollection');
41
-		\OCP\Util::addScript('systemtags/systemtagscollection');
42
-		\OCP\Util::addScript('systemtags/systemtagsinputfield');
43
-		\OCP\Util::addScript('systemtags', 'app');
44
-		\OCP\Util::addScript('systemtags', 'systemtagsfilelist');
45
-		\OCP\Util::addScript('systemtags', 'filesplugin');
46
-		\OCP\Util::addScript('systemtags', 'systemtagsinfoview');
47
-		\OCP\Util::addStyle('systemtags');
48
-		\OCP\Util::addStyle('systemtags', 'systemtagsfilelist');
49
-	}
31
+    'OCA\Files::loadAdditionalScripts',
32
+    function() {
33
+        // FIXME: no public API for these ?
34
+        \OC_Util::addVendorScript('select2/select2');
35
+        \OC_Util::addVendorStyle('select2/select2');
36
+        \OCP\Util::addScript('select2-toggleselect');
37
+        \OCP\Util::addScript('oc-backbone-webdav');
38
+        \OCP\Util::addScript('systemtags/systemtags');
39
+        \OCP\Util::addScript('systemtags/systemtagmodel');
40
+        \OCP\Util::addScript('systemtags/systemtagsmappingcollection');
41
+        \OCP\Util::addScript('systemtags/systemtagscollection');
42
+        \OCP\Util::addScript('systemtags/systemtagsinputfield');
43
+        \OCP\Util::addScript('systemtags', 'app');
44
+        \OCP\Util::addScript('systemtags', 'systemtagsfilelist');
45
+        \OCP\Util::addScript('systemtags', 'filesplugin');
46
+        \OCP\Util::addScript('systemtags', 'systemtagsinfoview');
47
+        \OCP\Util::addStyle('systemtags');
48
+        \OCP\Util::addStyle('systemtags', 'systemtagsfilelist');
49
+    }
50 50
 );
51 51
 
52 52
 $activityManager = \OC::$server->getActivityManager();
53 53
 $activityManager->registerExtension(function() {
54
-	$application = new \OCP\AppFramework\App('systemtags');
55
-	/** @var \OCA\SystemTags\Activity\Extension $extension */
56
-	$extension = $application->getContainer()->query('OCA\SystemTags\Activity\Extension');
57
-	return $extension;
54
+    $application = new \OCP\AppFramework\App('systemtags');
55
+    /** @var \OCA\SystemTags\Activity\Extension $extension */
56
+    $extension = $application->getContainer()->query('OCA\SystemTags\Activity\Extension');
57
+    return $extension;
58 58
 });
59 59
 
60 60
 $managerListener = function(ManagerEvent $event) use ($activityManager) {
61
-	$application = new \OCP\AppFramework\App('systemtags');
62
-	/** @var \OCA\SystemTags\Activity\Listener $listener */
63
-	$listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener');
64
-	$listener->event($event);
61
+    $application = new \OCP\AppFramework\App('systemtags');
62
+    /** @var \OCA\SystemTags\Activity\Listener $listener */
63
+    $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener');
64
+    $listener->event($event);
65 65
 };
66 66
 
67 67
 $eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener);
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener);
70 70
 
71 71
 $mapperListener = function(MapperEvent $event) use ($activityManager) {
72
-	$application = new \OCP\AppFramework\App('systemtags');
73
-	/** @var \OCA\SystemTags\Activity\Listener $listener */
74
-	$listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener');
75
-	$listener->mapperEvent($event);
72
+    $application = new \OCP\AppFramework\App('systemtags');
73
+    /** @var \OCA\SystemTags\Activity\Listener $listener */
74
+    $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener');
75
+    $listener->mapperEvent($event);
76 76
 };
77 77
 
78 78
 $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener);
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 $l = \OC::$server->getL10N('systemtags');
82 82
 
83 83
 \OCA\Files\App::getNavigationManager()->add(
84
-	array(
85
-		'id' => 'systemtagsfilter',
86
-		'appname' => 'systemtags',
87
-		'script' => 'list.php',
88
-		'order' => 25,
89
-		'name' => $l->t('Tags')
90
-	)
84
+    array(
85
+        'id' => 'systemtagsfilter',
86
+        'appname' => 'systemtags',
87
+        'script' => 'list.php',
88
+        'order' => 25,
89
+        'name' => $l->t('Tags')
90
+    )
91 91
 );
Please login to merge, or discard this patch.
apps/files_sharing/ajax/publicpreview.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -37,29 +37,29 @@  discard block
 block discarded – undo
37 37
 $keepAspect = array_key_exists('a', $_GET) ? true : false;
38 38
 
39 39
 if($token === ''){
40
-	\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
41
-	\OCP\Util::writeLog('core-preview', 'No token parameter was passed', \OCP\Util::DEBUG);
42
-	exit;
40
+    \OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
41
+    \OCP\Util::writeLog('core-preview', 'No token parameter was passed', \OCP\Util::DEBUG);
42
+    exit;
43 43
 }
44 44
 
45 45
 $linkedItem = \OCP\Share::getShareByToken($token);
46 46
 $shareManager = \OC::$server->getShareManager();
47 47
 $share = $shareManager->getShareByToken($token);
48 48
 if(!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) {
49
-	OCP\JSON::error(array('data' => 'Share is not readable.'));
50
-	exit();
49
+    OCP\JSON::error(array('data' => 'Share is not readable.'));
50
+    exit();
51 51
 }
52 52
 
53 53
 if($linkedItem === false || ($linkedItem['item_type'] !== 'file' && $linkedItem['item_type'] !== 'folder')) {
54
-	\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
55
-	\OCP\Util::writeLog('core-preview', 'Passed token parameter is not valid', \OCP\Util::DEBUG);
56
-	exit;
54
+    \OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
55
+    \OCP\Util::writeLog('core-preview', 'Passed token parameter is not valid', \OCP\Util::DEBUG);
56
+    exit;
57 57
 }
58 58
 
59 59
 if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) {
60
-	\OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
61
-	\OCP\Util::writeLog('core-preview', 'Passed token seems to be valid, but it does not contain all necessary information . ("' . $token . '")', \OCP\Util::WARN);
62
-	exit;
60
+    \OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
61
+    \OCP\Util::writeLog('core-preview', 'Passed token seems to be valid, but it does not contain all necessary information . ("' . $token . '")', \OCP\Util::WARN);
62
+    exit;
63 63
 }
64 64
 
65 65
 $rootLinkItem = OCP\Share::resolveReShare($linkedItem);
@@ -74,53 +74,53 @@  discard block
 block discarded – undo
74 74
 $path = $view->getPath($pathId);
75 75
 
76 76
 if($path === null) {
77
-	\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
78
-	\OCP\Util::writeLog('core-preview', 'Could not resolve file for shared item', \OCP\Util::WARN);
79
-	exit;
77
+    \OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
78
+    \OCP\Util::writeLog('core-preview', 'Could not resolve file for shared item', \OCP\Util::WARN);
79
+    exit;
80 80
 }
81 81
 
82 82
 $pathInfo = $view->getFileInfo($path);
83 83
 $sharedFile = null;
84 84
 
85 85
 if($linkedItem['item_type'] === 'folder') {
86
-	$isValid = \OC\Files\Filesystem::isValidPath($file);
87
-	if(!$isValid) {
88
-		\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
89
-		\OCP\Util::writeLog('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . \OC::$server->getRequest()->getRemoteAddress() . '")', \OCP\Util::WARN);
90
-		exit;
91
-	}
92
-	$sharedFile = \OC\Files\Filesystem::normalizePath($file);
86
+    $isValid = \OC\Files\Filesystem::isValidPath($file);
87
+    if(!$isValid) {
88
+        \OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
89
+        \OCP\Util::writeLog('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . \OC::$server->getRequest()->getRemoteAddress() . '")', \OCP\Util::WARN);
90
+        exit;
91
+    }
92
+    $sharedFile = \OC\Files\Filesystem::normalizePath($file);
93 93
 }
94 94
 
95 95
 if($linkedItem['item_type'] === 'file') {
96
-	$parent = $pathInfo['parent'];
97
-	$path = $view->getPath($parent);
98
-	$sharedFile = $pathInfo['name'];
96
+    $parent = $pathInfo['parent'];
97
+    $path = $view->getPath($parent);
98
+    $sharedFile = $pathInfo['name'];
99 99
 }
100 100
 
101 101
 $path = \OC\Files\Filesystem::normalizePath($path, false);
102 102
 if(substr($path, 0, 1) === '/') {
103
-	$path = substr($path, 1);
103
+    $path = substr($path, 1);
104 104
 }
105 105
 
106 106
 if($maxX === 0 || $maxY === 0) {
107
-	\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
108
-	\OCP\Util::writeLog('core-preview', 'x and/or y set to 0', \OCP\Util::DEBUG);
109
-	exit;
107
+    \OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
108
+    \OCP\Util::writeLog('core-preview', 'x and/or y set to 0', \OCP\Util::DEBUG);
109
+    exit;
110 110
 }
111 111
 
112 112
 $root = 'files/' . $path;
113 113
 
114 114
 try{
115
-	$preview = new \OC\Preview($userId, $root);
116
-	$preview->setFile($sharedFile);
117
-	$preview->setMaxX($maxX);
118
-	$preview->setMaxY($maxY);
119
-	$preview->setScalingUp($scalingUp);
120
-	$preview->setKeepAspect($keepAspect);
121
-
122
-	$preview->showPreview();
115
+    $preview = new \OC\Preview($userId, $root);
116
+    $preview->setFile($sharedFile);
117
+    $preview->setMaxX($maxX);
118
+    $preview->setMaxY($maxY);
119
+    $preview->setScalingUp($scalingUp);
120
+    $preview->setKeepAspect($keepAspect);
121
+
122
+    $preview->showPreview();
123 123
 } catch (\Exception $e) {
124
-	\OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
125
-	\OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
124
+    \OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
125
+    \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
126 126
 }
Please login to merge, or discard this patch.