Completed
Push — stable13 ( f62775...bea70d )
by Roeland
12:09
created
apps/files/appinfo/app.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
39 39
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
40 40
 
41
-\OCA\Files\App::getNavigationManager()->add(function () use ($l) {
41
+\OCA\Files\App::getNavigationManager()->add(function() use ($l) {
42 42
 	return [
43 43
 		'id' => 'files',
44 44
 		'appname' => 'files',
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	];
49 49
 });
50 50
 
51
-\OCA\Files\App::getNavigationManager()->add(function () use ($l) {
51
+\OCA\Files\App::getNavigationManager()->add(function() use ($l) {
52 52
 	return [
53 53
 		'id' => 'recent',
54 54
 		'appname' => 'files',
Please login to merge, or discard this patch.
apps/user_ldap/templates/part.wizard-userfilter.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <fieldset id="ldapWizard2">
2 2
 	<div>
3 3
 		<p>
4
-			<?php p($l->t('Listing and searching for users is constrained by these criteria:'));?>
4
+			<?php p($l->t('Listing and searching for users is constrained by these criteria:')); ?>
5 5
 		</p>
6 6
 		<p>
7 7
 			<label for="ldap_userfilter_objectclass">
8
-				<?php p($l->t('Only these object classes:'));?>
8
+				<?php p($l->t('Only these object classes:')); ?>
9 9
 			</label>
10 10
 
11 11
 			<select id="ldap_userfilter_objectclass" multiple="multiple"
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 		</p>
15 15
 		<p>
16 16
 			<label></label>
17
-			<span class="ldapInputColElement"><?php p($l->t('The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin.'));?></span>
17
+			<span class="ldapInputColElement"><?php p($l->t('The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin.')); ?></span>
18 18
 		</p>
19 19
 		<p>
20 20
 			<label for="ldap_userfilter_groups">
21
-				<?php p($l->t('Only from these groups:'));?>
21
+				<?php p($l->t('Only from these groups:')); ?>
22 22
 			</label>
23 23
 
24
-			<input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups'));?>" />
24
+			<input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups')); ?>" />
25 25
 
26 26
 			<select id="ldap_userfilter_groups" multiple="multiple"
27 27
 			 name="ldap_userfilter_groups" class="multiSelectPlugin">
@@ -30,26 +30,26 @@  discard block
 block discarded – undo
30 30
 		<p class="ldapManyGroupsSupport hidden">
31 31
 			<label></label>
32 32
 			<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
33
-					title="<?php p($l->t('Available groups'));?>"></select>
33
+					title="<?php p($l->t('Available groups')); ?>"></select>
34 34
 			<span class="buttonSpan">
35 35
 				<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
36 36
 				<button class="ldapGroupListDeselect" type="button">&lt;</button>
37 37
 			</span>
38 38
 			<select class="ldapGroupList ldapGroupListSelected" multiple="multiple"
39
-					title="<?php p($l->t('Selected groups'));?>"></select>
39
+					title="<?php p($l->t('Selected groups')); ?>"></select>
40 40
 		</p>
41 41
 		<p>
42
-			<label><a id='toggleRawUserFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label>
42
+			<label><a id='toggleRawUserFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query')); ?></a></label>
43 43
 		</p>
44 44
 		<p id="ldapReadOnlyUserFilterContainer" class="hidden ldapReadOnlyFilterContainer">
45
-			<label><?php p($l->t('LDAP Filter:'));?></label>
45
+			<label><?php p($l->t('LDAP Filter:')); ?></label>
46 46
 			<span class="ldapFilterReadOnlyElement ldapInputColElement"></span>
47 47
 		</p>
48 48
 		<p id="rawUserFilterContainer">
49 49
 			<textarea type="text" id="ldap_userlist_filter" name="ldap_userlist_filter"
50 50
 				class="ldapFilterInputElement"
51
-				placeholder="<?php p($l->t('Edit LDAP Query'));?>"
52
-				title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', $theme->getName()));?>">
51
+				placeholder="<?php p($l->t('Edit LDAP Query')); ?>"
52
+				title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', $theme->getName())); ?>">
53 53
 			</textarea>
54 54
 		</p>
55 55
 		<p>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		</p>
58 58
 		<p class="ldap_count">
59 59
 			<button class="ldapGetEntryCount ldapGetUserCount" name="ldapGetEntryCount" type="button">
60
-				<?php p($l->t('Verify settings and count users'));?>
60
+				<?php p($l->t('Verify settings and count users')); ?>
61 61
 			</button>
62 62
 			<span id="ldap_user_count"></span>
63 63
 		</p>
Please login to merge, or discard this patch.
apps/user_ldap/ajax/clearMappings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
31 31
 OCP\JSON::checkAppEnabled('user_ldap');
32 32
 OCP\JSON::callCheck();
33 33
 
34
-$subject = (string)$_POST['ldap_clear_mapping'];
34
+$subject = (string) $_POST['ldap_clear_mapping'];
35 35
 $mapping = null;
36
-if($subject === 'user') {
36
+if ($subject === 'user') {
37 37
 	$mapping = new UserMapping(\OC::$server->getDatabaseConnection());
38
-} else if($subject === 'group') {
38
+} else if ($subject === 'group') {
39 39
 	$mapping = new GroupMapping(\OC::$server->getDatabaseConnection());
40 40
 }
41 41
 try {
42
-	if(is_null($mapping) || !$mapping->clear()) {
42
+	if (is_null($mapping) || !$mapping->clear()) {
43 43
 		$l = \OC::$server->getL10N('user_ldap');
44 44
 		throw new \Exception($l->t('Failed to clear the mappings.'));
45 45
 	}
Please login to merge, or discard this patch.
apps/user_ldap/ajax/getConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 OCP\JSON::checkAppEnabled('user_ldap');
30 30
 OCP\JSON::callCheck();
31 31
 
32
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
32
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
33 33
 $ldapWrapper = new OCA\User_LDAP\LDAP();
34 34
 $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
35 35
 $configuration = $connection->getConfiguration();
Please login to merge, or discard this patch.
apps/user_ldap/ajax/setConfiguration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 OCP\JSON::checkAppEnabled('user_ldap');
31 31
 OCP\JSON::callCheck();
32 32
 
33
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
33
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
34 34
 
35 35
 // Checkboxes are not submitted, when they are unchecked. Set them manually.
36 36
 // only legacy checkboxes (Advanced and Expert tab) need to be handled here,
37 37
 // the Wizard-like tabs handle it on their own
38 38
 $chkboxes = array('ldap_configuration_active', 'ldap_override_main_server',
39 39
 				  'ldap_turn_off_cert_check');
40
-foreach($chkboxes as $boxid) {
41
-	if(!isset($_POST[$boxid])) {
40
+foreach ($chkboxes as $boxid) {
41
+	if (!isset($_POST[$boxid])) {
42 42
 		$_POST[$boxid] = 0;
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
apps/user_ldap/ajax/deleteConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 OCP\JSON::checkAppEnabled('user_ldap');
32 32
 OCP\JSON::callCheck();
33 33
 
34
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
34
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
35 35
 $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig());
36
-if($helper->deleteServerConfiguration($prefix)) {
36
+if ($helper->deleteServerConfiguration($prefix)) {
37 37
 	OCP\JSON::success();
38 38
 } else {
39 39
 	$l = \OC::$server->getL10N('user_ldap');
Please login to merge, or discard this patch.
apps/user_ldap/ajax/wizard.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
 
33 33
 $l = \OC::$server->getL10N('user_ldap');
34 34
 
35
-if(!isset($_POST['action'])) {
35
+if (!isset($_POST['action'])) {
36 36
 	\OCP\JSON::error(array('message' => $l->t('No action specified')));
37 37
 }
38
-$action = (string)$_POST['action'];
38
+$action = (string) $_POST['action'];
39 39
 
40 40
 
41
-if(!isset($_POST['ldap_serverconfig_chooser'])) {
41
+if (!isset($_POST['ldap_serverconfig_chooser'])) {
42 42
 	\OCP\JSON::error(array('message' => $l->t('No configuration specified')));
43 43
 }
44
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
44
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
45 45
 
46 46
 $ldapWrapper = new \OCA\User_LDAP\LDAP();
47 47
 $configuration = new \OCA\User_LDAP\Configuration($prefix);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 $wizard = new \OCA\User_LDAP\Wizard($configuration, $ldapWrapper, $access);
68 68
 
69
-switch($action) {
69
+switch ($action) {
70 70
 	case 'guessPortAndTLS':
71 71
 	case 'guessBaseDN':
72 72
 	case 'detectEmailAttribute':
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	case 'countInBaseDN':
86 86
 		try {
87 87
 			$result = $wizard->$action();
88
-			if($result !== false) {
88
+			if ($result !== false) {
89 89
 				OCP\JSON::success($result->getResultArray());
90 90
 				exit;
91 91
 			}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		try {
102 102
 			$loginName = $_POST['ldap_test_loginname'];
103 103
 			$result = $wizard->$action($loginName);
104
-			if($result !== false) {
104
+			if ($result !== false) {
105 105
 				OCP\JSON::success($result->getResultArray());
106 106
 				exit;
107 107
 			}
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 	case 'save':
118 118
 		$key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false;
119 119
 		$val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null;
120
-		if($key === false || is_null($val)) {
120
+		if ($key === false || is_null($val)) {
121 121
 			\OCP\JSON::error(array('message' => $l->t('No data specified')));
122 122
 			exit;
123 123
 		}
124 124
 		$cfg = array($key => $val);
125 125
 		$setParameters = array();
126 126
 		$configuration->setConfiguration($cfg, $setParameters);
127
-		if(!in_array($key, $setParameters)) {
127
+		if (!in_array($key, $setParameters)) {
128 128
 			\OCP\JSON::error(array('message' => $l->t($key.
129 129
 				' Could not set configuration %s', $setParameters[0])));
130 130
 			exit;
Please login to merge, or discard this patch.
apps/user_ldap/ajax/getNewServerConfigPrefix.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
 sort($serverConnections);
33 33
 $lk = array_pop($serverConnections);
34 34
 $ln = intval(str_replace('s', '', $lk));
35
-$nk = 's'.str_pad($ln+1, 2, '0', STR_PAD_LEFT);
35
+$nk = 's'.str_pad($ln + 1, 2, '0', STR_PAD_LEFT);
36 36
 
37 37
 $resultData = array('configPrefix' => $nk);
38 38
 
39 39
 $newConfig = new \OCA\User_LDAP\Configuration($nk, false);
40
-if(isset($_POST['copyConfig'])) {
40
+if (isset($_POST['copyConfig'])) {
41 41
 	$originalConfig = new \OCA\User_LDAP\Configuration($_POST['copyConfig']);
42 42
 	$newConfig->setConfiguration($originalConfig->getConfiguration());
43 43
 } else {
Please login to merge, or discard this patch.
apps/user_ldap/lib/User/DeletedUsersIndex.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			'user_ldap', 'isDeleted', '1');
72 72
 
73 73
 		$userObjects = array();
74
-		foreach($deletedUsers as $user) {
74
+		foreach ($deletedUsers as $user) {
75 75
 			$userObjects[] = new OfflineUser($user, $this->config, $this->db, $this->mapping);
76 76
 		}
77 77
 		$this->deletedUsers = $userObjects;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return \OCA\User_LDAP\User\OfflineUser[]
85 85
 	 */
86 86
 	public function getUsers() {
87
-		if(is_array($this->deletedUsers)) {
87
+		if (is_array($this->deletedUsers)) {
88 88
 			return $this->deletedUsers;
89 89
 		}
90 90
 		return $this->fetchDeletedUsers();
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 	 * @return bool
96 96
 	 */
97 97
 	public function hasUsers() {
98
-		if($this->deletedUsers === false) {
98
+		if ($this->deletedUsers === false) {
99 99
 			$this->fetchDeletedUsers();
100 100
 		}
101
-		if(is_array($this->deletedUsers) && count($this->deletedUsers) > 0) {
101
+		if (is_array($this->deletedUsers) && count($this->deletedUsers) > 0) {
102 102
 			return true;
103 103
 		}
104 104
 		return false;
Please login to merge, or discard this patch.