Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
better_formats
Commits
a97f37b4
Commit
a97f37b4
authored
Mar 17, 2009
by
dragonwize
Browse files
Fixed #404484: Missing t()'s
parent
5d9cac71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
better-formats-defaults-admin-form.tpl.php
better-formats-defaults-admin-form.tpl.php
+2
-2
better_formats_defaults.admin.inc
better_formats_defaults.admin.inc
+2
-4
No files found.
better-formats-defaults-admin-form.tpl.php
View file @
a97f37b4
...
...
@@ -23,7 +23,7 @@
?>
<div
class=
"description"
>
<?php
print
t
(
'Only formats that a role has permission to use are shown.'
);
?>
</div>
<fieldset>
<legend><strong>
Node Defaults
</strong></legend>
<legend><strong>
<?php
print
t
(
'
Node Defaults
'
);
?>
</strong></legend>
<table
id=
"node-format-defaults"
>
<thead>
<tr>
...
...
@@ -47,7 +47,7 @@
</fieldset>
<fieldset>
<legend><strong>
Comment Defaults
</strong></legend>
<legend><strong>
<?php
print
t
(
'
Comment Defaults
'
);
?>
</strong></legend>
<table
id=
"comment-format-defaults"
>
<thead>
<tr>
...
...
better_formats_defaults.admin.inc
View file @
a97f37b4
...
...
@@ -151,14 +151,12 @@ function better_formats_get_role_default_fields($mode, $node_type = '') {
* by Drupal core's format permissions set at
* admin/settings/filters/[filter_id].
*
* @param $default_title
* Allows configuration of the label of the default seletion.
* @return
* Multi-dim array with role IDs for keys and list of allowed formats.
*
* @see better_formats_get_role_default_fields()
*/
function
better_formats_get_formats_per_role
(
$default_title
=
'Site'
)
{
function
better_formats_get_formats_per_role
()
{
$formats
=
filter_formats
();
$roles
=
user_roles
();
...
...
@@ -170,7 +168,7 @@ function better_formats_get_formats_per_role($default_title = 'Site') {
foreach
(
$formats
as
$format
)
{
$roles_allowed
=
$format
->
roles
?
explode
(
','
,
trim
(
$format
->
roles
,
','
))
:
array
();
foreach
(
$roles
as
$rid
=>
$role
)
{
$format_options
[
$rid
][
0
]
=
$default_title
.
'
default'
;
$format_options
[
$rid
][
0
]
=
t
(
'Site
default'
)
;
if
(
$format
->
format
==
$site_default_format
||
in_array
(
$rid
,
$admin_roles
)
||
in_array
(
$rid
,
$roles_allowed
))
{
$format_options
[
$rid
][
$format
->
format
]
=
$format
->
name
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment