diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/aggregator/aggregator.module | 3 | ||||
-rw-r--r-- | modules/book/book.module | 1 | ||||
-rw-r--r-- | modules/comment/comment.module | 1 | ||||
-rw-r--r-- | modules/filter/filter.module | 2 | ||||
-rw-r--r-- | modules/forum/forum.module | 1 | ||||
-rw-r--r-- | modules/locale/locale.module | 3 | ||||
-rw-r--r-- | modules/poll/poll.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 1 | ||||
-rw-r--r-- | modules/search/search.module | 2 | ||||
-rw-r--r-- | modules/user/user.module | 6 |
10 files changed, 16 insertions, 6 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 4551e0416..4a7d42152 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -833,6 +833,8 @@ function aggregator_parse_feed(&$data, $feed) { $items = array_reverse($items); + // Initialize variables + $title = $link = $author = $description = $guid = NULL; foreach ($items as $item) { unset($title, $link, $author, $description, $guid); @@ -1057,6 +1059,7 @@ function _aggregator_page_list($sql, $op, $header = '') { $result = pager_query($sql, 20); $categories = array(); + $done = FALSE; while ($item = db_fetch_object($result)) { $form['items'][$item->iid] = array('#value' => theme('aggregator_page_item', $item)); $output .= $form['items'][$item->iid]['#value']; diff --git a/modules/book/book.module b/modules/book/book.module index 584c78b5b..979dbf613 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -553,6 +553,7 @@ function book_toc_recurse($nid, $indent, $toc, $children, $exclude) { function book_toc($exclude = 0) { $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE n.status = 1 ORDER BY b.weight, n.title')); + $children = array(); while ($node = db_fetch_object($result)) { if (!$children[$node->parent]) { $children[$node->parent] = array(); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d8382770b..fed6e19d3 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1617,7 +1617,6 @@ function theme_comment_folded($comment) { function theme_comment_flat_collapsed($comment) { return theme('comment_view', $comment, '', 0); - return ''; } function theme_comment_flat_expanded($comment) { diff --git a/modules/filter/filter.module b/modules/filter/filter.module index e6676bc15..bdf218570 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -846,7 +846,7 @@ function filter_form_validate($form) { } } form_error($form, t('An illegal choice has been detected. Please contact the site administrator.')); - watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($v)), '%name' => theme('placeholder', empty($form['#title']) ? $form['#parents'][0] : $form['#title']))), WATCHDOG_ERROR); + watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($form[$key]['#value'])), '%name' => theme('placeholder', empty($form['#title']) ? $form['#parents'][0] : $form['#title']))), WATCHDOG_ERROR); } /** diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 46f34d024..376c31512 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1060,6 +1060,7 @@ function theme_forum_topic_navigation($node) { $sql = "SELECT n.nid, n.title, n.sticky, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {term_node} r ON n.nid = r.nid AND r.tid = %d WHERE n.status = 1 AND n.type = 'forum' ORDER BY n.sticky DESC, ". _forum_get_topic_order_sql(variable_get('forum_order', 1)); $result = db_query(db_rewrite_sql($sql), $node->tid); + $stop = 0; while ($topic = db_fetch_object($result)) { if ($stop == 1) { $next = new StdClass(); diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 0226f083f..8f36b87e1 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -54,10 +54,9 @@ function locale_help($section) { */ function locale_menu($may_cache) { $items = array(); + $access = user_access('administer locales'); if ($may_cache) { - $access = user_access('administer locales'); - // Main admin menu item $items[] = array('path' => 'admin/settings/locale', 'title' => t('localization'), diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5d7068109..6ee82c457 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -570,6 +570,8 @@ function poll_update($node) { db_query('DELETE FROM {poll_choices} WHERE nid = %d', $node->nid); db_query('DELETE FROM {poll_votes} WHERE nid = %d', $node->nid); + + $i = 0; foreach ($node->choice as $choice) { $chvotes = (int)$choice['chvotes']; $chtext = $choice['chtext']; diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 9e7dbf285..db86fc314 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -634,6 +634,7 @@ function profile_form_profile($edit, $user, $category) { // Use LOWER('%s') instead of PHP's strtolower() to avoid UTF-8 conversion issues. } + $w = 0; while ($field = db_fetch_object($result)) { $category = $field->category; if (!isset($fields[$category])) { diff --git a/modules/search/search.module b/modules/search/search.module index 66454797c..566c2c4db 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -243,7 +243,7 @@ function search_admin_settings() { * Menu callback: confirm wiping of the index. */ function search_wipe_confirm() { - return confirm_form('search_wipe_confirm', $form, t('Are you sure you want to re-index the site?'), + return confirm_form('search_wipe_confirm', array(), t('Are you sure you want to re-index the site?'), 'admin/settings/search', t(' The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel')); } diff --git a/modules/user/user.module b/modules/user/user.module index 740e14431..acd22b470 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1088,6 +1088,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass, $action = NULL) { // Now we can set the new user. $user = $account; // And proceed with normal login, going to user page. + $edit = array(); user_module_invoke('login', $edit, $user); drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to login. Please change your password.')); drupal_goto('user/'. $user->uid .'/edit'); @@ -1153,7 +1154,10 @@ function user_register() { // Redirect back to page which initiated the create request; usually admin/user/user/create $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } - $extra = _user_forms($null, $null, $null, 'register'); + + // Create a dummy variable for pass-by-reference parameters. + $null = NULL; + $extra = _user_forms($null, NULL, NULL, 'register'); // Remove form_group around default fields if there are no other groups. if (!$extra) { |