From 3b543c18f58bf0aa4fe5eec7071a88d58a003e9f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 25 Jan 2007 22:14:06 +0000 Subject: [PATCH] - Rollback of E_ALL patch. Too much extra breakage. --- includes/file.inc | 4 +-- includes/menu.inc | 2 +- includes/module.inc | 3 --- includes/theme.inc | 1 - modules/block/block.module | 10 +++---- modules/book/book.module | 2 +- modules/forum/forum.module | 4 +-- modules/node/node.module | 12 ++++----- modules/system/system.module | 26 +++++++------------ modules/taxonomy/taxonomy.module | 2 +- modules/upload/upload.module | 4 +-- modules/user/user.module | 17 +++++++----- themes/engines/phptemplate/phptemplate.engine | 4 +-- 13 files changed, 41 insertions(+), 50 deletions(-) diff --git a/includes/file.inc b/includes/file.inc index e7c97a3162e..70264131201 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -193,7 +193,7 @@ function file_check_upload($source = 'upload') { } // If a file was uploaded, process it. - if (isset($_FILES["files"]["name"][$source]) && is_uploaded_file($_FILES["files"]["tmp_name"][$source])) { + if ($_FILES["files"]["name"][$source] && is_uploaded_file($_FILES["files"]["tmp_name"][$source])) { // Check for file upload errors and return FALSE if a // lower level system error occurred. @@ -253,7 +253,7 @@ function file_check_upload($source = 'upload') { else { // In case of previews return previous file object. - if (isset($_SESSION['file_uploads'][$source]->filepath) && file_exists($_SESSION['file_uploads'][$source]->filepath)) { + if (file_exists($_SESSION['file_uploads'][$source]->filepath)) { return $_SESSION['file_uploads'][$source]; } } diff --git a/includes/menu.inc b/includes/menu.inc index 97a2eda53c4..8a5ac6d8c92 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -367,7 +367,7 @@ function _menu_tree($result = NULL, $depth = 0, $link = array('link' => '', 'has break; } } - if (isset($link['link'])) { + if ($link['link']) { $tree .= theme('menu_link', $link); } return array($remnant, $tree); diff --git a/includes/module.inc b/includes/module.inc index 36105b4f8bc..44aba187423 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -110,9 +110,6 @@ function module_rebuild_cache() { continue; } $files[$filename]->info = $file->info; - if (!isset($files[$filename]->info['version'])) { - $files[$filename]->info['version'] = NULL; - } // log the critical hooks implemented by this module $bootstrap = 0; diff --git a/includes/theme.inc b/includes/theme.inc index 24db4adb55d..a5aab93ea66 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -610,7 +610,6 @@ function theme_links($links, $attributes = array('class' => 'links')) { function theme_image($path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) { $attributes = drupal_attributes($attributes); - $image_attributes = isset($image_attributes) ? $image_attributes : ''; $url = (url($path) == $path) ? $path : (base_path() . $path); return ''. check_plain($alt) .''; } diff --git a/modules/block/block.module b/modules/block/block.module index bd457de36fe..e7936fef9d9 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -310,7 +310,7 @@ function theme_block_admin_display($form) { foreach (element_children($form) as $i) { $block = &$form[$i]; // Only take form elements that are blocks. - if (isset($block['info']) && is_array($block['info'])) { + if (is_array($block['info'])) { // Fetch values $region = $block['region']['#default_value']; $status = $region != BLOCK_REGION_NONE; @@ -337,7 +337,7 @@ function theme_block_admin_display($form) { $row[] = drupal_render($block['throttle']); } $row[] = drupal_render($block['configure']); - $row[] = isset($block['delete']) ? drupal_render($block['delete']) : ''; + $row[] = $block['delete'] ? drupal_render($block['delete']) : ''; $rows[] = $row; } } @@ -570,7 +570,7 @@ function block_box_form($edit = array()) { $form['info'] = array( '#type' => 'textfield', '#title' => t('Block description'), - '#default_value' => isset($edit['info']) ? $edit['info'] : '', + '#default_value' => $edit['info'], '#maxlength' => 64, '#description' => t('A brief description of your block. Used on the block overview page.', array('@overview' => url('admin/build/block'))), '#required' => TRUE, @@ -580,7 +580,7 @@ function block_box_form($edit = array()) { $form['body_filter']['body'] = array( '#type' => 'textarea', '#title' => t('Block body'), - '#default_value' => isset($edit['body']) ? $edit['body'] : '', + '#default_value' => $edit['body'], '#rows' => 15, '#description' => t('The content of the block as shown to the user.'), '#weight' => -17, @@ -631,7 +631,7 @@ function block_user($type, $edit, &$user, $category = NULL) { break; case 'validate': - if (!isset($edit['block'])) { + if (!$edit['block']) { $edit['block'] = array(); } return $edit; diff --git a/modules/book/book.module b/modules/book/book.module index e8a68a78902..8216d617a3a 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -507,7 +507,7 @@ function theme_book_navigation($node) { * This is a helper function for book_toc(). */ function book_toc_recurse($nid, $indent, $toc, $children, $exclude) { - if (isset($children[$nid])) { + if ($children[$nid]) { foreach ($children[$nid] as $foo => $node) { if (!$exclude || $exclude != $node->nid) { $toc[$node->nid] = $indent .' '. $node->title; diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 4db6c8ee1b3..23cab35e875 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -439,7 +439,7 @@ function forum_form_container($edit = array()) { '#title' => t('Container name'), '#type' => 'textfield', '#default_value' => $edit['name'], - '#maxlength' => 64, + '#maxlength' => 255, '#description' => t('The container name is used to identify related forums.'), '#required' => TRUE ); @@ -496,7 +496,7 @@ function forum_form_forum($edit = array()) { $form['name'] = array('#type' => 'textfield', '#title' => t('Forum name'), '#default_value' => $edit['name'], - '#maxlength' => 64, + '#maxlength' => 255, '#description' => t('The forum name is used to identify related discussions.'), '#required' => TRUE, ); diff --git a/modules/node/node.module b/modules/node/node.module index a029cae6ec1..d136bde8447 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1393,7 +1393,7 @@ function node_filter_form() { * Theme node administration filter form. */ function theme_node_filter_form($form) { - $output = '
'; + $output .= '
'; $output .= drupal_render($form['filters']); $output .= '
'; $output .= drupal_render($form); @@ -1404,8 +1404,8 @@ function theme_node_filter_form($form) { * Theme node administration filter selector. */ function theme_node_filters($form) { - $output = '