@@ -1,3 +1,3 @@ |
||
1 | 1 | <div class="section"> |
2 | - <p><?php include(__DIR__ . '/../settings.development.notice.php'); ?></p> |
|
2 | + <p><?php include(__DIR__.'/../settings.development.notice.php'); ?></p> |
|
3 | 3 | </div> |
@@ -26,8 +26,8 @@ |
||
26 | 26 | |
27 | 27 | ?> |
28 | 28 | |
29 | -<?php foreach($_['forms'] as $form) { |
|
29 | +<?php foreach ($_['forms'] as $form) { |
|
30 | 30 | if (isset($form['form'])) {?> |
31 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
31 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
32 | 32 | <?php } |
33 | 33 | };?> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | |
24 | 24 | style('settings', 'settings'); |
25 | -script('settings', [ 'settings', 'admin', 'log', 'certificates'] ); |
|
25 | +script('settings', ['settings', 'admin', 'log', 'certificates']); |
|
26 | 26 | script('core', ['multiselect', 'setupchecks']); |
27 | 27 | script('files', 'jquery.fileupload'); |
28 | 28 | |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | <div id="app-navigation"> |
32 | 32 | <ul> |
33 | 33 | <?php |
34 | - foreach($_['forms'] as $form) { |
|
34 | + foreach ($_['forms'] as $form) { |
|
35 | 35 | if (isset($form['anchor'])) { |
36 | 36 | $anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]); |
37 | - $class = 'nav-icon-' . $form['anchor']; |
|
37 | + $class = 'nav-icon-'.$form['anchor']; |
|
38 | 38 | $sectionName = $form['section-name']; |
39 | 39 | $active = $form['active'] ? ' class="active"' : ''; |
40 | 40 | ?> |
@@ -4,6 +4,6 @@ |
||
4 | 4 | * See the COPYING-README file. |
5 | 5 | */?> |
6 | 6 | |
7 | -<?php foreach($_['forms'] as $form) { |
|
7 | +<?php foreach ($_['forms'] as $form) { |
|
8 | 8 | print_unescaped($form); |
9 | 9 | }; |
@@ -1,15 +1,15 @@ discard block |
||
1 | -<table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']);?>"> |
|
1 | +<table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']); ?>"> |
|
2 | 2 | <thead> |
3 | 3 | <tr> |
4 | 4 | <th id="headerAvatar" scope="col"></th> |
5 | 5 | <th id="headerName" scope="col"><?php p($l->t('Username'))?></th> |
6 | - <th id="headerDisplayName" scope="col"><?php p($l->t( 'Full name' )); ?></th> |
|
7 | - <th id="headerPassword" scope="col"><?php p($l->t( 'Password' )); ?></th> |
|
8 | - <th class="mailAddress" scope="col"><?php p($l->t( 'Email' )); ?></th> |
|
9 | - <th id="headerGroups" scope="col"><?php p($l->t( 'Groups' )); ?></th> |
|
10 | - <?php if(is_array($_['subadmins']) || $_['subadmins']): ?> |
|
6 | + <th id="headerDisplayName" scope="col"><?php p($l->t('Full name')); ?></th> |
|
7 | + <th id="headerPassword" scope="col"><?php p($l->t('Password')); ?></th> |
|
8 | + <th class="mailAddress" scope="col"><?php p($l->t('Email')); ?></th> |
|
9 | + <th id="headerGroups" scope="col"><?php p($l->t('Groups')); ?></th> |
|
10 | + <?php if (is_array($_['subadmins']) || $_['subadmins']): ?> |
|
11 | 11 | <th id="headerSubAdmins" scope="col"><?php p($l->t('Group admin for')); ?></th> |
12 | - <?php endif;?> |
|
12 | + <?php endif; ?> |
|
13 | 13 | <th id="headerQuota" scope="col"><?php p($l->t('Quota')); ?></th> |
14 | 14 | <th class="storageLocation" scope="col"><?php p($l->t('Storage location')); ?></th> |
15 | 15 | <th class="userBackend" scope="col"><?php p($l->t('User backend')); ?></th> |
@@ -37,26 +37,26 @@ discard block |
||
37 | 37 | <td class="groups"><div class="groupsListContainer multiselect button" |
38 | 38 | ><span class="title groupsList"></span><span class="icon-triangle-s"></span></div> |
39 | 39 | </td> |
40 | - <?php if(is_array($_['subadmins']) || $_['subadmins']): ?> |
|
40 | + <?php if (is_array($_['subadmins']) || $_['subadmins']): ?> |
|
41 | 41 | <td class="subadmins"><div class="groupsListContainer multiselect button" |
42 | 42 | ><span class="title groupsList"></span><span class="icon-triangle-s"></span></div> |
43 | 43 | </td> |
44 | - <?php endif;?> |
|
44 | + <?php endif; ?> |
|
45 | 45 | <td class="quota"> |
46 | 46 | <select class="quota-user" data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>"> |
47 | 47 | <option value='default'> |
48 | - <?php p($l->t('Default'));?> |
|
48 | + <?php p($l->t('Default')); ?> |
|
49 | 49 | </option> |
50 | 50 | <option value='none'> |
51 | - <?php p($l->t('Unlimited'));?> |
|
51 | + <?php p($l->t('Unlimited')); ?> |
|
52 | 52 | </option> |
53 | - <?php foreach($_['quota_preset'] as $preset):?> |
|
54 | - <option value='<?php p($preset);?>'> |
|
55 | - <?php p($preset);?> |
|
53 | + <?php foreach ($_['quota_preset'] as $preset):?> |
|
54 | + <option value='<?php p($preset); ?>'> |
|
55 | + <?php p($preset); ?> |
|
56 | 56 | </option> |
57 | - <?php endforeach;?> |
|
57 | + <?php endforeach; ?> |
|
58 | 58 | <option value='other' data-new> |
59 | - <?php p($l->t('Other'));?> ... |
|
59 | + <?php p($l->t('Other')); ?> ... |
|
60 | 60 | </option> |
61 | 61 | </select> |
62 | 62 | </td> |
@@ -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> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | <div class="groups"><div class="groupsListContainer multiselect button" data-placeholder="<?php p($l->t('Groups'))?>"><span class="title groupsList"></span><span class="icon-triangle-s"></span></div></div> |
14 | 14 | <input type="submit" class="button" value="<?php p($l->t('Create'))?>" /> |
15 | 15 | </form> |
16 | - <?php if((bool)$_['recoveryAdminEnabled']): ?> |
|
16 | + <?php if ((bool) $_['recoveryAdminEnabled']): ?> |
|
17 | 17 | <div class="recoveryPassword"> |
18 | 18 | <input id="recoveryPassword" |
19 | 19 | type="password" |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <div id="app-navigation"> |
2 | 2 | <ul> |
3 | - <?php if($_['admin']) { ?> |
|
3 | + <?php if ($_['admin']) { ?> |
|
4 | 4 | <li> |
5 | 5 | <a class="<?php p($_['style1']); ?>" |
6 | 6 | href="<?php print_unescaped($_['url1']); ?>"> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | </a> |
27 | 27 | </li> |
28 | 28 | |
29 | - <?php if($_['admin']) { ?> |
|
29 | + <?php if ($_['admin']) { ?> |
|
30 | 30 | <li> |
31 | 31 | <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer"> |
32 | 32 | <?php p($l->t('Getting help')); ?> ↗ |
@@ -35,42 +35,42 @@ |
||
35 | 35 | $lastConfirm = (int) \OC::$server->getSession()->get('last-password-confirm'); |
36 | 36 | if ($lastConfirm < (time() - 30 * 60 + 15)) { // allow 15 seconds delay |
37 | 37 | $l = \OC::$server->getL10N('core'); |
38 | - OC_JSON::error(array( 'data' => array( 'message' => $l->t('Password confirmation is required')))); |
|
38 | + OC_JSON::error(array('data' => array('message' => $l->t('Password confirmation is required')))); |
|
39 | 39 | exit(); |
40 | 40 | } |
41 | 41 | |
42 | -$username = isset($_POST["username"]) ? (string)$_POST["username"] : ''; |
|
42 | +$username = isset($_POST["username"]) ? (string) $_POST["username"] : ''; |
|
43 | 43 | |
44 | 44 | $isUserAccessible = false; |
45 | 45 | $currentUserObject = \OC::$server->getUserSession()->getUser(); |
46 | 46 | $targetUserObject = \OC::$server->getUserManager()->get($username); |
47 | -if($targetUserObject !== null && $currentUserObject !== null) { |
|
47 | +if ($targetUserObject !== null && $currentUserObject !== null) { |
|
48 | 48 | $isUserAccessible = \OC::$server->getGroupManager()->getSubAdmin()->isUserAccessible($currentUserObject, $targetUserObject); |
49 | 49 | } |
50 | 50 | |
51 | -if(($username === '' && !OC_User::isAdminUser(OC_User::getUser())) |
|
51 | +if (($username === '' && !OC_User::isAdminUser(OC_User::getUser())) |
|
52 | 52 | || (!OC_User::isAdminUser(OC_User::getUser()) |
53 | 53 | && !$isUserAccessible)) { |
54 | 54 | $l = \OC::$server->getL10N('core'); |
55 | - OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); |
|
55 | + OC_JSON::error(array('data' => array('message' => $l->t('Authentication error')))); |
|
56 | 56 | exit(); |
57 | 57 | } |
58 | 58 | |
59 | 59 | //make sure the quota is in the expected format |
60 | -$quota= (string)$_POST["quota"]; |
|
61 | -if($quota !== 'none' and $quota !== 'default') { |
|
62 | - $quota= OC_Helper::computerFileSize($quota); |
|
63 | - $quota=OC_Helper::humanFileSize($quota); |
|
60 | +$quota = (string) $_POST["quota"]; |
|
61 | +if ($quota !== 'none' and $quota !== 'default') { |
|
62 | + $quota = OC_Helper::computerFileSize($quota); |
|
63 | + $quota = OC_Helper::humanFileSize($quota); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // Return Success story |
67 | -if($username) { |
|
67 | +if ($username) { |
|
68 | 68 | $targetUserObject->setQuota($quota); |
69 | -}else{//set the default quota when no username is specified |
|
70 | - if($quota === 'default') {//'default' as default quota makes no sense |
|
71 | - $quota='none'; |
|
69 | +} else {//set the default quota when no username is specified |
|
70 | + if ($quota === 'default') {//'default' as default quota makes no sense |
|
71 | + $quota = 'none'; |
|
72 | 72 | } |
73 | 73 | \OC::$server->getAppConfig()->setValue('files', 'default_quota', $quota); |
74 | 74 | } |
75 | -OC_JSON::success(array("data" => array( "username" => $username , 'quota' => $quota))); |
|
75 | +OC_JSON::success(array("data" => array("username" => $username, 'quota' => $quota))); |
|
76 | 76 |