summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2012-01-24 21:42:56 (GMT)
committerDries2012-01-24 21:42:56 (GMT)
commite341d8ec6e0a2f15fbb4ec41ef76b0c427dec4d9 (patch)
treefa15995b0b9f7d7b05b9291229655cf8f8d9680d
parent39b1878c848ec94aa7aede62eb96f964a35a81af (diff)
- Patch #1408636 by swentel, c31ck: fixed fatal error when viewing unpublished nodes with the translator module enabled.
-rw-r--r--core/modules/translation/translation.module2
-rw-r--r--core/modules/translation/translation.test2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module
index e121f04..30ceee8 100644
--- a/core/modules/translation/translation.module
+++ b/core/modules/translation/translation.module
@@ -532,7 +532,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
else {
// No translation in this language, or no permission to view.
unset($links[$langcode]['href']);
- $links[$langcode]['attributes']['class'] = 'locale-untranslated';
+ $links[$langcode]['attributes']['class'][] = 'locale-untranslated';
}
}
}
diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test
index dd00734..cebe9a5 100644
--- a/core/modules/translation/translation.test
+++ b/core/modules/translation/translation.test
@@ -436,7 +436,7 @@ class TranslationTestCase extends DrupalWebTestCase {
$xpath = '//div[contains(@class, :type)]//a[@href=:url]';
}
else {
- $xpath = '//div[contains(@class, :type)]//span[@class="locale-untranslated"]';
+ $xpath = '//div[contains(@class, :type)]//span[contains(@class, "locale-untranslated")]';
}
$found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);