summaryrefslogtreecommitdiff
path: root/modules/contact
diff options
context:
space:
mode:
Diffstat (limited to 'modules/contact')
-rw-r--r--modules/contact/contact.install1
-rw-r--r--modules/contact/contact.pages.inc8
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/contact/contact.install b/modules/contact/contact.install
index ac245d586..42f15272d 100644
--- a/modules/contact/contact.install
+++ b/modules/contact/contact.install
@@ -25,6 +25,7 @@ function contact_schema() {
'not null' => TRUE,
'default' => '',
'description' => 'Category name.',
+ 'translatable' => TRUE,
),
'recipients' => array(
'type' => 'text',
diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc
index 2855bec83..fa5606448 100644
--- a/modules/contact/contact.pages.inc
+++ b/modules/contact/contact.pages.inc
@@ -24,7 +24,13 @@ function contact_site_form($form, &$form_state) {
}
// Get an array of the categories and the current default category.
- $categories = db_query("SELECT cid, category FROM {contact} ORDER BY weight, category")->fetchAllKeyed();
+ $categories = db_select('contact', 'c')
+ ->addTag('translatable')
+ ->fields('c', array('cid', 'category'))
+ ->orderBy('weight')
+ ->orderBy('category')
+ ->execute()
+ ->fetchAllKeyed();
$default_category = db_query("SELECT cid FROM {contact} WHERE selected = 1")->fetchField();
// If there are no categories, do not display the form.