@@ -80,12 +80,12 @@ |
||
80 | 80 | $deletedEntries = 0; |
81 | 81 | |
82 | 82 | $query = $this->connection->getQueryBuilder(); |
83 | - $query->select('t1.' . $idCol) |
|
83 | + $query->select('t1.'.$idCol) |
|
84 | 84 | ->from($table, 't1') |
85 | 85 | ->where($query->expr()->eq($typeCol, $query->expr()->literal('files'))) |
86 | 86 | ->andWhere($query->expr()->isNull('t2.fileid')) |
87 | - ->leftJoin('t1', 'filecache', 't2', $query->expr()->eq($query->expr()->castColumn('t1.' . $idCol, IQueryBuilder::PARAM_INT), 't2.fileid')) |
|
88 | - ->groupBy('t1.' . $idCol) |
|
87 | + ->leftJoin('t1', 'filecache', 't2', $query->expr()->eq($query->expr()->castColumn('t1.'.$idCol, IQueryBuilder::PARAM_INT), 't2.fileid')) |
|
88 | + ->groupBy('t1.'.$idCol) |
|
89 | 89 | ->setMaxResults(self::CHUNK_SIZE); |
90 | 90 | |
91 | 91 | $deleteQuery = $this->connection->getQueryBuilder(); |
@@ -55,7 +55,7 @@ |
||
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, |
@@ -29,15 +29,15 @@ discard block |
||
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 |
||
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); |
@@ -38,7 +38,7 @@ discard block |
||
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 |
||
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', |
@@ -1,11 +1,11 @@ discard block |
||
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 |
||
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 |
||
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">></button><br/> |
36 | 36 | <button class="ldapGroupListDeselect" type="button"><</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 |
||
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> |
@@ -31,15 +31,15 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ |
||
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(); |
@@ -30,15 +30,15 @@ |
||
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 | } |
@@ -31,9 +31,9 @@ |
||
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'); |