Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
436df6b6
Commit
436df6b6
authored
12 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
enable translations for quota sizes 'none' and 'default'
parent
74d41b8b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
settings/templates/users.php
+19
-4
19 additions, 4 deletions
settings/templates/users.php
settings/users.php
+9
-3
9 additions, 3 deletions
settings/users.php
with
28 additions
and
7 deletions
settings/templates/users.php
+
19
−
4
View file @
436df6b6
...
...
@@ -36,6 +36,11 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<div
class=
"quota-select-wrapper"
>
<?php
if
((
bool
)
$_
[
'isadmin'
])
:
?>
<select
class=
'quota'
>
<option
<?php
if
(
$_
[
'default_quota'
]
==
'none'
)
echo
'selected="selected"'
;
?>
value=
'none'
>
<?php
echo
$l
->
t
(
'Unlimited'
);
?>
</option>
<?php
foreach
(
$_
[
'quota_preset'
]
as
$preset
)
:
?>
<?php
if
(
$preset
!=
'default'
)
:
?>
<option
...
...
@@ -45,7 +50,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
</option>
<?php
endif
;
?>
<?php
endforeach
;
?>
<?php
if
(
array_search
(
$_
[
'default_quota'
],
$_
[
'quota_preset'
])
===
false
)
:
?>
<?php
if
(
array_search
(
$_
[
'default_quota'
],
$_
[
'quota_preset'
])
===
false
&&
array_search
(
$_
[
'default_quota'
],
array
(
'none'
,
'default'
))
===
false
)
:
?>
<option
selected=
"selected"
value=
'
<?php
echo
$_
[
'default_quota'
];
?>
'
>
<?php
echo
$_
[
'default_quota'
];
?>
...
...
@@ -55,7 +60,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<?php
echo
$l
->
t
(
'Other'
);
?>
...
</option>
</select>
<input
class=
'quota-other'
></input
>
</select>
<input
class=
'quota-other'
/
>
<?php
endif
;
?>
<?php
if
((
bool
)
!
$_
[
'isadmin'
])
:
?>
<select
class=
'quota'
disabled=
"disabled"
>
...
...
@@ -122,6 +127,16 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<td
class=
"quota"
>
<div
class=
"quota-select-wrapper"
>
<select
class=
'quota-user'
>
<option
<?php
if
(
$user
[
'quota'
]
==
'default'
)
echo
'selected="selected"'
;
?>
value=
'default'
>
<?php
echo
$l
->
t
(
'Default'
);
?>
</option>
<option
<?php
if
(
$user
[
'quota'
]
==
'none'
)
echo
'selected="selected"'
;
?>
value=
'none'
>
<?php
echo
$l
->
t
(
'Unlimited'
);
?>
</option>
<?php
foreach
(
$_
[
'quota_preset'
]
as
$preset
)
:
?>
<option
<?php
if
(
$user
[
'quota'
]
==
$preset
)
echo
'selected="selected"'
;
?>
...
...
@@ -129,7 +144,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<?php
echo
$preset
;
?>
</option>
<?php
endforeach
;
?>
<?php
if
(
array_search
(
$user
[
'quota'
],
$_
[
'quota_preset'
])
===
false
)
:
?>
<?php
if
(
array_search
(
$user
[
'quota'
],
$_
[
'quota_preset'
])
===
false
&&
array_search
(
$user
[
'quota'
],
array
(
'none'
,
'default'
))
===
false
)
:
?>
<option
selected=
"selected"
value=
'
<?php
echo
$user
[
'quota'
];
?>
'
>
<?php
echo
$user
[
'quota'
];
?>
</option>
...
...
@@ -138,7 +153,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<?php
echo
$l
->
t
(
'Other'
);
?>
...
</option>
</select>
<input
class=
'quota-other'
></input
>
</select>
<input
class=
'quota-other'
/
>
</div>
</td>
<td
class=
"remove"
>
...
...
This diff is collapsed.
Click to expand it.
settings/users.php
+
9
−
3
View file @
436df6b6
...
...
@@ -30,10 +30,15 @@ if($isadmin) {
}
foreach
(
$accessibleusers
as
$i
)
{
$quota
=
OC_Preferences
::
getValue
(
$i
,
'files'
,
'quota'
,
'default'
);
// translation of old value 'none' to 'unlimited'
if
(
$quota
==
'none'
)
$quota
=
'unlimited'
;
$users
[]
=
array
(
"name"
=>
$i
,
"groups"
=>
join
(
", "
,
/*array_intersect(*/
OC_Group
::
getUserGroups
(
$i
)
/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/
),
'quota'
=>
OC_Preferences
::
getValue
(
$i
,
'files'
,
'quota'
,
'
D
efault'
),
'quota'
=>
OC_Preferences
::
getValue
(
$i
,
'files'
,
'quota'
,
'
d
efault'
),
'subadmin'
=>
implode
(
', '
,
OC_SubAdmin
::
getSubAdminsGroups
(
$i
)));
}
...
...
@@ -41,13 +46,14 @@ foreach( $accessiblegroups as $i ) {
// Do some more work here soon
$groups
[]
=
array
(
"name"
=>
$i
);
}
$quotaPreset
=
OC_Appconfig
::
getValue
(
'files'
,
'quota_preset'
,
'
Default, Unlimited,
1 GB, 5 GB, 10 GB'
);
$quotaPreset
=
OC_Appconfig
::
getValue
(
'files'
,
'quota_preset'
,
'1 GB, 5 GB, 10 GB'
);
$quotaPreset
=
explode
(
','
,
$quotaPreset
);
foreach
(
$quotaPreset
as
&
$preset
)
{
$preset
=
trim
(
$preset
);
}
$quotaPreset
=
array_diff
(
$quotaPreset
,
array
(
'default'
,
'none'
));
$defaultQuota
=
OC_Appconfig
::
getValue
(
'files'
,
'default_quota'
,
'
Unlimited
'
);
$defaultQuota
=
OC_Appconfig
::
getValue
(
'files'
,
'default_quota'
,
'
none
'
);
$tmpl
=
new
OC_Template
(
"settings"
,
"users"
,
"user"
);
$tmpl
->
assign
(
"users"
,
$users
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment