diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-03 16:27:51 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-03 16:27:51 +0000 |
commit | b5cdf535f4a233cd4156e6c091e6aa1f3f28800a (patch) | |
tree | 4296ba0c85de99c4e0c7be62956aa046a60650cf | |
parent | 7aa0b54b78565a18dd11a04f34824d0909bdab4c (diff) | |
download | brdo-b5cdf535f4a233cd4156e6c091e6aa1f3f28800a.tar.gz brdo-b5cdf535f4a233cd4156e6c091e6aa1f3f28800a.tar.bz2 |
#156429 by GreenMother: kill notices if form ID does not exist
-rw-r--r-- | modules/locale/locale.module | 2 | ||||
-rw-r--r-- | modules/translation/translation.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index b06152bd0..2fc47a299 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -255,7 +255,7 @@ function locale_form_alter(&$form, $form_state, $form_id) { // Language field for nodes default: - if ($form['#id'] == 'node-form') { + if (isset($form['#id']) && $form['#id'] == 'node-form') { if (isset($form['#node']->type) && variable_get('language_' . $form['#node']->type, 0)) { $form['language'] = array( '#type' => 'select', diff --git a/modules/translation/translation.module b/modules/translation/translation.module index c4af9c0b8..4fe79fba9 100644 --- a/modules/translation/translation.module +++ b/modules/translation/translation.module @@ -92,7 +92,7 @@ function translation_form_alter(&$form, $form_state, $form_id) { // Description based on text from locale.module. $form['workflow']['language']['#description'] = t('Enable multilingual support for this content type. If enabled, a language selection field will be added to the editing form, allowing you to select from one of the <a href="!languages">enabled languages</a>. You can also turn on translation for this content type, which lets you have content translated to any of the enabled languages. If disabled, new posts are saved with the default language. Existing content will not be affected by changing this option.', array('!languages' => url('admin/settings/language'))); } - elseif ($form['#id'] == 'node-form' && translation_supported_type($form['#node']->type)) { + elseif (isset($form['#id']) && $form['#id'] == 'node-form' && translation_supported_type($form['#node']->type)) { $node = $form['#node']; if (!empty($node->translation_source)) { // We are creating a translation. Add values and lock language field. |