diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-30 06:26:45 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-30 06:26:45 +0000 |
commit | 9fedd987820577ccac8c59909ccdc76a445121f3 (patch) | |
tree | 644a0f461cd208dc090b56d5064ecbe66eacd6e4 /modules | |
parent | e54f26518fcc0ea12189da11846fffd4e38a1c1f (diff) | |
download | brdo-9fedd987820577ccac8c59909ccdc76a445121f3.tar.gz brdo-9fedd987820577ccac8c59909ccdc76a445121f3.tar.bz2 |
#821560 by plach: Fixed Notices on the content administration page after removing a language.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.admin.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index d20f1983d..4214573b2 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -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(); |