Completed
Push — stable13 ( 9c68ce...acce19 )
by Blizzz
11:36
created
apps/user_ldap/lib/Settings/Admin.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -33,69 +33,69 @@
 block discarded – undo
33 33
 use OCP\Template;
34 34
 
35 35
 class Admin implements ISettings {
36
-	/** @var IL10N */
37
-	private $l;
36
+    /** @var IL10N */
37
+    private $l;
38 38
 
39
-	/**
40
-	 * @param IL10N $l
41
-	 */
42
-	public function __construct(IL10N $l) {
43
-		$this->l = $l;
44
-	}
39
+    /**
40
+     * @param IL10N $l
41
+     */
42
+    public function __construct(IL10N $l) {
43
+        $this->l = $l;
44
+    }
45 45
 
46
-	/**
47
-	 * @return TemplateResponse
48
-	 */
49
-	public function getForm() {
50
-		$helper = new Helper(\OC::$server->getConfig());
51
-		$prefixes = $helper->getServerConfigurationPrefixes();
52
-		if(count($prefixes) === 0) {
53
-			$newPrefix = $helper->getNextServerConfigurationPrefix();
54
-			$config = new Configuration($newPrefix, false);
55
-			$config->setConfiguration($config->getDefaults());
56
-			$config->saveConfiguration();
57
-			$prefixes[] = $newPrefix;
58
-		}
46
+    /**
47
+     * @return TemplateResponse
48
+     */
49
+    public function getForm() {
50
+        $helper = new Helper(\OC::$server->getConfig());
51
+        $prefixes = $helper->getServerConfigurationPrefixes();
52
+        if(count($prefixes) === 0) {
53
+            $newPrefix = $helper->getNextServerConfigurationPrefix();
54
+            $config = new Configuration($newPrefix, false);
55
+            $config->setConfiguration($config->getDefaults());
56
+            $config->saveConfiguration();
57
+            $prefixes[] = $newPrefix;
58
+        }
59 59
 
60
-		$hosts = $helper->getServerConfigurationHosts();
60
+        $hosts = $helper->getServerConfigurationHosts();
61 61
 
62
-		$wControls = new Template('user_ldap', 'part.wizardcontrols');
63
-		$wControls = $wControls->fetchPage();
64
-		$sControls = new Template('user_ldap', 'part.settingcontrols');
65
-		$sControls = $sControls->fetchPage();
62
+        $wControls = new Template('user_ldap', 'part.wizardcontrols');
63
+        $wControls = $wControls->fetchPage();
64
+        $sControls = new Template('user_ldap', 'part.settingcontrols');
65
+        $sControls = $sControls->fetchPage();
66 66
 
67
-		$parameters['serverConfigurationPrefixes'] = $prefixes;
68
-		$parameters['serverConfigurationHosts'] = $hosts;
69
-		$parameters['settingControls'] = $sControls;
70
-		$parameters['wizardControls'] = $wControls;
67
+        $parameters['serverConfigurationPrefixes'] = $prefixes;
68
+        $parameters['serverConfigurationHosts'] = $hosts;
69
+        $parameters['settingControls'] = $sControls;
70
+        $parameters['wizardControls'] = $wControls;
71 71
 
72
-		// assign default values
73
-		if(!isset($config)) {
74
-			$config = new Configuration('', false);
75
-		}
76
-		$defaults = $config->getDefaults();
77
-		foreach($defaults as $key => $default) {
78
-			$parameters[$key.'_default'] = $default;
79
-		}
72
+        // assign default values
73
+        if(!isset($config)) {
74
+            $config = new Configuration('', false);
75
+        }
76
+        $defaults = $config->getDefaults();
77
+        foreach($defaults as $key => $default) {
78
+            $parameters[$key.'_default'] = $default;
79
+        }
80 80
 
81
-		return new TemplateResponse('user_ldap', 'settings', $parameters);
82
-	}
81
+        return new TemplateResponse('user_ldap', 'settings', $parameters);
82
+    }
83 83
 
84
-	/**
85
-	 * @return string the section ID, e.g. 'sharing'
86
-	 */
87
-	public function getSection() {
88
-		return 'ldap';
89
-	}
84
+    /**
85
+     * @return string the section ID, e.g. 'sharing'
86
+     */
87
+    public function getSection() {
88
+        return 'ldap';
89
+    }
90 90
 
91
-	/**
92
-	 * @return int whether the form should be rather on the top or bottom of
93
-	 * the admin section. The forms are arranged in ascending order of the
94
-	 * priority values. It is required to return a value between 0 and 100.
95
-	 *
96
-	 * E.g.: 70
97
-	 */
98
-	public function getPriority() {
99
-		return 5;
100
-	}
91
+    /**
92
+     * @return int whether the form should be rather on the top or bottom of
93
+     * the admin section. The forms are arranged in ascending order of the
94
+     * priority values. It is required to return a value between 0 and 100.
95
+     *
96
+     * E.g.: 70
97
+     */
98
+    public function getPriority() {
99
+        return 5;
100
+    }
101 101
 }
Please login to merge, or discard this patch.
apps/user_ldap/templates/part.wizard-server.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 		<p>
3 3
 		<select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
4 4
 		<?php
5
-		$i = 1;
6
-		$sel = ' selected';
7
-		foreach($_['serverConfigurationPrefixes'] as $prefix) {
8
-			?>
5
+        $i = 1;
6
+        $sel = ' selected';
7
+        foreach($_['serverConfigurationPrefixes'] as $prefix) {
8
+            ?>
9 9
 			<option value="<?php p($prefix); ?>"<?php p($sel); $sel = ''; ?>><?php p($l->t('%s. Server:', array($i++)));?> <?php p(' '.$_['serverConfigurationHosts'][$prefix]); ?></option>
10 10
 			<?php
11
-		}
12
-		?>
11
+        }
12
+        ?>
13 13
 		</select>
14 14
 		<button type="button" id="ldap_action_add_configuration"
15 15
 			name="ldap_action_add_configuration" class="icon-add icon-default-style"
Please login to merge, or discard this patch.