diff options
Diffstat (limited to 'modules')
28 files changed, 120 insertions, 76 deletions
diff --git a/modules/blog.module b/modules/blog.module index fceb01867..2a3388550 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -141,7 +141,7 @@ function blog_page_user($uid) { $account = user_load(array((is_numeric($uid) ? 'uid' : 'name') => $uid, 'status' => 1)); if ($account->uid) { - $title = t("%name's blog", array('%name' => $account->name)); + drupal_set_title($title = t("%name's blog", array('%name' => $account->name))); if (($account->uid == $user->uid) && user_access('edit own blog')) { $output = '<li>'. l(t('Post new blog entry.'), "node/add/blog") .'</li>'; @@ -165,7 +165,7 @@ function blog_page_user($uid) { $output .= theme('xml_icon', url("blog/feed/$account->uid")); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />'); - print theme('page', $output, $title); + print theme('page', $output); } else { drupal_not_found(); diff --git a/modules/blog/blog.module b/modules/blog/blog.module index fceb01867..2a3388550 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -141,7 +141,7 @@ function blog_page_user($uid) { $account = user_load(array((is_numeric($uid) ? 'uid' : 'name') => $uid, 'status' => 1)); if ($account->uid) { - $title = t("%name's blog", array('%name' => $account->name)); + drupal_set_title($title = t("%name's blog", array('%name' => $account->name))); if (($account->uid == $user->uid) && user_access('edit own blog')) { $output = '<li>'. l(t('Post new blog entry.'), "node/add/blog") .'</li>'; @@ -165,7 +165,7 @@ function blog_page_user($uid) { $output .= theme('xml_icon', url("blog/feed/$account->uid")); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />'); - print theme('page', $output, $title); + print theme('page', $output); } else { drupal_not_found(); diff --git a/modules/book.module b/modules/book.module index 0909abbcf..3aa7c03bf 100644 --- a/modules/book.module +++ b/modules/book.module @@ -291,7 +291,8 @@ function book_outline() { $output .= form_submit(t('Add to book outline')); } - print theme('page', form($output), $node->title); + drupal_set_title($node->title); + print theme('page', form($output)); } } } diff --git a/modules/book/book.module b/modules/book/book.module index 0909abbcf..3aa7c03bf 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -291,7 +291,8 @@ function book_outline() { $output .= form_submit(t('Add to book outline')); } - print theme('page', form($output), $node->title); + drupal_set_title($node->title); + print theme('page', form($output)); } } } diff --git a/modules/comment.module b/modules/comment.module index 6822fd8f4..67197bbdb 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -124,7 +124,7 @@ function comment_menu($may_cache) { $access = user_access('post comments'); $items[] = array('path' => 'comment/reply', 'title' => t('reply to comment'), 'callback' => 'comment_reply', 'access' => $access, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'comment/edit', 'title' => t('edit your comment'), + $items[] = array('path' => 'comment/edit', 'title' => t('edit comment'), 'callback' => 'comment_edit', 'access' => $access, 'type' => MENU_CALLBACK); $items[] = array('path' => 'comment', 'title' => t('reply to comment'), @@ -341,7 +341,10 @@ function comment_edit($cid) { $comment = drupal_unpack($comment); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; if (comment_access('edit', $comment)) { - print theme('page', comment_preview(object2array($comment)), t('Edit comment')); + print theme('page', comment_preview(object2array($comment))); + } + else { + drupal_access_denied(); } } @@ -356,13 +359,15 @@ function comment_reply($nid, $pid = NULL) { if ($_POST['op'] == t('Post comment')) { $edit = $_POST['edit']; comment_validate_form($edit); - print theme('page', comment_post($edit), t('Post comment')); + drupal_set_title(t('Post comment')); + print theme('page', comment_post($edit)); return; } else if ($_POST['op'] == t('Preview comment')) { $edit = $_POST['edit']; comment_validate_form($edit); - print theme('page', comment_preview($edit), t('Preview comment')); + drupal_set_title(t('Preview comment')); + print theme('page', comment_preview($edit)); return; } @@ -397,7 +402,8 @@ function comment_reply($nid, $pid = NULL) { $output .= theme('box', t('Reply'), t('You are not authorized to view comments.')); } - print theme('page', $output, t('Add new comment')); + drupal_set_title(t('Add new comment')); + print theme('page', $output); } function comment_validate_form($edit) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 6822fd8f4..67197bbdb 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -124,7 +124,7 @@ function comment_menu($may_cache) { $access = user_access('post comments'); $items[] = array('path' => 'comment/reply', 'title' => t('reply to comment'), 'callback' => 'comment_reply', 'access' => $access, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'comment/edit', 'title' => t('edit your comment'), + $items[] = array('path' => 'comment/edit', 'title' => t('edit comment'), 'callback' => 'comment_edit', 'access' => $access, 'type' => MENU_CALLBACK); $items[] = array('path' => 'comment', 'title' => t('reply to comment'), @@ -341,7 +341,10 @@ function comment_edit($cid) { $comment = drupal_unpack($comment); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; if (comment_access('edit', $comment)) { - print theme('page', comment_preview(object2array($comment)), t('Edit comment')); + print theme('page', comment_preview(object2array($comment))); + } + else { + drupal_access_denied(); } } @@ -356,13 +359,15 @@ function comment_reply($nid, $pid = NULL) { if ($_POST['op'] == t('Post comment')) { $edit = $_POST['edit']; comment_validate_form($edit); - print theme('page', comment_post($edit), t('Post comment')); + drupal_set_title(t('Post comment')); + print theme('page', comment_post($edit)); return; } else if ($_POST['op'] == t('Preview comment')) { $edit = $_POST['edit']; comment_validate_form($edit); - print theme('page', comment_preview($edit), t('Preview comment')); + drupal_set_title(t('Preview comment')); + print theme('page', comment_preview($edit)); return; } @@ -397,7 +402,8 @@ function comment_reply($nid, $pid = NULL) { $output .= theme('box', t('Reply'), t('You are not authorized to view comments.')); } - print theme('page', $output, t('Add new comment')); + drupal_set_title(t('Add new comment')); + print theme('page', $output); } function comment_validate_form($edit) { diff --git a/modules/drupal.module b/modules/drupal.module index b19cb7ba4..a3494a29a 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -199,7 +199,7 @@ function drupal_menu($may_cache) { * Menu callback; print Drupal-authentication-specific information from user/help. */ function drupal_page_help() { - print theme('page', drupal_help('user/help#drupal'), t('Drupal')); + print theme('page', drupal_help('user/help#drupal')); } /** diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index b19cb7ba4..a3494a29a 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -199,7 +199,7 @@ function drupal_menu($may_cache) { * Menu callback; print Drupal-authentication-specific information from user/help. */ function drupal_page_help() { - print theme('page', drupal_help('user/help#drupal'), t('Drupal')); + print theme('page', drupal_help('user/help#drupal')); } /** diff --git a/modules/filter.module b/modules/filter.module index cc4ccfbcf..ed7ee3a83 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -671,7 +671,7 @@ function filter_tips_long() { else { $output = theme('filter_tips', _filter_tips(-1, true)); } - print theme('page', $output, t('Compose Tips')); + print theme('page', $output); } /** diff --git a/modules/filter/filter.module b/modules/filter/filter.module index cc4ccfbcf..ed7ee3a83 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -671,7 +671,7 @@ function filter_tips_long() { else { $output = theme('filter_tips', _filter_tips(-1, true)); } - print theme('page', $output, t('Compose Tips')); + print theme('page', $output); } /** diff --git a/modules/forum.module b/modules/forum.module index 39353f5ef..ef1f44e8c 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -487,7 +487,8 @@ function forum_page($tid = 0) { print theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page); } else { - print theme('page', forum_help('admin/settings/forum'), t('Warning')); + drupal_set_title(t('Warning')); + print theme('page', forum_help('admin/settings/forum')); } } @@ -501,7 +502,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p // forum list, topics list, topic browser and 'add new topic' link $vocabulary = taxonomy_get_vocabulary(variable_get('forum_nav_vocabulary', '')); - $title = $vocabulary->name; + drupal_set_title($title = $vocabulary->name); // Breadcrumb navigation: $breadcrumb = array(); @@ -554,11 +555,11 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output .= '</div>'; } else { - $title = t('No forums defined'); + drupal_set_title(t('No forums defined')); $output = ''; } - print theme('page', $output, $title); + print theme('page', $output); } /** diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 39353f5ef..ef1f44e8c 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -487,7 +487,8 @@ function forum_page($tid = 0) { print theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page); } else { - print theme('page', forum_help('admin/settings/forum'), t('Warning')); + drupal_set_title(t('Warning')); + print theme('page', forum_help('admin/settings/forum')); } } @@ -501,7 +502,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p // forum list, topics list, topic browser and 'add new topic' link $vocabulary = taxonomy_get_vocabulary(variable_get('forum_nav_vocabulary', '')); - $title = $vocabulary->name; + drupal_set_title($title = $vocabulary->name); // Breadcrumb navigation: $breadcrumb = array(); @@ -554,11 +555,11 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output .= '</div>'; } else { - $title = t('No forums defined'); + drupal_set_title(t('No forums defined')); $output = ''; } - print theme('page', $output, $title); + print theme('page', $output); } /** diff --git a/modules/node.module b/modules/node.module index 60e52d6df..90309765c 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1514,7 +1514,8 @@ function node_page() { if (is_numeric(arg(1))) { $node = node_load(array('nid' => arg(1)), $_GET['revision']); if ($node->nid) { - print theme('page', node_show($node, arg(2)), $node->title); + drupal_set_title($node->title); + print theme('page', node_show($node, arg(2))); } else { drupal_not_found(); @@ -1523,17 +1524,20 @@ function node_page() { break; case t('Preview'): $edit = node_validate($edit); - print theme('page', node_preview($edit), t('Preview')); + drupal_set_title(t('Preview')); + print theme('page', node_preview($edit)); break; case t('Submit'): drupal_set_title(t('Submit')); print theme('page', node_submit($edit)); break; case t('Delete'): - print theme('page', node_delete($edit), t('Delete')); + drupal_set_title(t('Delete')); + print theme('page', node_delete($edit)); break; default: - print theme('page', node_page_default(), ''); + drupal_set_title(''); + print theme('page', node_page_default()); } } diff --git a/modules/node/node.module b/modules/node/node.module index 60e52d6df..90309765c 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1514,7 +1514,8 @@ function node_page() { if (is_numeric(arg(1))) { $node = node_load(array('nid' => arg(1)), $_GET['revision']); if ($node->nid) { - print theme('page', node_show($node, arg(2)), $node->title); + drupal_set_title($node->title); + print theme('page', node_show($node, arg(2))); } else { drupal_not_found(); @@ -1523,17 +1524,20 @@ function node_page() { break; case t('Preview'): $edit = node_validate($edit); - print theme('page', node_preview($edit), t('Preview')); + drupal_set_title(t('Preview')); + print theme('page', node_preview($edit)); break; case t('Submit'): drupal_set_title(t('Submit')); print theme('page', node_submit($edit)); break; case t('Delete'): - print theme('page', node_delete($edit), t('Delete')); + drupal_set_title(t('Delete')); + print theme('page', node_delete($edit)); break; default: - print theme('page', node_page_default(), ''); + drupal_set_title(''); + print theme('page', node_page_default()); } } diff --git a/modules/path.module b/modules/path.module index c8a3caff2..43b2d0ec2 100644 --- a/modules/path.module +++ b/modules/path.module @@ -107,14 +107,14 @@ function path_admin_edit($pid = 0) { } elseif ($pid) { $alias = path_load($pid); - $title = $alias['dst']; + drupal_set_title($alias['dst']); $output = path_form(path_load($pid)); } else { $output = path_form(); } - print theme('page', $output, $title); + print theme('page', $output); } /** diff --git a/modules/path/path.module b/modules/path/path.module index c8a3caff2..43b2d0ec2 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -107,14 +107,14 @@ function path_admin_edit($pid = 0) { } elseif ($pid) { $alias = path_load($pid); - $title = $alias['dst']; + drupal_set_title($alias['dst']); $output = path_form(path_load($pid)); } else { $output = path_form(); } - print theme('page', $output, $title); + print theme('page', $output); } /** diff --git a/modules/poll.module b/modules/poll.module index bb9505962..9294224e3 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -357,7 +357,8 @@ function poll_view_results(&$node, $main, $page, $block) { */ function poll_results() { if ($node = node_load(array('nid' => arg(1)))) { - print theme('page', node_show($node, 0), $node->title); + drupal_set_title($node->title); + print theme('page', node_show($node, 0)); } else { drupal_not_found(); diff --git a/modules/poll/poll.module b/modules/poll/poll.module index bb9505962..9294224e3 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -357,7 +357,8 @@ function poll_view_results(&$node, $main, $page, $block) { */ function poll_results() { if ($node = node_load(array('nid' => arg(1)))) { - print theme('page', node_show($node, 0), $node->title); + drupal_set_title($node->title); + print theme('page', node_show($node, 0)); } else { drupal_not_found(); diff --git a/modules/profile.module b/modules/profile.module index df6e9fa2e..37bb21556 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -113,7 +113,8 @@ function profile_browse() { } $output .= '</div>'; - print theme('page', $output, $title); + drupal_set_title($title); + print theme('page', $output); } else if ($name && !$field->id) { drupal_not_found(); @@ -136,7 +137,8 @@ function profile_browse() { $output .= '</div>'; $output .= theme('pager', NULL, 20); - print theme('page', $output, t('user list')); + drupal_set_title(t('user list')); + print theme('page', $output); } } @@ -457,7 +459,8 @@ function profile_admin_add($type) { $data = array('name' => 'profile_'); } - print theme('page', _profile_field_form($type, $data), t('Add new %type', array('%type' => _profile_field_types($type)))); + drupal_set_title(t('Add new %type', array('%type' => _profile_field_types($type)))); + print theme('page', _profile_field_form($type, $data)); } /** @@ -484,7 +487,8 @@ function profile_admin_edit($fid) { $data = db_fetch_array(db_query('SELECT * FROM {profile_fields} WHERE fid = %d', $fid)); } - print theme('page', _profile_field_form($data['type'], $data), t('Edit %type', array('%type' => $data['type']))); + drupal_set_title(t('Edit %type', array('%type' => $data['type']))); + print theme('page', _profile_field_form($data['type'], $data)); } /** diff --git a/modules/profile/profile.module b/modules/profile/profile.module index df6e9fa2e..37bb21556 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -113,7 +113,8 @@ function profile_browse() { } $output .= '</div>'; - print theme('page', $output, $title); + drupal_set_title($title); + print theme('page', $output); } else if ($name && !$field->id) { drupal_not_found(); @@ -136,7 +137,8 @@ function profile_browse() { $output .= '</div>'; $output .= theme('pager', NULL, 20); - print theme('page', $output, t('user list')); + drupal_set_title(t('user list')); + print theme('page', $output); } } @@ -457,7 +459,8 @@ function profile_admin_add($type) { $data = array('name' => 'profile_'); } - print theme('page', _profile_field_form($type, $data), t('Add new %type', array('%type' => _profile_field_types($type)))); + drupal_set_title(t('Add new %type', array('%type' => _profile_field_types($type)))); + print theme('page', _profile_field_form($type, $data)); } /** @@ -484,7 +487,8 @@ function profile_admin_edit($fid) { $data = db_fetch_array(db_query('SELECT * FROM {profile_fields} WHERE fid = %d', $fid)); } - print theme('page', _profile_field_form($data['type'], $data), t('Edit %type', array('%type' => $data['type']))); + drupal_set_title(t('Edit %type', array('%type' => $data['type']))); + print theme('page', _profile_field_form($data['type'], $data)); } /** diff --git a/modules/search.module b/modules/search.module index 9cdc34431..fe70f94ba 100644 --- a/modules/search.module +++ b/modules/search.module @@ -496,7 +496,7 @@ function search_view() { $output .= $results; - print theme('page', $output, t('Search')); + print theme('page', $output); } else { drupal_access_denied(); diff --git a/modules/search/search.module b/modules/search/search.module index 9cdc34431..fe70f94ba 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -496,7 +496,7 @@ function search_view() { $output .= $results; - print theme('page', $output, t('Search')); + print theme('page', $output); } else { drupal_access_denied(); diff --git a/modules/statistics.module b/modules/statistics.module index d5b9f1546..7e9204f20 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -184,7 +184,8 @@ function statistics_node_tracker() { $rows[] = array(array('data' => $pager, 'colspan' => '4')); } - print theme('page', theme('table', $header, $rows), $node->title); + drupal_set_title($node->title); + print theme('page', theme('table', $header, $rows)); } else { drupal_not_found(); @@ -211,7 +212,8 @@ function statistics_user_tracker() { $rows[] = array(array('data' => $pager, 'colspan' => '3')); } - print theme('page', theme('table', $header, $rows), $account->name); + drupal_set_title($account->name); + print theme('page', theme('table', $header, $rows)); } else { drupal_not_found(); @@ -222,7 +224,6 @@ function statistics_user_tracker() { * Menu callback; presents the "Recent hits" page. */ function statistics_recent_hits($type = 'all', $id = 0) { - $header = array( array('data' => t('Timestamp'), 'field' => 'a.timestamp', 'sort' => 'desc'), array('data' => t('Page'), 'field' => 'a.path'), @@ -245,7 +246,7 @@ function statistics_recent_hits($type = 'all', $id = 0) { $rows[] = array(array('data' => $pager, 'colspan' => '4')); } - print theme('page', theme('table', $header, $rows), t('Recent hits')); + print theme('page', theme('table', $header, $rows)); } /** @@ -269,7 +270,8 @@ function statistics_top_pages() { $rows[] = array(array('data' => $pager, 'colspan' => '2')); } - print theme('page', theme('table', $header, $rows), t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + drupal_set_title(t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + print theme('page', theme('table', $header, $rows)); } /** @@ -294,7 +296,8 @@ function statistics_top_users() { $rows[] = array(array('data' => $pager, 'colspan' => '2')); } - print theme('page', theme('table', $header, $rows), t('Top users in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + drupal_set_title(t('Top users in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + print theme('page', theme('table', $header, $rows)); } /** @@ -303,7 +306,7 @@ function statistics_top_users() { function statistics_top_referrers() { $query = "SELECT url, COUNT(url) AS hits, MAX(timestamp) AS last FROM {accesslog} WHERE url NOT LIKE '%". db_escape_string($_SERVER['HTTP_HOST']) ."%' AND url <> '' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url NOT LIKE '%". db_escape_string($_SERVER['HTTP_HOST']) ."%'"; - $title = t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))); + drupal_set_title(t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); $header = array( array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'), @@ -321,7 +324,7 @@ function statistics_top_referrers() { $rows[] = array(array('data' => $pager, 'colspan' => '3')); } - print theme('page', theme('table', $header, $rows), $title); + print theme('page', theme('table', $header, $rows)); } /** diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index d5b9f1546..7e9204f20 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -184,7 +184,8 @@ function statistics_node_tracker() { $rows[] = array(array('data' => $pager, 'colspan' => '4')); } - print theme('page', theme('table', $header, $rows), $node->title); + drupal_set_title($node->title); + print theme('page', theme('table', $header, $rows)); } else { drupal_not_found(); @@ -211,7 +212,8 @@ function statistics_user_tracker() { $rows[] = array(array('data' => $pager, 'colspan' => '3')); } - print theme('page', theme('table', $header, $rows), $account->name); + drupal_set_title($account->name); + print theme('page', theme('table', $header, $rows)); } else { drupal_not_found(); @@ -222,7 +224,6 @@ function statistics_user_tracker() { * Menu callback; presents the "Recent hits" page. */ function statistics_recent_hits($type = 'all', $id = 0) { - $header = array( array('data' => t('Timestamp'), 'field' => 'a.timestamp', 'sort' => 'desc'), array('data' => t('Page'), 'field' => 'a.path'), @@ -245,7 +246,7 @@ function statistics_recent_hits($type = 'all', $id = 0) { $rows[] = array(array('data' => $pager, 'colspan' => '4')); } - print theme('page', theme('table', $header, $rows), t('Recent hits')); + print theme('page', theme('table', $header, $rows)); } /** @@ -269,7 +270,8 @@ function statistics_top_pages() { $rows[] = array(array('data' => $pager, 'colspan' => '2')); } - print theme('page', theme('table', $header, $rows), t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + drupal_set_title(t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + print theme('page', theme('table', $header, $rows)); } /** @@ -294,7 +296,8 @@ function statistics_top_users() { $rows[] = array(array('data' => $pager, 'colspan' => '2')); } - print theme('page', theme('table', $header, $rows), t('Top users in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + drupal_set_title(t('Top users in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); + print theme('page', theme('table', $header, $rows)); } /** @@ -303,7 +306,7 @@ function statistics_top_users() { function statistics_top_referrers() { $query = "SELECT url, COUNT(url) AS hits, MAX(timestamp) AS last FROM {accesslog} WHERE url NOT LIKE '%". db_escape_string($_SERVER['HTTP_HOST']) ."%' AND url <> '' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url NOT LIKE '%". db_escape_string($_SERVER['HTTP_HOST']) ."%'"; - $title = t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))); + drupal_set_title(t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200))))); $header = array( array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'), @@ -321,7 +324,7 @@ function statistics_top_referrers() { $rows[] = array(array('data' => $pager, 'colspan' => '3')); } - print theme('page', theme('table', $header, $rows), $title); + print theme('page', theme('table', $header, $rows)); } /** diff --git a/modules/taxonomy.module b/modules/taxonomy.module index c231a327d..cb1de14cc 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -906,7 +906,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { while ($term = db_fetch_object($result)) { $names[] = $term->name; } - $title = implode(', ', $names); + drupal_set_title($title = implode(', ', $names)); switch ($op) { case 'page': @@ -924,7 +924,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); $output .= theme('xml_icon', url("taxonomy/term/$str_tids/$depth/feed")); - print theme('page', $output, $title); + print theme('page', $output); break; case 'feed': diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index c231a327d..cb1de14cc 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -906,7 +906,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { while ($term = db_fetch_object($result)) { $names[] = $term->name; } - $title = implode(', ', $names); + drupal_set_title($title = implode(', ', $names)); switch ($op) { case 'page': @@ -924,7 +924,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); $output .= theme('xml_icon', url("taxonomy/term/$str_tids/$depth/feed")); - print theme('page', $output, $title); + print theme('page', $output); break; case 'feed': diff --git a/modules/user.module b/modules/user.module index a07fa5fef..e60a6bda2 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1169,7 +1169,8 @@ function user_edit($category = 'account') { } $output = form($output, 'post', 0, array('enctype' => 'multipart/form-data')); - print theme('page', $output, $account->name); + drupal_set_title($account->name); + print theme('page', $output); } function user_view($uid = 0) { @@ -1186,7 +1187,8 @@ function user_view($uid = 0) { } } - print theme('page', theme('user_profile', $account, $fields), $account->name); + drupal_set_title($account->name); + print theme('page', theme('user_profile', $account, $fields)); } else { drupal_not_found(); diff --git a/modules/user/user.module b/modules/user/user.module index a07fa5fef..e60a6bda2 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1169,7 +1169,8 @@ function user_edit($category = 'account') { } $output = form($output, 'post', 0, array('enctype' => 'multipart/form-data')); - print theme('page', $output, $account->name); + drupal_set_title($account->name); + print theme('page', $output); } function user_view($uid = 0) { @@ -1186,7 +1187,8 @@ function user_view($uid = 0) { } } - print theme('page', theme('user_profile', $account, $fields), $account->name); + drupal_set_title($account->name); + print theme('page', theme('user_profile', $account, $fields)); } else { drupal_not_found(); |