Commit 9fedd987 authored by webchick's avatar webchick

#821560 by plach: Fixed Notices on the content administration page after removing a language.

parent e54f2651
......@@ -461,7 +461,7 @@ function node_admin_nodes() {
$destination = drupal_get_destination();
$options = array();
foreach ($nodes as $node) {
$l_options = $node->language != LANGUAGE_NONE ? array('language' => $languages[$node->language]) : array();
$l_options = $node->language != LANGUAGE_NONE && isset($languages[$node->language]) ? array('language' => $languages[$node->language]) : array();
$options[$node->nid] = array(
'title' => array(
'data' => array(
......@@ -478,7 +478,12 @@ function node_admin_nodes() {
'changed' => format_date($node->changed, 'short'),
);
if ($multilanguage) {
$options[$node->nid]['language'] = $node->language == LANGUAGE_NONE ? t('Language neutral') : t($languages[$node->language]->name);
if ($node->language == LANGUAGE_NONE || isset($languages[$node->language])) {
$options[$node->nid]['language'] = $node->language == LANGUAGE_NONE ? t('Language neutral') : t($languages[$node->language]->name);
}
else {
$options[$node->nid]['language'] = t('Undefined language (@langcode)', array('@langcode' => $node->language));
}
}
// Build a list of all the accessible operations for the current node.
$operations = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment