Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
bbbe8c17
Commit
bbbe8c17
authored
Feb 26, 2010
by
Dries
Browse files
- Patch
#251482
by andypost, Dave Reid, hunvreus: contact categories can't be translated with i18n.
parent
f6b166ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/contact/contact.admin.inc
View file @
bbbe8c17
...
...
@@ -19,7 +19,13 @@ function contact_category_list() {
$rows
=
array
();
// Get all the contact categories from the database.
$categories
=
db_query
(
'SELECT cid, category, recipients, selected FROM {contact} ORDER BY weight, category'
)
->
fetchAll
();
$categories
=
db_select
(
'contact'
,
'c'
)
->
addTag
(
'translatable'
)
->
fields
(
'c'
,
array
(
'cid'
,
'category'
,
'recipients'
,
'selected'
))
->
orderBy
(
'weight'
)
->
orderBy
(
'category'
)
->
execute
()
->
fetchAll
();
// Loop through the categories and add them to the table.
foreach
(
$categories
as
$category
)
{
...
...
modules/contact/contact.module
View file @
bbbe8c17
...
...
@@ -159,7 +159,12 @@ function _contact_personal_tab_access(stdClass $account) {
* An array with the contact category's data.
*/
function
contact_load
(
$cid
)
{
return
db_query
(
"SELECT * FROM
{
contact
}
WHERE cid = :cid"
,
array
(
':cid'
=>
$cid
))
->
fetchAssoc
();
return
db_select
(
'contact'
,
'c'
)
->
addTag
(
'translatable'
)
->
fields
(
'c'
)
->
condition
(
'cid'
,
$cid
)
->
execute
()
->
fetchAssoc
();
}
/**
...
...
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