Commit 2b17b3a9 authored by Dries's avatar Dries

- Patch #13907 by Neil: less ways to set the page title.

   * Less logic in theme code.
   * Encourages use of the menu system.
   * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them.
   * Very slightly more efficient.
parent 5628256e
Drupal x.x.x, xxxx-xx-xx
------------------------
- blocks:
* reorganized the block configuration page.
- search:
* added UTF-8 support to make it work with all languages.
* improved search indexing.
......@@ -12,6 +10,7 @@ Drupal x.x.x, xxxx-xx-xx
- flood control mechanism:
* added a mechanism to throttle certain operations.
- usability:
* refactored the block configuration pages.
* refactored the statistics and log pages.
* refactored the throttle module configuration.
* added a 'add child page' link to book pages.
......
......@@ -176,7 +176,8 @@ function drupal_not_found() {
}
if ($status != MENU_FOUND) {
print theme('page', '', t('Page not found'));
drupal_set_title(t('Page not found'));
print theme('page', '');
}
}
......@@ -195,7 +196,8 @@ function drupal_access_denied() {
}
if ($status != MENU_FOUND) {
print theme('page', message_access(), t('Access denied'));
drupal_set_title(t('Access denied'));
print theme('page', message_access());
}
}
......
......@@ -337,23 +337,10 @@ function theme_get_styles() {
*
* @param $content
* A string to display in the main content area of the page.
* @param $title
* The title of the page, if different from that provided by the menu system.
* @param $breadcrumb
* The breadcrumb trail for the page, if different from that provided by the
* menu system. Use menu_set_location() instead, if possible.
* @return
* A string containing the entire HTML page.
*/
function theme_page($content, $title = NULL, $breadcrumb = NULL) {
if (isset($title)) {
drupal_set_title($title);
}
if (isset($breadcrumb)) {
drupal_set_breadcrumb($breadcrumb);
}
function theme_page($content) {
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$output .= '<html xmlns="http://www.w3.org/1999/xhtml">';
$output .= '<head>';
......
......@@ -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();
......
......@@ -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();
......
......@@ -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));
}
}
}
......
......@@ -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));
}
}
}
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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'));
}
/**
......
......@@ -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'));
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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());
}
}
......
......@@ -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());
}
}
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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();
......
......@@ -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();
......
......@@ -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));
}
/**
......
......@@ -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));
}
/**
......
......@@ -496,7 +496,7 @@ function search_view() {
$output .= $results;
print theme('page', $output, t('Search'));
print theme('page', $output);
}
else {
drupal_access_denied();
......
......@@ -496,7 +496,7 @@ function search_view() {
$output .= $results;
print theme('page', $output, t('Search'));
print theme('page', $output);
}
else {
drupal_access_denied();
......
......@@ -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));
}
/**
......
......@@ -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));
}
/**
......
......@@ -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':
......
......@@ -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