Completed
Push — stable13 ( 4e87d5...f6a732 )
by
unknown
25:04 queued 12:21
created
apps/files/lib/BackgroundJob/ScanFiles.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -36,80 +36,80 @@
 block discarded – undo
36 36
  * @package OCA\Files\BackgroundJob
37 37
  */
38 38
 class ScanFiles extends \OC\BackgroundJob\TimedJob {
39
-	/** @var IConfig */
40
-	private $config;
41
-	/** @var IUserManager */
42
-	private $userManager;
43
-	/** @var IDBConnection */
44
-	private $dbConnection;
45
-	/** @var ILogger */
46
-	private $logger;
47
-	/** Amount of users that should get scanned per execution */
48
-	const USERS_PER_SESSION = 500;
39
+    /** @var IConfig */
40
+    private $config;
41
+    /** @var IUserManager */
42
+    private $userManager;
43
+    /** @var IDBConnection */
44
+    private $dbConnection;
45
+    /** @var ILogger */
46
+    private $logger;
47
+    /** Amount of users that should get scanned per execution */
48
+    const USERS_PER_SESSION = 500;
49 49
 
50
-	/**
51
-	 * @param IConfig|null $config
52
-	 * @param IUserManager|null $userManager
53
-	 * @param IDBConnection|null $dbConnection
54
-	 * @param ILogger|null $logger
55
-	 */
56
-	public function __construct(IConfig $config = null,
57
-								IUserManager $userManager = null,
58
-								IDBConnection $dbConnection = null,
59
-								ILogger $logger = null) {
60
-		// Run once per 10 minutes
61
-		$this->setInterval(60 * 10);
50
+    /**
51
+     * @param IConfig|null $config
52
+     * @param IUserManager|null $userManager
53
+     * @param IDBConnection|null $dbConnection
54
+     * @param ILogger|null $logger
55
+     */
56
+    public function __construct(IConfig $config = null,
57
+                                IUserManager $userManager = null,
58
+                                IDBConnection $dbConnection = null,
59
+                                ILogger $logger = null) {
60
+        // Run once per 10 minutes
61
+        $this->setInterval(60 * 10);
62 62
 
63
-		if (is_null($userManager) || is_null($config)) {
64
-			$this->fixDIForJobs();
65
-		} else {
66
-			$this->config = $config;
67
-			$this->userManager = $userManager;
68
-			$this->logger = $logger;
69
-		}
70
-	}
63
+        if (is_null($userManager) || is_null($config)) {
64
+            $this->fixDIForJobs();
65
+        } else {
66
+            $this->config = $config;
67
+            $this->userManager = $userManager;
68
+            $this->logger = $logger;
69
+        }
70
+    }
71 71
 
72
-	protected function fixDIForJobs() {
73
-		$this->config = \OC::$server->getConfig();
74
-		$this->userManager = \OC::$server->getUserManager();
75
-		$this->logger = \OC::$server->getLogger();
76
-	}
72
+    protected function fixDIForJobs() {
73
+        $this->config = \OC::$server->getConfig();
74
+        $this->userManager = \OC::$server->getUserManager();
75
+        $this->logger = \OC::$server->getLogger();
76
+    }
77 77
 
78
-	/**
79
-	 * @param IUser $user
80
-	 */
81
-	protected function runScanner(IUser $user) {
82
-		try {
83
-			$scanner = new Scanner(
84
-					$user->getUID(),
85
-					$this->dbConnection,
86
-					$this->logger
87
-			);
88
-			$scanner->backgroundScan('');
89
-		} catch (\Exception $e) {
90
-			$this->logger->logException($e, ['app' => 'files']);
91
-		}
92
-		\OC_Util::tearDownFS();
93
-	}
78
+    /**
79
+     * @param IUser $user
80
+     */
81
+    protected function runScanner(IUser $user) {
82
+        try {
83
+            $scanner = new Scanner(
84
+                    $user->getUID(),
85
+                    $this->dbConnection,
86
+                    $this->logger
87
+            );
88
+            $scanner->backgroundScan('');
89
+        } catch (\Exception $e) {
90
+            $this->logger->logException($e, ['app' => 'files']);
91
+        }
92
+        \OC_Util::tearDownFS();
93
+    }
94 94
 
95
-	/**
96
-	 * @param $argument
97
-	 * @throws \Exception
98
-	 */
99
-	protected function run($argument) {
100
-		$offset = $this->config->getAppValue('files', 'cronjob_scan_files', 0);
101
-		$users = $this->userManager->search('', self::USERS_PER_SESSION, $offset);
102
-		if (!count($users)) {
103
-			// No users found, reset offset and retry
104
-			$offset = 0;
105
-			$users = $this->userManager->search('', self::USERS_PER_SESSION);
106
-		}
95
+    /**
96
+     * @param $argument
97
+     * @throws \Exception
98
+     */
99
+    protected function run($argument) {
100
+        $offset = $this->config->getAppValue('files', 'cronjob_scan_files', 0);
101
+        $users = $this->userManager->search('', self::USERS_PER_SESSION, $offset);
102
+        if (!count($users)) {
103
+            // No users found, reset offset and retry
104
+            $offset = 0;
105
+            $users = $this->userManager->search('', self::USERS_PER_SESSION);
106
+        }
107 107
 
108
-		$offset += self::USERS_PER_SESSION;
109
-		$this->config->setAppValue('files', 'cronjob_scan_files', $offset);
108
+        $offset += self::USERS_PER_SESSION;
109
+        $this->config->setAppValue('files', 'cronjob_scan_files', $offset);
110 110
 
111
-		foreach ($users as $user) {
112
-			$this->runScanner($user);
113
-		}
114
-	}
111
+        foreach ($users as $user) {
112
+            $this->runScanner($user);
113
+        }
114
+    }
115 115
 }
Please login to merge, or discard this patch.
apps/files/lib/Settings/Admin.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 		$maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size));
56 56
 
57 57
 		$parameters = [
58
-			'uploadChangable'              => (($htaccessWorking and $htaccessWritable) or $userIniWritable ),
58
+			'uploadChangable'              => (($htaccessWorking and $htaccessWritable) or $userIniWritable),
59 59
 			'uploadMaxFilesize'            => $maxUploadFilesize,
60 60
 			// max possible makes only sense on a 32 bit system
61 61
 			'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4,
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -31,56 +31,56 @@
 block discarded – undo
31 31
 
32 32
 class Admin implements ISettings {
33 33
 
34
-	/** @var IniGetWrapper */
35
-	private $iniWrapper;
34
+    /** @var IniGetWrapper */
35
+    private $iniWrapper;
36 36
 
37
-	/** @var IRequest */
38
-	private $request;
37
+    /** @var IRequest */
38
+    private $request;
39 39
 
40
-	public function __construct(IniGetWrapper $iniWrapper, IRequest $request) {
41
-		$this->iniWrapper = $iniWrapper;
42
-		$this->request = $request;
43
-	}
40
+    public function __construct(IniGetWrapper $iniWrapper, IRequest $request) {
41
+        $this->iniWrapper = $iniWrapper;
42
+        $this->request = $request;
43
+    }
44 44
 
45
-	/**
46
-	 * @return TemplateResponse
47
-	 */
48
-	public function getForm() {
49
-		$htaccessWorking  = (getenv('htaccessWorking') === 'true');
50
-		$htaccessWritable = is_writable(\OC::$SERVERROOT.'/.htaccess');
51
-		$userIniWritable  = is_writable(\OC::$SERVERROOT.'/.user.ini');
45
+    /**
46
+     * @return TemplateResponse
47
+     */
48
+    public function getForm() {
49
+        $htaccessWorking  = (getenv('htaccessWorking') === 'true');
50
+        $htaccessWritable = is_writable(\OC::$SERVERROOT.'/.htaccess');
51
+        $userIniWritable  = is_writable(\OC::$SERVERROOT.'/.user.ini');
52 52
 
53
-		$upload_max_filesize = $this->iniWrapper->getBytes('upload_max_filesize');
54
-		$post_max_size = $this->iniWrapper->getBytes('post_max_size');
55
-		$maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size));
53
+        $upload_max_filesize = $this->iniWrapper->getBytes('upload_max_filesize');
54
+        $post_max_size = $this->iniWrapper->getBytes('post_max_size');
55
+        $maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size));
56 56
 
57
-		$parameters = [
58
-			'uploadChangable'              => (($htaccessWorking and $htaccessWritable) or $userIniWritable ),
59
-			'uploadMaxFilesize'            => $maxUploadFilesize,
60
-			// max possible makes only sense on a 32 bit system
61
-			'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4,
62
-			'maxPossibleUploadSize'        => Util::humanFileSize(PHP_INT_MAX),
63
-		];
57
+        $parameters = [
58
+            'uploadChangable'              => (($htaccessWorking and $htaccessWritable) or $userIniWritable ),
59
+            'uploadMaxFilesize'            => $maxUploadFilesize,
60
+            // max possible makes only sense on a 32 bit system
61
+            'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4,
62
+            'maxPossibleUploadSize'        => Util::humanFileSize(PHP_INT_MAX),
63
+        ];
64 64
 
65
-		return new TemplateResponse('files', 'admin', $parameters, '');
66
-	}
65
+        return new TemplateResponse('files', 'admin', $parameters, '');
66
+    }
67 67
 
68
-	/**
69
-	 * @return string the section ID, e.g. 'sharing'
70
-	 */
71
-	public function getSection() {
72
-		return 'additional';
73
-	}
68
+    /**
69
+     * @return string the section ID, e.g. 'sharing'
70
+     */
71
+    public function getSection() {
72
+        return 'additional';
73
+    }
74 74
 
75
-	/**
76
-	 * @return int whether the form should be rather on the top or bottom of
77
-	 * the admin section. The forms are arranged in ascending order of the
78
-	 * priority values. It is required to return a value between 0 and 100.
79
-	 *
80
-	 * E.g.: 70
81
-	 */
82
-	public function getPriority() {
83
-		return 5;
84
-	}
75
+    /**
76
+     * @return int whether the form should be rather on the top or bottom of
77
+     * the admin section. The forms are arranged in ascending order of the
78
+     * priority values. It is required to return a value between 0 and 100.
79
+     *
80
+     * E.g.: 70
81
+     */
82
+    public function getPriority() {
83
+        return 5;
84
+    }
85 85
 
86 86
 }
Please login to merge, or discard this patch.
apps/files/download.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
 $filename = $_GET["file"];
31 31
 
32 32
 if(!\OC\Files\Filesystem::file_exists($filename)) {
33
-	header("HTTP/1.0 404 Not Found");
34
-	$tmpl = new OCP\Template( '', '404', 'guest' );
35
-	$tmpl->assign('file', $filename);
36
-	$tmpl->printPage();
37
-	exit;
33
+    header("HTTP/1.0 404 Not Found");
34
+    $tmpl = new OCP\Template( '', '404', 'guest' );
35
+    $tmpl->assign('file', $filename);
36
+    $tmpl->printPage();
37
+    exit;
38 38
 }
39 39
 
40 40
 $ftype=\OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType( $filename ));
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 
30 30
 $filename = $_GET["file"];
31 31
 
32
-if(!\OC\Files\Filesystem::file_exists($filename)) {
32
+if (!\OC\Files\Filesystem::file_exists($filename)) {
33 33
 	header("HTTP/1.0 404 Not Found");
34
-	$tmpl = new OCP\Template( '', '404', 'guest' );
34
+	$tmpl = new OCP\Template('', '404', 'guest');
35 35
 	$tmpl->assign('file', $filename);
36 36
 	$tmpl->printPage();
37 37
 	exit;
38 38
 }
39 39
 
40
-$ftype=\OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType( $filename ));
40
+$ftype = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename));
41 41
 
42 42
 header('Content-Type:'.$ftype);
43 43
 OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
@@ -45,4 +45,4 @@  discard block
 block discarded – undo
45 45
 OCP\Response::setContentLengthHeader(\OC\Files\Filesystem::filesize($filename));
46 46
 
47 47
 OC_Util::obEnd();
48
-\OC\Files\Filesystem::readfile( $filename );
48
+\OC\Files\Filesystem::readfile($filename);
Please login to merge, or discard this patch.
apps/files/appinfo/routes.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -29,60 +29,60 @@
 block discarded – undo
29 29
 
30 30
 $application = new Application();
31 31
 $application->registerRoutes(
32
-	$this,
33
-	array(
34
-		'routes' => array(
35
-			array(
36
-				'name' => 'API#getThumbnail',
37
-				'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
38
-				'verb' => 'GET',
39
-				'requirements' => array('file' => '.+')
40
-			),
41
-			array(
42
-				'name' => 'API#updateFileTags',
43
-				'url' => '/api/v1/files/{path}',
44
-				'verb' => 'POST',
45
-				'requirements' => array('path' => '.+'),
46
-			),
47
-			array(
48
-				'name' => 'API#getRecentFiles',
49
-				'url' => '/api/v1/recent/',
50
-				'verb' => 'GET'
51
-			),
52
-			array(
53
-				'name' => 'API#updateFileSorting',
54
-				'url' => '/api/v1/sorting',
55
-				'verb' => 'POST'
56
-			),
57
-			array(
58
-				'name' => 'API#showHiddenFiles',
59
-				'url' => '/api/v1/showhidden',
60
-				'verb' => 'POST'
61
-			),
62
-			[
63
-				'name' => 'view#index',
64
-				'url' => '/',
65
-				'verb' => 'GET',
66
-			],
67
-			[
68
-				'name' => 'settings#setMaxUploadSize',
69
-				'url' => '/settings/maxUpload',
70
-				'verb' => 'POST',
71
-			]
72
-		)
73
-	)
32
+    $this,
33
+    array(
34
+        'routes' => array(
35
+            array(
36
+                'name' => 'API#getThumbnail',
37
+                'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
38
+                'verb' => 'GET',
39
+                'requirements' => array('file' => '.+')
40
+            ),
41
+            array(
42
+                'name' => 'API#updateFileTags',
43
+                'url' => '/api/v1/files/{path}',
44
+                'verb' => 'POST',
45
+                'requirements' => array('path' => '.+'),
46
+            ),
47
+            array(
48
+                'name' => 'API#getRecentFiles',
49
+                'url' => '/api/v1/recent/',
50
+                'verb' => 'GET'
51
+            ),
52
+            array(
53
+                'name' => 'API#updateFileSorting',
54
+                'url' => '/api/v1/sorting',
55
+                'verb' => 'POST'
56
+            ),
57
+            array(
58
+                'name' => 'API#showHiddenFiles',
59
+                'url' => '/api/v1/showhidden',
60
+                'verb' => 'POST'
61
+            ),
62
+            [
63
+                'name' => 'view#index',
64
+                'url' => '/',
65
+                'verb' => 'GET',
66
+            ],
67
+            [
68
+                'name' => 'settings#setMaxUploadSize',
69
+                'url' => '/settings/maxUpload',
70
+                'verb' => 'POST',
71
+            ]
72
+        )
73
+    )
74 74
 );
75 75
 
76 76
 /** @var $this \OC\Route\Router */
77 77
 
78 78
 $this->create('files_ajax_download', 'ajax/download.php')
79
-	->actionInclude('files/ajax/download.php');
79
+    ->actionInclude('files/ajax/download.php');
80 80
 $this->create('files_ajax_getstoragestats', 'ajax/getstoragestats.php')
81
-	->actionInclude('files/ajax/getstoragestats.php');
81
+    ->actionInclude('files/ajax/getstoragestats.php');
82 82
 $this->create('files_ajax_list', 'ajax/list.php')
83
-	->actionInclude('files/ajax/list.php');
83
+    ->actionInclude('files/ajax/list.php');
84 84
 
85 85
 $this->create('download', 'download{file}')
86
-	->requirements(array('file' => '.*'))
87
-	->actionInclude('files/download.php');
86
+    ->requirements(array('file' => '.*'))
87
+    ->actionInclude('files/download.php');
88 88
 
Please login to merge, or discard this patch.
apps/files/appinfo/app.php 2 patches
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.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,23 +39,23 @@
 block discarded – undo
39 39
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
40 40
 
41 41
 \OCA\Files\App::getNavigationManager()->add(function () use ($l) {
42
-	return [
43
-		'id' => 'files',
44
-		'appname' => 'files',
45
-		'script' => 'list.php',
46
-		'order' => 0,
47
-		'name' => $l->t('All files'),
48
-	];
42
+    return [
43
+        'id' => 'files',
44
+        'appname' => 'files',
45
+        'script' => 'list.php',
46
+        'order' => 0,
47
+        'name' => $l->t('All files'),
48
+    ];
49 49
 });
50 50
 
51 51
 \OCA\Files\App::getNavigationManager()->add(function () use ($l) {
52
-	return [
53
-		'id' => 'recent',
54
-		'appname' => 'files',
55
-		'script' => 'recentlist.php',
56
-		'order' => 2,
57
-		'name' => $l->t('Recent'),
58
-	];
52
+    return [
53
+        'id' => 'recent',
54
+        'appname' => 'files',
55
+        'script' => 'recentlist.php',
56
+        'order' => 2,
57
+        'name' => $l->t('Recent'),
58
+    ];
59 59
 });
60 60
 
61 61
 \OCP\Util::connectHook('\OCP\Config', 'js', '\OCA\Files\App', 'extendJsConfig');
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 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,16 +34,16 @@
 block discarded – undo
34 34
 $subject = (string)$_POST['ldap_clear_mapping'];
35 35
 $mapping = null;
36 36
 if($subject === 'user') {
37
-	$mapping = new UserMapping(\OC::$server->getDatabaseConnection());
37
+    $mapping = new UserMapping(\OC::$server->getDatabaseConnection());
38 38
 } else if($subject === 'group') {
39
-	$mapping = new GroupMapping(\OC::$server->getDatabaseConnection());
39
+    $mapping = new GroupMapping(\OC::$server->getDatabaseConnection());
40 40
 }
41 41
 try {
42
-	if(is_null($mapping) || !$mapping->clear()) {
43
-		$l = \OC::$server->getL10N('user_ldap');
44
-		throw new \Exception($l->t('Failed to clear the mappings.'));
45
-	}
46
-	OCP\JSON::success();
42
+    if(is_null($mapping) || !$mapping->clear()) {
43
+        $l = \OC::$server->getL10N('user_ldap');
44
+        throw new \Exception($l->t('Failed to clear the mappings.'));
45
+    }
46
+    OCP\JSON::success();
47 47
 } catch (\Exception $e) {
48
-	OCP\JSON::error(array('message' => $e->getMessage()));
48
+    OCP\JSON::error(array('message' => $e->getMessage()));
49 49
 }
Please login to merge, or discard this 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 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
35 35
 $configuration = $connection->getConfiguration();
36 36
 if (isset($configuration['ldap_agent_password']) && $configuration['ldap_agent_password'] !== '') {
37
-	// hide password
38
-	$configuration['ldap_agent_password'] = '**PASSWORD SET**';
37
+    // hide password
38
+    $configuration['ldap_agent_password'] = '**PASSWORD SET**';
39 39
 }
40 40
 OCP\JSON::success(array('configuration' => $configuration));
Please login to merge, or discard this 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 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@
 block discarded – undo
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
-				  'ldap_turn_off_cert_check');
39
+                    'ldap_turn_off_cert_check');
40 40
 foreach($chkboxes as $boxid) {
41
-	if(!isset($_POST[$boxid])) {
42
-		$_POST[$boxid] = 0;
43
-	}
41
+    if(!isset($_POST[$boxid])) {
42
+        $_POST[$boxid] = 0;
43
+    }
44 44
 }
45 45
 
46 46
 $ldapWrapper = new OCA\User_LDAP\LDAP();
Please login to merge, or discard this 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.