summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
index 0ff36a8..8038e2b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_locale_language.
+ */
+
+/**
* Field handler to translate a language into its readable form.
*
* @ingroup views_field_handlers
@@ -8,7 +13,7 @@
class views_handler_field_locale_language extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['native_language'] = array('default' => FALSE);
+ $options['native_language'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -24,8 +29,8 @@ class views_handler_field_locale_language extends views_handler_field {
}
function render($values) {
- $languages = locale_language_list(empty($this->$options['native_language']) ? 'name' : 'native');
+ $languages = locale_language_list(empty($this->options['native_language']) ? 'name' : 'native');
$value = $this->get_value($values);
- return isset($languages[$value]) ? $languages[$value]->name : '';
+ return isset($languages[$value]) ? $languages[$value] : '';
}
}