summaryrefslogtreecommitdiff
path: root/modules/translation
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-31 20:45:25 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-31 20:45:25 +0000
commit89fb32ac81de16fc285eb9f70a2e8723a124b2be (patch)
tree899701cfe69d2bc3c47e6748ee17c5a5c7a88c08 /modules/translation
parent98f287b55a88d06199cda88b6929af589c182e23 (diff)
downloadbrdo-89fb32ac81de16fc285eb9f70a2e8723a124b2be.tar.gz
brdo-89fb32ac81de16fc285eb9f70a2e8723a124b2be.tar.bz2
#1008628 by plach: Fixed Fatal error: Call to undefined function language_negotiation_get_switch_links() when using only one language
Diffstat (limited to 'modules/translation')
-rw-r--r--modules/translation/translation.pages.inc2
-rw-r--r--modules/translation/translation.test9
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/translation/translation.pages.inc b/modules/translation/translation.pages.inc
index 0343b49f4..c70d93898 100644
--- a/modules/translation/translation.pages.inc
+++ b/modules/translation/translation.pages.inc
@@ -13,6 +13,8 @@
* Node object.
*/
function translation_node_overview($node) {
+ include_once DRUPAL_ROOT . '/includes/language.inc';
+
if ($node->tnid) {
// Already part of a set, grab that set.
$tnid = $node->tnid;
diff --git a/modules/translation/translation.test b/modules/translation/translation.test
index 7f740d4ac..701e3dcfd 100644
--- a/modules/translation/translation.test
+++ b/modules/translation/translation.test
@@ -120,6 +120,15 @@ class TranslationTestCase extends DrupalWebTestCase {
$this->assertFieldByXPath('//select[@name="language"]//option', 'it', t('Italian (disabled) is available in language selection.'));
$translation_it = $this->createTranslation($node, $this->randomName(), $this->randomName(), 'it');
$this->assertRaw($translation_it->body['it'][0]['value'], t('Content created in Italian (disabled).'));
+
+ // Leave just one language enabled and check that the translation overview
+ // page is still accessible.
+ $this->drupalLogin($this->admin_user);
+ $edit = array('enabled[es]' => FALSE);
+ $this->drupalPost('admin/config/regional/language', $edit, t('Save configuration'));
+ $this->drupalLogin($this->translator);
+ $this->drupalGet('node/' . $node->nid . '/translate');
+ $this->assertRaw(t('Translations of %title', array('%title' => $node->title)), t('Translation overview page available with only one language enabled.'));
}
/**