@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | protected function execute(InputInterface $input, OutputInterface $output) { |
74 | - $groups = $this->groupManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset')); |
|
74 | + $groups = $this->groupManager->search('', (int) $input->getOption('limit'), (int) $input->getOption('offset')); |
|
75 | 75 | $this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups)); |
76 | 76 | } |
77 | 77 | |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | * @return array |
81 | 81 | */ |
82 | 82 | private function formatGroups(array $groups) { |
83 | - $keys = array_map(function (IGroup $group) { |
|
83 | + $keys = array_map(function(IGroup $group) { |
|
84 | 84 | return $group->getGID(); |
85 | 85 | }, $groups); |
86 | - $values = array_map(function (IGroup $group) { |
|
86 | + $values = array_map(function(IGroup $group) { |
|
87 | 87 | return array_keys($group->getUsers()); |
88 | 88 | }, $groups); |
89 | 89 | return array_combine($keys, $values); |
@@ -1,35 +1,35 @@ |
||
1 | 1 | <div class="quota"> |
2 | 2 | <!-- Default storage --> |
3 | - <span><?php p($l->t('Default quota'));?></span> |
|
4 | - <?php if((bool) $_['isAdmin']): ?> |
|
3 | + <span><?php p($l->t('Default quota')); ?></span> |
|
4 | + <?php if ((bool) $_['isAdmin']): ?> |
|
5 | 5 | <select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-tipsy-gravity="s"> |
6 | - <option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'> |
|
7 | - <?php p($l->t('Unlimited'));?> |
|
6 | + <option <?php if ($_['default_quota'] === 'none') print_unescaped('selected="selected"'); ?> value='none'> |
|
7 | + <?php p($l->t('Unlimited')); ?> |
|
8 | 8 | </option> |
9 | - <?php foreach($_['quota_preset'] as $preset):?> |
|
10 | - <?php if($preset !== 'default'):?> |
|
11 | - <option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'> |
|
12 | - <?php p($preset);?> |
|
9 | + <?php foreach ($_['quota_preset'] as $preset):?> |
|
10 | + <?php if ($preset !== 'default'):?> |
|
11 | + <option <?php if ($_['default_quota'] == $preset) print_unescaped('selected="selected"'); ?> value='<?php p($preset); ?>'> |
|
12 | + <?php p($preset); ?> |
|
13 | 13 | </option> |
14 | - <?php endif;?> |
|
15 | - <?php endforeach;?> |
|
16 | - <?php if($_['defaultQuotaIsUserDefined']):?> |
|
17 | - <option selected="selected" value='<?php p($_['default_quota']);?>'> |
|
18 | - <?php p($_['default_quota']);?> |
|
14 | + <?php endif; ?> |
|
15 | + <?php endforeach; ?> |
|
16 | + <?php if ($_['defaultQuotaIsUserDefined']):?> |
|
17 | + <option selected="selected" value='<?php p($_['default_quota']); ?>'> |
|
18 | + <?php p($_['default_quota']); ?> |
|
19 | 19 | </option> |
20 | - <?php endif;?> |
|
20 | + <?php endif; ?> |
|
21 | 21 | <option data-new value='other'> |
22 | - <?php p($l->t('Other'));?> |
|
22 | + <?php p($l->t('Other')); ?> |
|
23 | 23 | ... |
24 | 24 | </option> |
25 | 25 | </select> |
26 | 26 | <?php endif; ?> |
27 | - <?php if((bool) !$_['isAdmin']): ?> |
|
27 | + <?php if ((bool) !$_['isAdmin']): ?> |
|
28 | 28 | : |
29 | - <?php if( $_['default_quota'] === 'none'): ?> |
|
30 | - <?php p($l->t('Unlimited'));?> |
|
29 | + <?php if ($_['default_quota'] === 'none'): ?> |
|
30 | + <?php p($l->t('Unlimited')); ?> |
|
31 | 31 | <?php else: ?> |
32 | - <?php p($_['default_quota']);?> |
|
32 | + <?php p($_['default_quota']); ?> |
|
33 | 33 | <?php endif; ?> |
34 | 34 | <?php endif; ?> |
35 | 35 | </div> |
@@ -100,15 +100,15 @@ discard block |
||
100 | 100 | * @return DataResponse |
101 | 101 | */ |
102 | 102 | public function create($id) { |
103 | - if($this->groupManager->groupExists($id)) { |
|
103 | + if ($this->groupManager->groupExists($id)) { |
|
104 | 104 | return new DataResponse( |
105 | 105 | array( |
106 | - 'message' => (string)$this->l10n->t('Group already exists.') |
|
106 | + 'message' => (string) $this->l10n->t('Group already exists.') |
|
107 | 107 | ), |
108 | 108 | Http::STATUS_CONFLICT |
109 | 109 | ); |
110 | 110 | } |
111 | - if($this->groupManager->createGroup($id)) { |
|
111 | + if ($this->groupManager->createGroup($id)) { |
|
112 | 112 | return new DataResponse( |
113 | 113 | array( |
114 | 114 | 'groupname' => $id |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | array( |
122 | 122 | 'status' => 'error', |
123 | 123 | 'data' => array( |
124 | - 'message' => (string)$this->l10n->t('Unable to add group.') |
|
124 | + 'message' => (string) $this->l10n->t('Unable to add group.') |
|
125 | 125 | ) |
126 | 126 | ), |
127 | 127 | Http::STATUS_FORBIDDEN |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | array( |
153 | 153 | 'status' => 'error', |
154 | 154 | 'data' => array( |
155 | - 'message' => (string)$this->l10n->t('Unable to delete group.') |
|
155 | + 'message' => (string) $this->l10n->t('Unable to delete group.') |
|
156 | 156 | ), |
157 | 157 | ), |
158 | 158 | Http::STATUS_FORBIDDEN |
@@ -31,28 +31,28 @@ |
||
31 | 31 | OC_Util::checkLoggedIn(); |
32 | 32 | |
33 | 33 | // Load the files we need |
34 | -OC_Util::addStyle( "settings", "settings" ); |
|
34 | +OC_Util::addStyle("settings", "settings"); |
|
35 | 35 | \OC::$server->getNavigationManager()->setActiveEntry('help'); |
36 | 36 | |
37 | 37 | |
38 | -if(isset($_GET['mode']) and $_GET['mode'] === 'admin') { |
|
39 | - $url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' ); |
|
40 | - $style1=''; |
|
41 | - $style2=' active'; |
|
42 | -}else{ |
|
43 | - $url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' ); |
|
44 | - $style1=' active'; |
|
45 | - $style2=''; |
|
38 | +if (isset($_GET['mode']) and $_GET['mode'] === 'admin') { |
|
39 | + $url = \OCP\Util::linkToAbsolute('core', 'doc/admin/index.html'); |
|
40 | + $style1 = ''; |
|
41 | + $style2 = ' active'; |
|
42 | +} else { |
|
43 | + $url = \OCP\Util::linkToAbsolute('core', 'doc/user/index.html'); |
|
44 | + $style1 = ' active'; |
|
45 | + $style2 = ''; |
|
46 | 46 | } |
47 | 47 | |
48 | -$url1=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=user'; |
|
49 | -$url2=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=admin'; |
|
48 | +$url1 = \OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=user'; |
|
49 | +$url2 = \OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=admin'; |
|
50 | 50 | |
51 | -$tmpl = new OC_Template( "settings", "help", "user" ); |
|
52 | -$tmpl->assign( "admin", OC_User::isAdminUser(OC_User::getUser())); |
|
53 | -$tmpl->assign( "url", $url ); |
|
54 | -$tmpl->assign( "url1", $url1 ); |
|
55 | -$tmpl->assign( "url2", $url2 ); |
|
56 | -$tmpl->assign( "style1", $style1 ); |
|
57 | -$tmpl->assign( "style2", $style2 ); |
|
51 | +$tmpl = new OC_Template("settings", "help", "user"); |
|
52 | +$tmpl->assign("admin", OC_User::isAdminUser(OC_User::getUser())); |
|
53 | +$tmpl->assign("url", $url); |
|
54 | +$tmpl->assign("url1", $url1); |
|
55 | +$tmpl->assign("url2", $url2); |
|
56 | +$tmpl->assign("style1", $style1); |
|
57 | +$tmpl->assign("style2", $style2); |
|
58 | 58 | $tmpl->printPage(); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * @param string $msg the error message |
38 | 38 | * @since 7.0.0 |
39 | 39 | */ |
40 | - public function __construct($msg){ |
|
40 | + public function __construct($msg) { |
|
41 | 41 | parent::__construct($msg); |
42 | 42 | } |
43 | 43 |
@@ -197,7 +197,7 @@ |
||
197 | 197 | protected function setSubjects(IEvent $event, $subject, array $parameters) { |
198 | 198 | $placeholders = $replacements = []; |
199 | 199 | foreach ($parameters as $placeholder => $parameter) { |
200 | - $placeholders[] = '{' . $placeholder . '}'; |
|
200 | + $placeholders[] = '{'.$placeholder.'}'; |
|
201 | 201 | if ($parameter['type'] === 'file') { |
202 | 202 | $replacements[] = $parameter['path']; |
203 | 203 | } else { |
@@ -68,7 +68,7 @@ |
||
68 | 68 | try { |
69 | 69 | $mount = $this->globalService->getStorage($mountId); |
70 | 70 | } catch (NotFoundException $e) { |
71 | - $output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>'); |
|
71 | + $output->writeln('<error>Mount with id "'.$mountId.' not found, check "occ files_external:list" to get available mounts"</error>'); |
|
72 | 72 | return 404; |
73 | 73 | } |
74 | 74 |
@@ -117,7 +117,7 @@ |
||
117 | 117 | \OC_Util::setupFS($user); |
118 | 118 | |
119 | 119 | // Check if this user has a trashbin directory |
120 | - $view = new \OC\Files\View('/' . $user); |
|
120 | + $view = new \OC\Files\View('/'.$user); |
|
121 | 121 | if (!$view->is_dir('/files_trashbin/files')) { |
122 | 122 | return false; |
123 | 123 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | <tr> |
18 | 18 | <th id='headerName' class="hidden column-name"> |
19 | 19 | <div id="headerName-container"> |
20 | - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> |
|
20 | + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> |
|
21 | 21 | </div> |
22 | 22 | </th> |
23 | 23 | <th id="headerBackend" class="hidden column-backend"> |