- Patch 20910 by chx: centralize print theme page.

4.7.x
Dries Buytaert 2005-04-24 16:34:36 +00:00
parent 79a5700c57
commit a76a1e1f3f
52 changed files with 260 additions and 268 deletions

View File

@ -351,8 +351,7 @@ function menu_execute_active_handler() {
$arguments = array_merge($arguments, explode('/', $arg)); $arguments = array_merge($arguments, explode('/', $arg));
} }
call_user_func_array($menu['items'][$mid]['callback'], $arguments); return call_user_func_array($menu['items'][$mid]['callback'], $arguments);
return MENU_FOUND;
} }
/** /**

View File

@ -15,14 +15,19 @@ include_once 'includes/common.inc';
fix_gpc_magic(); fix_gpc_magic();
$status = menu_execute_active_handler(); $return = menu_execute_active_handler();
switch ($status) { switch ($return) {
case MENU_NOT_FOUND: case MENU_NOT_FOUND:
drupal_not_found(); drupal_not_found();
break; break;
case MENU_ACCESS_DENIED: case MENU_ACCESS_DENIED:
drupal_access_denied(); drupal_access_denied();
break; break;
default:
if (!empty($return)) {
print theme('page', $return);
}
break;
} }
drupal_page_footer(); drupal_page_footer();

View File

@ -762,7 +762,7 @@ function aggregator_edit() {
$output = aggregator_form_feed(aggregator_get_feed(arg(2))); $output = aggregator_form_feed(aggregator_get_feed(arg(2)));
} }
print theme('page', $output); return $output;
} }
@ -792,7 +792,7 @@ function aggregator_admin_edit_category($category = 0) {
$output = aggregator_form_category(); $output = aggregator_form_category();
} }
} }
print theme('page', $output); return $output;
} }
/** /**
@ -822,7 +822,7 @@ function aggregator_admin_edit_feed($feed = 0) {
$output = aggregator_form_feed(); $output = aggregator_form_feed();
} }
} }
print theme('page', $output); return $output;
} }
/** /**
@ -845,7 +845,7 @@ function aggregator_admin_refresh_feed($feed) {
* Menu callback; displays the aggregator administration page. * Menu callback; displays the aggregator administration page.
*/ */
function aggregator_admin_overview() { function aggregator_admin_overview() {
print theme('page', aggregator_view()); return aggregator_view();
} }
/** /**
@ -946,7 +946,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
$output .= $pager; $output .= $pager;
} }
print theme('page', $output); return $output;
} }
/** /**
@ -971,7 +971,7 @@ function aggregator_page_sources() {
} }
$output .= theme('xml_icon', url('aggregator/opml')); $output .= theme('xml_icon', url('aggregator/opml'));
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
/** /**
@ -1020,7 +1020,7 @@ function aggregator_page_categories() {
} }
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
/** /**

View File

@ -762,7 +762,7 @@ function aggregator_edit() {
$output = aggregator_form_feed(aggregator_get_feed(arg(2))); $output = aggregator_form_feed(aggregator_get_feed(arg(2)));
} }
print theme('page', $output); return $output;
} }
@ -792,7 +792,7 @@ function aggregator_admin_edit_category($category = 0) {
$output = aggregator_form_category(); $output = aggregator_form_category();
} }
} }
print theme('page', $output); return $output;
} }
/** /**
@ -822,7 +822,7 @@ function aggregator_admin_edit_feed($feed = 0) {
$output = aggregator_form_feed(); $output = aggregator_form_feed();
} }
} }
print theme('page', $output); return $output;
} }
/** /**
@ -845,7 +845,7 @@ function aggregator_admin_refresh_feed($feed) {
* Menu callback; displays the aggregator administration page. * Menu callback; displays the aggregator administration page.
*/ */
function aggregator_admin_overview() { function aggregator_admin_overview() {
print theme('page', aggregator_view()); return aggregator_view();
} }
/** /**
@ -946,7 +946,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
$output .= $pager; $output .= $pager;
} }
print theme('page', $output); return $output;
} }
/** /**
@ -971,7 +971,7 @@ function aggregator_page_sources() {
} }
$output .= theme('xml_icon', url('aggregator/opml')); $output .= theme('xml_icon', url('aggregator/opml'));
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
/** /**
@ -1020,7 +1020,7 @@ function aggregator_page_categories() {
} }
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
/** /**

View File

@ -249,7 +249,7 @@ function archive_page($year = 0, $month = 0, $day = 0) {
$output .= node_view(node_load(array('nid' => $nid->nid)), 1); $output .= node_view(node_load(array('nid' => $nid->nid)), 1);
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -249,7 +249,7 @@ function archive_page($year = 0, $month = 0, $day = 0) {
$output .= node_view(node_load(array('nid' => $nid->nid)), 1); $output .= node_view(node_load(array('nid' => $nid->nid)), 1);
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -299,7 +299,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
$form .= form_submit(t('Save block')); $form .= form_submit(t('Save block'));
print theme('page', form($form)); return form($form);
} }
} }
@ -323,7 +323,7 @@ function block_box_add() {
$output .= form($form); $output .= form($form);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -348,7 +348,7 @@ function block_box_delete($bid = 0) {
t('Delete')); t('Delete'));
} }
print theme('page', $output); return $output;
} }
function block_box_form($edit = array()) { function block_box_form($edit = array()) {
@ -390,7 +390,7 @@ function block_admin() {
cache_clear_all(); cache_clear_all();
drupal_goto($_GET['q']); drupal_goto($_GET['q']);
} }
print theme('page', block_admin_display()); return block_admin_display();
} }
/** /**

View File

@ -299,7 +299,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
$form .= form_submit(t('Save block')); $form .= form_submit(t('Save block'));
print theme('page', form($form)); return form($form);
} }
} }
@ -323,7 +323,7 @@ function block_box_add() {
$output .= form($form); $output .= form($form);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -348,7 +348,7 @@ function block_box_delete($bid = 0) {
t('Delete')); t('Delete'));
} }
print theme('page', $output); return $output;
} }
function block_box_form($edit = array()) { function block_box_form($edit = array()) {
@ -390,7 +390,7 @@ function block_admin() {
cache_clear_all(); cache_clear_all();
drupal_goto($_GET['q']); drupal_goto($_GET['q']);
} }
print theme('page', block_admin_display()); return block_admin_display();
} }
/** /**

View File

@ -149,7 +149,7 @@ function blog_page_user($uid) {
$output .= theme('xml_icon', url("blog/$account->uid/feed")); $output .= theme('xml_icon', url("blog/$account->uid/feed"));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />'); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />');
print theme('page', $output); return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -173,7 +173,7 @@ function blog_page_last() {
$output .= theme('xml_icon', url('blog/feed')); $output .= theme('xml_icon', url('blog/feed'));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'" />'); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'" />');
print theme('page', $output); return $output;
} }
/** /**

View File

@ -149,7 +149,7 @@ function blog_page_user($uid) {
$output .= theme('xml_icon', url("blog/$account->uid/feed")); $output .= theme('xml_icon', url("blog/$account->uid/feed"));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />'); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />');
print theme('page', $output); return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -173,7 +173,7 @@ function blog_page_last() {
$output .= theme('xml_icon', url('blog/feed')); $output .= theme('xml_icon', url('blog/feed'));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'" />'); drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'" />');
print theme('page', $output); return $output;
} }
/** /**

View File

@ -288,7 +288,7 @@ function book_outline() {
} }
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', form($output)); return form($output);
} }
} }
} }
@ -611,7 +611,7 @@ function book_render() {
} }
drupal_set_title(t('Books')); drupal_set_title(t('Books'));
print theme('page', $output); return $output;
} }
/** /**
@ -767,7 +767,7 @@ function book_admin_orphan() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -785,7 +785,7 @@ function book_admin($nid = 0) {
$output .= book_admin_view($nid); $output .= book_admin_view($nid);
break; break;
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -288,7 +288,7 @@ function book_outline() {
} }
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', form($output)); return form($output);
} }
} }
} }
@ -611,7 +611,7 @@ function book_render() {
} }
drupal_set_title(t('Books')); drupal_set_title(t('Books'));
print theme('page', $output); return $output;
} }
/** /**
@ -767,7 +767,7 @@ function book_admin_orphan() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -785,7 +785,7 @@ function book_admin($nid = 0) {
$output .= book_admin_view($nid); $output .= book_admin_view($nid);
break; break;
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -329,7 +329,7 @@ function comment_configure() {
$output .= form_group(t('Comment moderation settings'), $group); $output .= form_group(t('Comment moderation settings'), $group);
} }
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -361,7 +361,7 @@ function comment_edit($cid) {
$comment = drupal_unpack($comment); $comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name; $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
if (comment_access('edit', $comment)) { if (comment_access('edit', $comment)) {
print theme('page', comment_preview(object2array($comment))); return comment_preview(object2array($comment));
} }
else { else {
drupal_access_denied(); drupal_access_denied();
@ -380,15 +380,13 @@ function comment_reply($nid, $pid = NULL) {
$edit = $_POST['edit']; $edit = $_POST['edit'];
$edit = comment_validate_form($edit); $edit = comment_validate_form($edit);
drupal_set_title(t('Post comment')); drupal_set_title(t('Post comment'));
print theme('page', comment_post($edit)); return comment_post($edit);
return;
} }
else if ($_POST['op'] == t('Preview comment')) { else if ($_POST['op'] == t('Preview comment')) {
$edit = $_POST['edit']; $edit = $_POST['edit'];
$edit = comment_validate_form($edit); $edit = comment_validate_form($edit);
drupal_set_title(t('Preview comment')); drupal_set_title(t('Preview comment'));
print theme('page', comment_preview($edit)); return comment_preview($edit);
return;
} }
// or are we merely showing the form? // or are we merely showing the form?
@ -423,7 +421,7 @@ function comment_reply($nid, $pid = NULL) {
} }
drupal_set_title(t('Add new comment')); drupal_set_title(t('Add new comment'));
print theme('page', $output); return $output;
} }
function comment_validate_form($edit) { function comment_validate_form($edit) {
@ -661,7 +659,7 @@ function comment_post($edit) {
} }
} }
else { else {
print theme('page', comment_preview($edit)); return comment_preview($edit);
} }
} }
else { else {
@ -945,7 +943,7 @@ function comment_admin_edit($cid) {
$form .= form_hidden('nid', $comment->nid); $form .= form_hidden('nid', $comment->nid);
$form .= form_hidden('cid', $comment->cid); $form .= form_hidden('cid', $comment->cid);
$form .= form_submit(t('Submit')); $form .= form_submit(t('Submit'));
print theme('page', form($form)); return form($form);
} }
} }
@ -989,7 +987,7 @@ function comment_delete($cid) {
drupal_set_message(t('The comment no longer exists.')); drupal_set_message(t('The comment no longer exists.'));
} }
print theme('page', $output); return $output;
} }
function comment_save($id, $edit) { function comment_save($id, $edit) {
@ -1042,7 +1040,7 @@ function comment_admin_overview($type = 'new') {
$rows[] = array(array('data' => t('No comments available.'), 'colspan' => '6')); $rows[] = array(array('data' => t('No comments available.'), 'colspan' => '6'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**
@ -1091,7 +1089,7 @@ function comment_matrix_settings() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
if ($rows) { $output .= '<br />'. form_submit(t('Submit votes')); } if ($rows) { $output .= '<br />'. form_submit(t('Submit votes')); }
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1121,7 +1119,7 @@ function comment_role_settings() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
$output .= '<br />'. form_submit(t('Save scores')); $output .= '<br />'. form_submit(t('Save scores'));
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1176,7 +1174,7 @@ function comment_vote_settings($mid = 0) {
$form .= form_submit(t('Add new vote')); $form .= form_submit(t('Add new vote'));
} }
print theme('page', $output . form($form)); return $output . form($form);
} }
/** /**
@ -1230,7 +1228,7 @@ function comment_threshold_settings($fid = 0) {
$form .= form_submit(t('Add new threshold')); $form .= form_submit(t('Add new threshold'));
} }
print theme('page', $output . form($form)); return $output . form($form);
} }
/** /**

View File

@ -329,7 +329,7 @@ function comment_configure() {
$output .= form_group(t('Comment moderation settings'), $group); $output .= form_group(t('Comment moderation settings'), $group);
} }
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -361,7 +361,7 @@ function comment_edit($cid) {
$comment = drupal_unpack($comment); $comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name; $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
if (comment_access('edit', $comment)) { if (comment_access('edit', $comment)) {
print theme('page', comment_preview(object2array($comment))); return comment_preview(object2array($comment));
} }
else { else {
drupal_access_denied(); drupal_access_denied();
@ -380,15 +380,13 @@ function comment_reply($nid, $pid = NULL) {
$edit = $_POST['edit']; $edit = $_POST['edit'];
$edit = comment_validate_form($edit); $edit = comment_validate_form($edit);
drupal_set_title(t('Post comment')); drupal_set_title(t('Post comment'));
print theme('page', comment_post($edit)); return comment_post($edit);
return;
} }
else if ($_POST['op'] == t('Preview comment')) { else if ($_POST['op'] == t('Preview comment')) {
$edit = $_POST['edit']; $edit = $_POST['edit'];
$edit = comment_validate_form($edit); $edit = comment_validate_form($edit);
drupal_set_title(t('Preview comment')); drupal_set_title(t('Preview comment'));
print theme('page', comment_preview($edit)); return comment_preview($edit);
return;
} }
// or are we merely showing the form? // or are we merely showing the form?
@ -423,7 +421,7 @@ function comment_reply($nid, $pid = NULL) {
} }
drupal_set_title(t('Add new comment')); drupal_set_title(t('Add new comment'));
print theme('page', $output); return $output;
} }
function comment_validate_form($edit) { function comment_validate_form($edit) {
@ -661,7 +659,7 @@ function comment_post($edit) {
} }
} }
else { else {
print theme('page', comment_preview($edit)); return comment_preview($edit);
} }
} }
else { else {
@ -945,7 +943,7 @@ function comment_admin_edit($cid) {
$form .= form_hidden('nid', $comment->nid); $form .= form_hidden('nid', $comment->nid);
$form .= form_hidden('cid', $comment->cid); $form .= form_hidden('cid', $comment->cid);
$form .= form_submit(t('Submit')); $form .= form_submit(t('Submit'));
print theme('page', form($form)); return form($form);
} }
} }
@ -989,7 +987,7 @@ function comment_delete($cid) {
drupal_set_message(t('The comment no longer exists.')); drupal_set_message(t('The comment no longer exists.'));
} }
print theme('page', $output); return $output;
} }
function comment_save($id, $edit) { function comment_save($id, $edit) {
@ -1042,7 +1040,7 @@ function comment_admin_overview($type = 'new') {
$rows[] = array(array('data' => t('No comments available.'), 'colspan' => '6')); $rows[] = array(array('data' => t('No comments available.'), 'colspan' => '6'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**
@ -1091,7 +1089,7 @@ function comment_matrix_settings() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
if ($rows) { $output .= '<br />'. form_submit(t('Submit votes')); } if ($rows) { $output .= '<br />'. form_submit(t('Submit votes')); }
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1121,7 +1119,7 @@ function comment_role_settings() {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
$output .= '<br />'. form_submit(t('Save scores')); $output .= '<br />'. form_submit(t('Save scores'));
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1176,7 +1174,7 @@ function comment_vote_settings($mid = 0) {
$form .= form_submit(t('Add new vote')); $form .= form_submit(t('Add new vote'));
} }
print theme('page', $output . form($form)); return $output . form($form);
} }
/** /**
@ -1230,7 +1228,7 @@ function comment_threshold_settings($fid = 0) {
$form .= form_submit(t('Add new threshold')); $form .= form_submit(t('Add new threshold'));
} }
print theme('page', $output . form($form)); return $output . form($form);
} }
/** /**

View File

@ -153,7 +153,8 @@ function contact_mail_user() {
$output = form($output); $output = form($output);
} }
print theme('page', $output, $account->name); drupal_set_title($account->name);
return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -185,17 +186,17 @@ function contact_admin_edit($subject = NULL) {
$form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message."));
$form .= form_submit(t('Submit')); $form .= form_submit(t('Submit'));
print theme('page', form($form)); return form($form);
} }
function contact_admin_delete($subject) { function contact_admin_delete($subject) {
if ($_POST['op'] != t('Delete')) { if ($_POST['op'] != t('Delete')) {
print theme('page', theme('confirm', return theme('confirm',
t('Are you sure you want to delete %subject?', array('%subject' => theme('placeholder', $subject))), t('Are you sure you want to delete %subject?', array('%subject' => theme('placeholder', $subject))),
'admin/contact/delete/'. $subject, 'admin/contact/delete/'. $subject,
t('This action cannot be undone.'), t('This action cannot be undone.'),
t('Delete'), t('Delete'),
t('Cancel'))); t('Cancel'));
} }
else { else {
db_query("DELETE FROM {contact} WHERE subject = '%s'", $subject); db_query("DELETE FROM {contact} WHERE subject = '%s'", $subject);
@ -211,7 +212,7 @@ function contact_admin() {
$rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject)); $rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject));
} }
$header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2)); $header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2));
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
function contact_mail_page() { function contact_mail_page() {
@ -302,7 +303,7 @@ function contact_mail_page() {
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -153,7 +153,8 @@ function contact_mail_user() {
$output = form($output); $output = form($output);
} }
print theme('page', $output, $account->name); drupal_set_title($account->name);
return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -185,17 +186,17 @@ function contact_admin_edit($subject = NULL) {
$form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message."));
$form .= form_submit(t('Submit')); $form .= form_submit(t('Submit'));
print theme('page', form($form)); return form($form);
} }
function contact_admin_delete($subject) { function contact_admin_delete($subject) {
if ($_POST['op'] != t('Delete')) { if ($_POST['op'] != t('Delete')) {
print theme('page', theme('confirm', return theme('confirm',
t('Are you sure you want to delete %subject?', array('%subject' => theme('placeholder', $subject))), t('Are you sure you want to delete %subject?', array('%subject' => theme('placeholder', $subject))),
'admin/contact/delete/'. $subject, 'admin/contact/delete/'. $subject,
t('This action cannot be undone.'), t('This action cannot be undone.'),
t('Delete'), t('Delete'),
t('Cancel'))); t('Cancel'));
} }
else { else {
db_query("DELETE FROM {contact} WHERE subject = '%s'", $subject); db_query("DELETE FROM {contact} WHERE subject = '%s'", $subject);
@ -211,7 +212,7 @@ function contact_admin() {
$rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject)); $rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject));
} }
$header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2)); $header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2));
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
function contact_mail_page() { function contact_mail_page() {
@ -302,7 +303,7 @@ function contact_mail_page() {
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -199,7 +199,7 @@ function drupal_menu($may_cache) {
* Menu callback; print Drupal-authentication-specific information from user/help. * Menu callback; print Drupal-authentication-specific information from user/help.
*/ */
function drupal_page_help() { function drupal_page_help() {
print theme('page', drupal_help('user/help#drupal')); return drupal_help('user/help#drupal');
} }
/** /**

View File

@ -199,7 +199,7 @@ function drupal_menu($may_cache) {
* Menu callback; print Drupal-authentication-specific information from user/help. * Menu callback; print Drupal-authentication-specific information from user/help.
*/ */
function drupal_page_help() { function drupal_page_help() {
print theme('page', drupal_help('user/help#drupal')); return drupal_help('user/help#drupal');
} }
/** /**

View File

@ -310,7 +310,7 @@ function filter_admin_overview() {
$group .= form($form); $group .= form($form);
$output .= '<h2>'. t('Add new input format') .'</h2>'. $group; $output .= '<h2>'. t('Add new input format') .'</h2>'. $group;
print theme('page', $output); return $output;
} }
/** /**
@ -403,7 +403,7 @@ function filter_admin_delete() {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
/** /**
@ -449,7 +449,7 @@ function filter_admin_filters() {
$group .= $tiplist; $group .= $tiplist;
$output .= '<h2>'. t('Formatting guidelines') .'</h2>'. $group; $output .= '<h2>'. t('Formatting guidelines') .'</h2>'. $group;
print theme('page', $output); return $output;
} }
/** /**
@ -505,7 +505,7 @@ function filter_admin_order() {
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
$output = form($form); $output = form($form);
print theme('page', $output); return $output;
} }
/** /**
@ -544,7 +544,7 @@ function filter_admin_configure() {
$output = t('No settings are available.'); $output = t('No settings are available.');
} }
print theme('page', $output); return $output;
} }
/** /**
@ -764,7 +764,7 @@ function filter_tips_long() {
else { else {
$output = theme('filter_tips', _filter_tips(-1, true), true); $output = theme('filter_tips', _filter_tips(-1, true), true);
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -310,7 +310,7 @@ function filter_admin_overview() {
$group .= form($form); $group .= form($form);
$output .= '<h2>'. t('Add new input format') .'</h2>'. $group; $output .= '<h2>'. t('Add new input format') .'</h2>'. $group;
print theme('page', $output); return $output;
} }
/** /**
@ -403,7 +403,7 @@ function filter_admin_delete() {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
/** /**
@ -449,7 +449,7 @@ function filter_admin_filters() {
$group .= $tiplist; $group .= $tiplist;
$output .= '<h2>'. t('Formatting guidelines') .'</h2>'. $group; $output .= '<h2>'. t('Formatting guidelines') .'</h2>'. $group;
print theme('page', $output); return $output;
} }
/** /**
@ -505,7 +505,7 @@ function filter_admin_order() {
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
$output = form($form); $output = form($form);
print theme('page', $output); return $output;
} }
/** /**
@ -544,7 +544,7 @@ function filter_admin_configure() {
$output = t('No settings are available.'); $output = t('No settings are available.');
} }
print theme('page', $output); return $output;
} }
/** /**
@ -764,7 +764,7 @@ function filter_tips_long() {
else { else {
$output = theme('filter_tips', _filter_tips(-1, true), true); $output = theme('filter_tips', _filter_tips(-1, true), true);
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -105,7 +105,7 @@ function forum_admin() {
$output = forum_overview(); $output = forum_overview();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -299,7 +299,7 @@ function forum_admin_configure() {
$forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first')); $forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first'));
$output .= form_radios(t('Default order'), 'forum_order', variable_get('forum_order', '1'), $forder, t('The default display order for topics.')); $output .= form_radios(t('Default order'), 'forum_order', variable_get('forum_order', '1'), $forder, t('The default display order for topics.'));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -736,11 +736,11 @@ function forum_page($tid = 0) {
$topics = forum_get_topics($tid, $sortby, $forum_per_page); $topics = forum_get_topics($tid, $sortby, $forum_per_page);
} }
print theme('page', theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page)); return theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
} }
else { else {
drupal_set_title(t('Warning')); drupal_set_title(t('Warning'));
print theme('page', forum_help('admin/settings/forum')); return forum_help('admin/settings/forum');
} }
} }

View File

@ -105,7 +105,7 @@ function forum_admin() {
$output = forum_overview(); $output = forum_overview();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -299,7 +299,7 @@ function forum_admin_configure() {
$forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first')); $forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first'));
$output .= form_radios(t('Default order'), 'forum_order', variable_get('forum_order', '1'), $forder, t('The default display order for topics.')); $output .= form_radios(t('Default order'), 'forum_order', variable_get('forum_order', '1'), $forder, t('The default display order for topics.'));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -736,11 +736,11 @@ function forum_page($tid = 0) {
$topics = forum_get_topics($tid, $sortby, $forum_per_page); $topics = forum_get_topics($tid, $sortby, $forum_per_page);
} }
print theme('page', theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page)); return theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
} }
else { else {
drupal_set_title(t('Warning')); drupal_set_title(t('Warning'));
print theme('page', forum_help('admin/settings/forum')); return forum_help('admin/settings/forum');
} }
} }

View File

@ -63,7 +63,7 @@ function help_main() {
<dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal site but is <strong>not</strong> logged in with that account. Also termed \"anonymous user\".</dd> <dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal site but is <strong>not</strong> logged in with that account. Also termed \"anonymous user\".</dd>
</dl>", array('%Drupal' => 'http://drupal.org', '%handbook' => 'http://drupal.org/handbook', '%help_pages' => help_links_as_list(), '%taxonomy' => url('admin/help/taxonomy'))); </dl>", array('%Drupal' => 'http://drupal.org', '%handbook' => 'http://drupal.org/handbook', '%help_pages' => help_links_as_list(), '%taxonomy' => url('admin/help/taxonomy')));
print theme('page', $output); return $output;
} }
function help_links_as_list() { function help_links_as_list() {
@ -103,7 +103,7 @@ function help_page() {
$output .= $temp; $output .= $temp;
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -63,7 +63,7 @@ function help_main() {
<dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal site but is <strong>not</strong> logged in with that account. Also termed \"anonymous user\".</dd> <dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal site but is <strong>not</strong> logged in with that account. Also termed \"anonymous user\".</dd>
</dl>", array('%Drupal' => 'http://drupal.org', '%handbook' => 'http://drupal.org/handbook', '%help_pages' => help_links_as_list(), '%taxonomy' => url('admin/help/taxonomy'))); </dl>", array('%Drupal' => 'http://drupal.org', '%handbook' => 'http://drupal.org/handbook', '%help_pages' => help_links_as_list(), '%taxonomy' => url('admin/help/taxonomy')));
print theme('page', $output); return $output;
} }
function help_links_as_list() { function help_links_as_list() {
@ -103,7 +103,7 @@ function help_page() {
$output .= $temp; $output .= $temp;
} }
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -283,7 +283,7 @@ function locale_admin_manage() {
drupal_goto('admin/locale/language/overview'); drupal_goto('admin/locale/language/overview');
} }
print theme('page', _locale_admin_manage_screen()); return _locale_admin_manage_screen();
} }
/** /**
@ -327,7 +327,7 @@ function locale_admin_manage_delete_screen() {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
/** /**
@ -364,7 +364,7 @@ function locale_admin_manage_add() {
} }
break; break;
} }
print theme('page', _locale_admin_manage_add_screen()); return _locale_admin_manage_add_screen();
} }
// --------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
@ -397,7 +397,7 @@ function locale_admin_import() {
drupal_goto('admin/locale'); drupal_goto('admin/locale');
break; break;
} }
print theme('page', _locale_admin_import_screen()); return _locale_admin_import_screen();
} }
@ -414,7 +414,7 @@ function locale_admin_export() {
_locale_export_po($_POST['edit']['langcode']); _locale_export_po($_POST['edit']['langcode']);
break; break;
} }
print theme('page', _locale_admin_export_screen()); return _locale_admin_export_screen();
} }
@ -449,7 +449,7 @@ function locale_admin_string() {
break; break;
default: default:
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -283,7 +283,7 @@ function locale_admin_manage() {
drupal_goto('admin/locale/language/overview'); drupal_goto('admin/locale/language/overview');
} }
print theme('page', _locale_admin_manage_screen()); return _locale_admin_manage_screen();
} }
/** /**
@ -327,7 +327,7 @@ function locale_admin_manage_delete_screen() {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
/** /**
@ -364,7 +364,7 @@ function locale_admin_manage_add() {
} }
break; break;
} }
print theme('page', _locale_admin_manage_add_screen()); return _locale_admin_manage_add_screen();
} }
// --------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
@ -397,7 +397,7 @@ function locale_admin_import() {
drupal_goto('admin/locale'); drupal_goto('admin/locale');
break; break;
} }
print theme('page', _locale_admin_import_screen()); return _locale_admin_import_screen();
} }
@ -414,7 +414,7 @@ function locale_admin_export() {
_locale_export_po($_POST['edit']['langcode']); _locale_export_po($_POST['edit']['langcode']);
break; break;
} }
print theme('page', _locale_admin_export_screen()); return _locale_admin_export_screen();
} }
@ -449,7 +449,7 @@ function locale_admin_string() {
break; break;
default: default:
} }
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -104,7 +104,7 @@ function menu_perm() {
function menu_overview() { function menu_overview() {
menu_rebuild(); menu_rebuild();
print theme('page', menu_overview_tree()); return menu_overview_tree();
} }
/** /**
@ -124,7 +124,7 @@ function menu_reset() {
'admin/menu', 'admin/menu',
t('Any custom additions or changes to the menu will be lost.'), t('Any custom additions or changes to the menu will be lost.'),
t('Reset all')); t('Reset all'));
print theme('page', $output); return $output;
} }
} }
@ -150,7 +150,7 @@ function menu_add_menu() {
$output .= menu_edit_item_form($edit); $output .= menu_edit_item_form($edit);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -171,7 +171,7 @@ function menu_reset_item($mid) {
'admin/menu', 'admin/menu',
t('Any customizations will be lost. This action cannot be undone.'), t('Any customizations will be lost. This action cannot be undone.'),
t('Reset')); t('Reset'));
print theme('page', $output); return $output;
} }
} }
@ -204,7 +204,7 @@ function menu_delete_item($mid) {
$message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title))); $message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title)));
} }
$output = theme('confirm', $message, 'admin/menu', t('This action cannot be undone.'), t('Delete')); $output = theme('confirm', $message, 'admin/menu', t('This action cannot be undone.'), t('Delete'));
print theme('page', $output); return $output;
} }
} }
@ -260,7 +260,7 @@ function menu_edit_item($mid = 0) {
$output .= menu_edit_item_form($edit); $output .= menu_edit_item_form($edit);
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -104,7 +104,7 @@ function menu_perm() {
function menu_overview() { function menu_overview() {
menu_rebuild(); menu_rebuild();
print theme('page', menu_overview_tree()); return menu_overview_tree();
} }
/** /**
@ -124,7 +124,7 @@ function menu_reset() {
'admin/menu', 'admin/menu',
t('Any custom additions or changes to the menu will be lost.'), t('Any custom additions or changes to the menu will be lost.'),
t('Reset all')); t('Reset all'));
print theme('page', $output); return $output;
} }
} }
@ -150,7 +150,7 @@ function menu_add_menu() {
$output .= menu_edit_item_form($edit); $output .= menu_edit_item_form($edit);
} }
print theme('page', $output); return $output;
} }
/** /**
@ -171,7 +171,7 @@ function menu_reset_item($mid) {
'admin/menu', 'admin/menu',
t('Any customizations will be lost. This action cannot be undone.'), t('Any customizations will be lost. This action cannot be undone.'),
t('Reset')); t('Reset'));
print theme('page', $output); return $output;
} }
} }
@ -204,7 +204,7 @@ function menu_delete_item($mid) {
$message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title))); $message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title)));
} }
$output = theme('confirm', $message, 'admin/menu', t('This action cannot be undone.'), t('Delete')); $output = theme('confirm', $message, 'admin/menu', t('This action cannot be undone.'), t('Delete'));
print theme('page', $output); return $output;
} }
} }
@ -260,7 +260,7 @@ function menu_edit_item($mid = 0) {
$output .= menu_edit_item_form($edit); $output .= menu_edit_item_form($edit);
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -614,7 +614,7 @@ function node_configure() {
$output .= form_select(t('Length of trimmed posts'), 'teaser_length', variable_get('teaser_length', 600), array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'), 800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'), 1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.")); $output .= form_select(t('Length of trimmed posts'), 'teaser_length', variable_get('teaser_length', 600), array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'), 800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'), 1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers."));
$output .= form_radios(t('Preview post'), 'node_preview', variable_get('node_preview', 0), array(t('Optional'), t('Required')), t('Must users preview posts before submitting?')); $output .= form_radios(t('Preview post'), 'node_preview', variable_get('node_preview', 0), array(t('Optional'), t('Required')), t('Must users preview posts before submitting?'));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -958,6 +958,10 @@ function node_types_configure($type = NULL) {
// Go to the listing page when we submit this form, system_settings_save() calls drupal_goto(). // Go to the listing page when we submit this form, system_settings_save() calls drupal_goto().
if ($_POST['op']) { if ($_POST['op']) {
$_GET['q'] = 'admin/node/configure/types'; $_GET['q'] = 'admin/node/configure/types';
$options = 'options_'. $type;
if (empty($node->$options)) {
$node->$options = array();
}
} }
system_settings_save(); system_settings_save();
@ -968,7 +972,7 @@ function node_types_configure($type = NULL) {
$output = form_group(t('Submission form'), $group); $output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings'))); $output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
else { else {
$header = array(t('Type'), t('Operations')); $header = array(t('Type'), t('Operations'));
@ -978,7 +982,7 @@ function node_types_configure($type = NULL) {
$rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type)); $rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
} }
@ -1111,7 +1115,7 @@ function node_admin() {
default: default:
$output = node_admin_nodes(); $output = node_admin_nodes();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -1661,13 +1665,13 @@ function node_page() {
node_feed(); node_feed();
return; return;
case 'add': case 'add':
print theme('page', node_add(arg(2))); return node_add(arg(2));
break; break;
case 'edit': case 'edit':
print theme('page', node_edit(arg(1))); return node_edit(arg(1));
break; break;
case 'revisions': case 'revisions':
print theme('page', node_revision_overview(arg(1))); return node_revision_overview(arg(1));
break; break;
case 'rollback-revision': case 'rollback-revision':
node_revision_rollback(arg(1), arg(3)); node_revision_rollback(arg(1), arg(3));
@ -1680,7 +1684,7 @@ function node_page() {
$node = node_load(array('nid' => arg(1)), $_GET['revision']); $node = node_load(array('nid' => arg(1)), $_GET['revision']);
if ($node->nid) { if ($node->nid) {
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', node_show($node, arg(2))); return node_show($node, arg(2));
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -1690,7 +1694,7 @@ function node_page() {
case t('Preview'): case t('Preview'):
$edit = node_validate($edit); $edit = node_validate($edit);
drupal_set_title(t('Preview')); drupal_set_title(t('Preview'));
print theme('page', node_preview($edit)); return node_preview($edit);
break; break;
case t('Submit'): case t('Submit'):
if ($nid = node_submit($edit)) { if ($nid = node_submit($edit)) {
@ -1703,7 +1707,7 @@ function node_page() {
} }
else { else {
drupal_set_title(t('Submit')); drupal_set_title(t('Submit'));
print theme('page', node_preview($edit)); return node_preview($edit);
} }
break; break;
case 'delete': case 'delete':
@ -1719,11 +1723,11 @@ function node_page() {
drupal_set_message(t('The node has been deleted.')); drupal_set_message(t('The node has been deleted.'));
drupal_goto('admin/node'); drupal_goto('admin/node');
} }
print theme('page', node_delete($edit)); return node_delete($edit);
break; break;
default: default:
drupal_set_title(''); drupal_set_title('');
print theme('page', node_page_default()); return node_page_default();
} }
} }

View File

@ -614,7 +614,7 @@ function node_configure() {
$output .= form_select(t('Length of trimmed posts'), 'teaser_length', variable_get('teaser_length', 600), array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'), 800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'), 1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.")); $output .= form_select(t('Length of trimmed posts'), 'teaser_length', variable_get('teaser_length', 600), array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'), 800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'), 1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers."));
$output .= form_radios(t('Preview post'), 'node_preview', variable_get('node_preview', 0), array(t('Optional'), t('Required')), t('Must users preview posts before submitting?')); $output .= form_radios(t('Preview post'), 'node_preview', variable_get('node_preview', 0), array(t('Optional'), t('Required')), t('Must users preview posts before submitting?'));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -958,6 +958,10 @@ function node_types_configure($type = NULL) {
// Go to the listing page when we submit this form, system_settings_save() calls drupal_goto(). // Go to the listing page when we submit this form, system_settings_save() calls drupal_goto().
if ($_POST['op']) { if ($_POST['op']) {
$_GET['q'] = 'admin/node/configure/types'; $_GET['q'] = 'admin/node/configure/types';
$options = 'options_'. $type;
if (empty($node->$options)) {
$node->$options = array();
}
} }
system_settings_save(); system_settings_save();
@ -968,7 +972,7 @@ function node_types_configure($type = NULL) {
$output = form_group(t('Submission form'), $group); $output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings'))); $output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
else { else {
$header = array(t('Type'), t('Operations')); $header = array(t('Type'), t('Operations'));
@ -978,7 +982,7 @@ function node_types_configure($type = NULL) {
$rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type)); $rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
} }
@ -1111,7 +1115,7 @@ function node_admin() {
default: default:
$output = node_admin_nodes(); $output = node_admin_nodes();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -1661,13 +1665,13 @@ function node_page() {
node_feed(); node_feed();
return; return;
case 'add': case 'add':
print theme('page', node_add(arg(2))); return node_add(arg(2));
break; break;
case 'edit': case 'edit':
print theme('page', node_edit(arg(1))); return node_edit(arg(1));
break; break;
case 'revisions': case 'revisions':
print theme('page', node_revision_overview(arg(1))); return node_revision_overview(arg(1));
break; break;
case 'rollback-revision': case 'rollback-revision':
node_revision_rollback(arg(1), arg(3)); node_revision_rollback(arg(1), arg(3));
@ -1680,7 +1684,7 @@ function node_page() {
$node = node_load(array('nid' => arg(1)), $_GET['revision']); $node = node_load(array('nid' => arg(1)), $_GET['revision']);
if ($node->nid) { if ($node->nid) {
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', node_show($node, arg(2))); return node_show($node, arg(2));
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -1690,7 +1694,7 @@ function node_page() {
case t('Preview'): case t('Preview'):
$edit = node_validate($edit); $edit = node_validate($edit);
drupal_set_title(t('Preview')); drupal_set_title(t('Preview'));
print theme('page', node_preview($edit)); return node_preview($edit);
break; break;
case t('Submit'): case t('Submit'):
if ($nid = node_submit($edit)) { if ($nid = node_submit($edit)) {
@ -1703,7 +1707,7 @@ function node_page() {
} }
else { else {
drupal_set_title(t('Submit')); drupal_set_title(t('Submit'));
print theme('page', node_preview($edit)); return node_preview($edit);
} }
break; break;
case 'delete': case 'delete':
@ -1719,11 +1723,11 @@ function node_page() {
drupal_set_message(t('The node has been deleted.')); drupal_set_message(t('The node has been deleted.'));
drupal_goto('admin/node'); drupal_goto('admin/node');
} }
print theme('page', node_delete($edit)); return node_delete($edit);
break; break;
default: default:
drupal_set_title(''); drupal_set_title('');
print theme('page', node_page_default()); return node_page_default();
} }
} }

View File

@ -95,7 +95,7 @@ function path_menu($may_cache) {
* Menu callback; presents an overview of all URL aliases. * Menu callback; presents an overview of all URL aliases.
*/ */
function path_admin() { function path_admin() {
print theme('page', path_overview()); return path_overview();
} }
/** /**
@ -114,7 +114,7 @@ function path_admin_edit($pid = 0) {
$output = path_form(); $output = path_form();
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -95,7 +95,7 @@ function path_menu($may_cache) {
* Menu callback; presents an overview of all URL aliases. * Menu callback; presents an overview of all URL aliases.
*/ */
function path_admin() { function path_admin() {
print theme('page', path_overview()); return path_overview();
} }
/** /**
@ -114,7 +114,7 @@ function path_admin_edit($pid = 0) {
$output = path_form(); $output = path_form();
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -274,7 +274,7 @@ function poll_page() {
} }
$output .= '</ul>'; $output .= '</ul>';
$output .= theme("pager", NULL, 15); $output .= theme("pager", NULL, 15);
print theme('page', $output); return $output;
} }
/** /**
@ -361,7 +361,7 @@ function poll_view_results(&$node, $teaser, $page, $block) {
function poll_results() { function poll_results() {
if ($node = node_load(array('nid' => arg(1)))) { if ($node = node_load(array('nid' => arg(1)))) {
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', node_show($node, 0)); return node_show($node, 0);
} }
else { else {
drupal_not_found(); drupal_not_found();

View File

@ -274,7 +274,7 @@ function poll_page() {
} }
$output .= '</ul>'; $output .= '</ul>';
$output .= theme("pager", NULL, 15); $output .= theme("pager", NULL, 15);
print theme('page', $output); return $output;
} }
/** /**
@ -361,7 +361,7 @@ function poll_view_results(&$node, $teaser, $page, $block) {
function poll_results() { function poll_results() {
if ($node = node_load(array('nid' => arg(1)))) { if ($node = node_load(array('nid' => arg(1)))) {
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', node_show($node, 0)); return node_show($node, 0);
} }
else { else {
drupal_not_found(); drupal_not_found();

View File

@ -177,7 +177,7 @@ function profile_browse() {
$output .= '</div>'; $output .= '</div>';
drupal_set_title($title); drupal_set_title($title);
print theme('page', $output); return $output;
} }
else if ($name && !$field->id) { else if ($name && !$field->id) {
drupal_not_found(); drupal_not_found();
@ -201,7 +201,7 @@ function profile_browse() {
$output .= theme('pager', NULL, 20); $output .= theme('pager', NULL, 20);
drupal_set_title(t('user list')); drupal_set_title(t('user list'));
print theme('page', $output); return $output;
} }
} }
@ -523,7 +523,7 @@ function profile_admin_add($type) {
} }
drupal_set_title(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)); return _profile_field_form($type, $data);
} }
/** /**
@ -551,7 +551,7 @@ function profile_admin_edit($fid) {
} }
drupal_set_title(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)); return _profile_field_form($data['type'], $data);
} }
/** /**
@ -617,7 +617,7 @@ function profile_admin_overview() {
} }
$output .= '</ul>'; $output .= '</ul>';
print theme('page', $output); return $output;
} }
function theme_profile_block($user, $fields = array()) { function theme_profile_block($user, $fields = array()) {

View File

@ -177,7 +177,7 @@ function profile_browse() {
$output .= '</div>'; $output .= '</div>';
drupal_set_title($title); drupal_set_title($title);
print theme('page', $output); return $output;
} }
else if ($name && !$field->id) { else if ($name && !$field->id) {
drupal_not_found(); drupal_not_found();
@ -201,7 +201,7 @@ function profile_browse() {
$output .= theme('pager', NULL, 20); $output .= theme('pager', NULL, 20);
drupal_set_title(t('user list')); drupal_set_title(t('user list'));
print theme('page', $output); return $output;
} }
} }
@ -523,7 +523,7 @@ function profile_admin_add($type) {
} }
drupal_set_title(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)); return _profile_field_form($type, $data);
} }
/** /**
@ -551,7 +551,7 @@ function profile_admin_edit($fid) {
} }
drupal_set_title(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)); return _profile_field_form($data['type'], $data);
} }
/** /**
@ -617,7 +617,7 @@ function profile_admin_overview() {
} }
$output .= '</ul>'; $output .= '</ul>';
print theme('page', $output); return $output;
} }
function theme_profile_block($user, $fields = array()) { function theme_profile_block($user, $fields = array()) {

View File

@ -162,7 +162,7 @@ function search_admin() {
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.')); $group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$output .= form_group(t('Indexing settings'), $group); $output .= form_group(t('Indexing settings'), $group);
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -598,7 +598,7 @@ function search_view() {
$output .= $results; $output .= $results;
print theme('page', $output); return $output;
} }
else { else {
drupal_access_denied(); drupal_access_denied();

View File

@ -162,7 +162,7 @@ function search_admin() {
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.')); $group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$output .= form_group(t('Indexing settings'), $group); $output .= form_group(t('Indexing settings'), $group);
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
/** /**
@ -598,7 +598,7 @@ function search_view() {
$output .= $results; $output .= $results;
print theme('page', $output); return $output;
} }
else { else {
drupal_access_denied(); drupal_access_denied();

View File

@ -154,7 +154,7 @@ function statistics_access_log($aid) {
$output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($access) .'</td></tr>'; $output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($access) .'</td></tr>';
$output .= ' <tr><th>'. t('Hostname') ."</th><td>$access->hostname</td></tr>"; $output .= ' <tr><th>'. t('Hostname') ."</th><td>$access->hostname</td></tr>";
$output .= '</table>'; $output .= '</table>';
print theme('page', $output); return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -184,7 +184,7 @@ function statistics_node_tracker() {
} }
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -212,7 +212,7 @@ function statistics_user_tracker() {
} }
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -245,7 +245,7 @@ function statistics_recent_hits($type = 'all', $id = 0) {
$rows[] = array(array('data' => $pager, 'colspan' => '4')); $rows[] = array(array('data' => $pager, 'colspan' => '4'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**
@ -270,7 +270,7 @@ function statistics_top_pages() {
} }
drupal_set_title(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)); return theme('table', $header, $rows);
} }
/** /**
@ -296,7 +296,7 @@ function statistics_top_users() {
} }
drupal_set_title(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)); return theme('table', $header, $rows);
} }
/** /**
@ -323,7 +323,7 @@ function statistics_top_referrers() {
$rows[] = array(array('data' => $pager, 'colspan' => '3')); $rows[] = array(array('data' => $pager, 'colspan' => '3'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**

View File

@ -154,7 +154,7 @@ function statistics_access_log($aid) {
$output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($access) .'</td></tr>'; $output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($access) .'</td></tr>';
$output .= ' <tr><th>'. t('Hostname') ."</th><td>$access->hostname</td></tr>"; $output .= ' <tr><th>'. t('Hostname') ."</th><td>$access->hostname</td></tr>";
$output .= '</table>'; $output .= '</table>';
print theme('page', $output); return $output;
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -184,7 +184,7 @@ function statistics_node_tracker() {
} }
drupal_set_title(check_plain($node->title)); drupal_set_title(check_plain($node->title));
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -212,7 +212,7 @@ function statistics_user_tracker() {
} }
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -245,7 +245,7 @@ function statistics_recent_hits($type = 'all', $id = 0) {
$rows[] = array(array('data' => $pager, 'colspan' => '4')); $rows[] = array(array('data' => $pager, 'colspan' => '4'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**
@ -270,7 +270,7 @@ function statistics_top_pages() {
} }
drupal_set_title(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)); return theme('table', $header, $rows);
} }
/** /**
@ -296,7 +296,7 @@ function statistics_top_users() {
} }
drupal_set_title(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)); return theme('table', $header, $rows);
} }
/** /**
@ -323,7 +323,7 @@ function statistics_top_referrers() {
$rows[] = array(array('data' => $pager, 'colspan' => '3')); $rows[] = array(array('data' => $pager, 'colspan' => '3'));
} }
print theme('page', theme('table', $header, $rows)); return theme('table', $header, $rows);
} }
/** /**

View File

@ -70,7 +70,7 @@ function system_menu($may_cache) {
$items[] = array('path' => 'admin', 'title' => t('administer'), $items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'), 'access' => user_access('access administration pages'),
'callback' => 'system_admin_page', 'callback' => 'watchdog_overview',
'weight' => 9); 'weight' => 9);
// Themes: // Themes:
@ -119,13 +119,6 @@ function system_test() {
exit; exit;
} }
/**
* Menu callback; provides the main page of the administration section.
*/
function system_admin_page() {
watchdog_overview('actions');
}
/** /**
* Implementation of hook_user(). * Implementation of hook_user().
* *
@ -574,7 +567,7 @@ function system_themes() {
system_listing_save(); system_listing_save();
$form = system_theme_listing(); $form = system_theme_listing();
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
print theme('page', form($form)); return form($form);
} }
/** /**
@ -584,7 +577,7 @@ function system_modules() {
system_listing_save(); system_listing_save();
$form = system_module_listing(); $form = system_module_listing();
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
print theme('page', form($form)); return form($form);
} }
/** /**
@ -600,7 +593,7 @@ function system_site_settings($module = NULL) {
$form = system_view_general(); $form = system_view_general();
} }
print theme('page', system_settings_form($form)); return system_settings_form($form);
} }
/** /**
@ -711,7 +704,7 @@ function system_theme_settings($key = '') {
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
$form .= form_submit(t('Reset to defaults')); $form .= form_submit(t('Reset to defaults'));
print theme('page', form($form, 'post', null, array('enctype' => 'multipart/form-data'))); return form($form, 'post', null, array('enctype' => 'multipart/form-data'));
} }

View File

@ -70,7 +70,7 @@ function system_menu($may_cache) {
$items[] = array('path' => 'admin', 'title' => t('administer'), $items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'), 'access' => user_access('access administration pages'),
'callback' => 'system_admin_page', 'callback' => 'watchdog_overview',
'weight' => 9); 'weight' => 9);
// Themes: // Themes:
@ -119,13 +119,6 @@ function system_test() {
exit; exit;
} }
/**
* Menu callback; provides the main page of the administration section.
*/
function system_admin_page() {
watchdog_overview('actions');
}
/** /**
* Implementation of hook_user(). * Implementation of hook_user().
* *
@ -574,7 +567,7 @@ function system_themes() {
system_listing_save(); system_listing_save();
$form = system_theme_listing(); $form = system_theme_listing();
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
print theme('page', form($form)); return form($form);
} }
/** /**
@ -584,7 +577,7 @@ function system_modules() {
system_listing_save(); system_listing_save();
$form = system_module_listing(); $form = system_module_listing();
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
print theme('page', form($form)); return form($form);
} }
/** /**
@ -600,7 +593,7 @@ function system_site_settings($module = NULL) {
$form = system_view_general(); $form = system_view_general();
} }
print theme('page', system_settings_form($form)); return system_settings_form($form);
} }
/** /**
@ -711,7 +704,7 @@ function system_theme_settings($key = '') {
$form .= form_submit(t('Save configuration')); $form .= form_submit(t('Save configuration'));
$form .= form_submit(t('Reset to defaults')); $form .= form_submit(t('Reset to defaults'));
print theme('page', form($form, 'post', null, array('enctype' => 'multipart/form-data'))); return form($form, 'post', null, array('enctype' => 'multipart/form-data'));
} }

View File

@ -1080,7 +1080,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
$output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed")); $output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed"));
print theme('page', $output); return $output;
break; break;
case 'feed': case 'feed':
@ -1118,8 +1118,7 @@ function taxonomy_admin() {
if (is_numeric(arg(2)) && arg(3) == 'add' && arg(4) == 'term') { if (is_numeric(arg(2)) && arg(3) == 'add' && arg(4) == 'term') {
if ($op != t('Submit')) { if ($op != t('Submit')) {
$output = taxonomy_form_term(array('vid' => arg(2))); $output = taxonomy_form_term(array('vid' => arg(2)));
print theme('page', $output); return $output;
return;
} }
else { else {
taxonomy_save_term($edit); taxonomy_save_term($edit);
@ -1170,7 +1169,7 @@ function taxonomy_admin() {
$output = taxonomy_overview(); $output = taxonomy_overview();
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -1080,7 +1080,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
$output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed")); $output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed"));
print theme('page', $output); return $output;
break; break;
case 'feed': case 'feed':
@ -1118,8 +1118,7 @@ function taxonomy_admin() {
if (is_numeric(arg(2)) && arg(3) == 'add' && arg(4) == 'term') { if (is_numeric(arg(2)) && arg(3) == 'add' && arg(4) == 'term') {
if ($op != t('Submit')) { if ($op != t('Submit')) {
$output = taxonomy_form_term(array('vid' => arg(2))); $output = taxonomy_form_term(array('vid' => arg(2)));
print theme('page', $output); return $output;
return;
} }
else { else {
taxonomy_save_term($edit); taxonomy_save_term($edit);
@ -1170,7 +1169,7 @@ function taxonomy_admin() {
$output = taxonomy_overview(); $output = taxonomy_overview();
} }
print theme('page', $output); return $output;
} }
/** /**

View File

@ -118,7 +118,7 @@ function tracker_page($uid = 0) {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -118,7 +118,7 @@ function tracker_page($uid = 0) {
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
$output .= '</div>'; $output .= '</div>';
print theme('page', $output); return $output;
} }
?> ?>

View File

@ -97,7 +97,7 @@ function upload_admin() {
$output .= form_group(t('Settings for %role', array('%role' => "<em>$role</em>")), $group); $output .= form_group(t('Settings for %role', array('%role' => "<em>$role</em>")), $group);
} }
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
function upload_download() { function upload_download() {

View File

@ -97,7 +97,7 @@ function upload_admin() {
$output .= form_group(t('Settings for %role', array('%role' => "<em>$role</em>")), $group); $output .= form_group(t('Settings for %role', array('%role' => "<em>$role</em>")), $group);
} }
print theme('page', system_settings_form($output)); return system_settings_form($output);
} }
function upload_download() { function upload_download() {

View File

@ -951,7 +951,7 @@ function user_pass() {
$output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64); $output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64);
$output .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64); $output .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64);
$output .= form_submit(t('E-mail new password')); $output .= form_submit(t('E-mail new password'));
print theme('page', form($output)); return form($output);
} }
} }
@ -1207,8 +1207,7 @@ function user_edit($category = 'account') {
'user/'. $account->uid, 'user/'. $account->uid,
t('Deleting a user will remove all their submissions as well. This action cannot be undone.'), t('Deleting a user will remove all their submissions as well. This action cannot be undone.'),
t('Delete')); t('Delete'));
print theme('page', $output); return $output;
return;
} }
} }
else if ($_POST['op'] == t('Delete')) { else if ($_POST['op'] == t('Delete')) {
@ -1224,7 +1223,7 @@ function user_edit($category = 'account') {
$output = form($output, 'post', 0, array('enctype' => 'multipart/form-data')); $output = form($output, 'post', 0, array('enctype' => 'multipart/form-data'));
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', $output); return $output;
} }
function user_view($uid = 0) { function user_view($uid = 0) {
@ -1242,7 +1241,7 @@ function user_view($uid = 0) {
} }
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', theme('user_profile', $account, $fields)); return theme('user_profile', $account, $fields);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -1262,11 +1261,11 @@ function user_page() {
switch ($op) { switch ($op) {
case t('Create new account'): case t('Create new account'):
case 'register': case 'register':
print theme('page', user_register($edit)); return user_register($edit);
break; break;
case t('Log in'): case t('Log in'):
case 'login': case 'login':
print theme('page', user_login($edit)); return user_login($edit);
break; break;
default: default:
if (!arg(1)) { if (!arg(1)) {
@ -1274,7 +1273,7 @@ function user_page() {
drupal_goto('user/'. $user->uid); drupal_goto('user/'. $user->uid);
} }
else { else {
print theme('page', user_login($edit)); return user_login($edit);
} }
} }
else { else {
@ -1397,7 +1396,7 @@ function user_admin_access_check() {
$form .= form_submit('Check e-mail'); $form .= form_submit('Check e-mail');
$output .= form($form); $output .= form($form);
print theme('page', $output); return $output;
} }
/** /**
@ -1419,7 +1418,7 @@ function user_admin_access_add() {
$form = _user_admin_access_form($edit); $form = _user_admin_access_form($edit);
$form .= form_submit(t('Add rule')); $form .= form_submit(t('Add rule'));
print theme('page', form($form, 'post', NULL, array('id' => 'access-rules'))); return form($form, 'post', NULL, array('id' => 'access-rules'));
} }
/** /**
@ -1442,7 +1441,7 @@ function user_admin_access_delete($aid = 0) {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
} }
@ -1465,7 +1464,7 @@ function user_admin_access_edit($aid = 0) {
} }
$form = _user_admin_access_form($edit); $form = _user_admin_access_form($edit);
$form .= form_submit(t('Save rule')); $form .= form_submit(t('Save rule'));
print theme('page', form($form, 'post', NULL, array('id' => 'access-rules'))); return form($form, 'post', NULL, array('id' => 'access-rules'));
} }
function _user_admin_access_form($edit) { function _user_admin_access_form($edit) {
@ -1492,7 +1491,7 @@ function user_admin_access() {
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
print theme('page', $output); return $output;
} }
function user_roles($membersonly = 0, $permission = 0) { function user_roles($membersonly = 0, $permission = 0) {
@ -1577,7 +1576,7 @@ function user_admin_perm() {
$output = theme('table', $header, $rows, array('id' => 'permissions')); $output = theme('table', $header, $rows, array('id' => 'permissions'));
$output .= form_submit(t('Save permissions')); $output .= form_submit(t('Save permissions'));
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1659,7 +1658,7 @@ function user_admin_role() {
$output = form($output); $output = form($output);
} }
print theme('page', $output); return $output;
} }
function user_admin_account() { function user_admin_account() {
@ -1709,7 +1708,7 @@ function user_configure() {
} }
$output = system_settings_form(user_configure_settings()); $output = system_settings_form(user_configure_settings());
print theme('page', $output); return $output;
} }
function user_admin() { function user_admin() {
@ -1732,7 +1731,7 @@ function user_admin() {
default: default:
$output = user_admin_account(); $output = user_admin_account();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -1812,7 +1811,7 @@ function user_help($section) {
* Menu callback; Prints user-specific help information. * Menu callback; Prints user-specific help information.
*/ */
function user_help_page() { function user_help_page() {
print theme('page', user_help('user/help#user')); return user_help('user/help#user');
} }
/** /**

View File

@ -951,7 +951,7 @@ function user_pass() {
$output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64); $output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64);
$output .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64); $output .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 64);
$output .= form_submit(t('E-mail new password')); $output .= form_submit(t('E-mail new password'));
print theme('page', form($output)); return form($output);
} }
} }
@ -1207,8 +1207,7 @@ function user_edit($category = 'account') {
'user/'. $account->uid, 'user/'. $account->uid,
t('Deleting a user will remove all their submissions as well. This action cannot be undone.'), t('Deleting a user will remove all their submissions as well. This action cannot be undone.'),
t('Delete')); t('Delete'));
print theme('page', $output); return $output;
return;
} }
} }
else if ($_POST['op'] == t('Delete')) { else if ($_POST['op'] == t('Delete')) {
@ -1224,7 +1223,7 @@ function user_edit($category = 'account') {
$output = form($output, 'post', 0, array('enctype' => 'multipart/form-data')); $output = form($output, 'post', 0, array('enctype' => 'multipart/form-data'));
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', $output); return $output;
} }
function user_view($uid = 0) { function user_view($uid = 0) {
@ -1242,7 +1241,7 @@ function user_view($uid = 0) {
} }
drupal_set_title($account->name); drupal_set_title($account->name);
print theme('page', theme('user_profile', $account, $fields)); return theme('user_profile', $account, $fields);
} }
else { else {
drupal_not_found(); drupal_not_found();
@ -1262,11 +1261,11 @@ function user_page() {
switch ($op) { switch ($op) {
case t('Create new account'): case t('Create new account'):
case 'register': case 'register':
print theme('page', user_register($edit)); return user_register($edit);
break; break;
case t('Log in'): case t('Log in'):
case 'login': case 'login':
print theme('page', user_login($edit)); return user_login($edit);
break; break;
default: default:
if (!arg(1)) { if (!arg(1)) {
@ -1274,7 +1273,7 @@ function user_page() {
drupal_goto('user/'. $user->uid); drupal_goto('user/'. $user->uid);
} }
else { else {
print theme('page', user_login($edit)); return user_login($edit);
} }
} }
else { else {
@ -1397,7 +1396,7 @@ function user_admin_access_check() {
$form .= form_submit('Check e-mail'); $form .= form_submit('Check e-mail');
$output .= form($form); $output .= form($form);
print theme('page', $output); return $output;
} }
/** /**
@ -1419,7 +1418,7 @@ function user_admin_access_add() {
$form = _user_admin_access_form($edit); $form = _user_admin_access_form($edit);
$form .= form_submit(t('Add rule')); $form .= form_submit(t('Add rule'));
print theme('page', form($form, 'post', NULL, array('id' => 'access-rules'))); return form($form, 'post', NULL, array('id' => 'access-rules'));
} }
/** /**
@ -1442,7 +1441,7 @@ function user_admin_access_delete($aid = 0) {
t('Delete'), t('Delete'),
t('Cancel'), t('Cancel'),
$extra); $extra);
print theme('page', $output); return $output;
} }
} }
@ -1465,7 +1464,7 @@ function user_admin_access_edit($aid = 0) {
} }
$form = _user_admin_access_form($edit); $form = _user_admin_access_form($edit);
$form .= form_submit(t('Save rule')); $form .= form_submit(t('Save rule'));
print theme('page', form($form, 'post', NULL, array('id' => 'access-rules'))); return form($form, 'post', NULL, array('id' => 'access-rules'));
} }
function _user_admin_access_form($edit) { function _user_admin_access_form($edit) {
@ -1492,7 +1491,7 @@ function user_admin_access() {
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
print theme('page', $output); return $output;
} }
function user_roles($membersonly = 0, $permission = 0) { function user_roles($membersonly = 0, $permission = 0) {
@ -1577,7 +1576,7 @@ function user_admin_perm() {
$output = theme('table', $header, $rows, array('id' => 'permissions')); $output = theme('table', $header, $rows, array('id' => 'permissions'));
$output .= form_submit(t('Save permissions')); $output .= form_submit(t('Save permissions'));
print theme('page', form($output)); return form($output);
} }
/** /**
@ -1659,7 +1658,7 @@ function user_admin_role() {
$output = form($output); $output = form($output);
} }
print theme('page', $output); return $output;
} }
function user_admin_account() { function user_admin_account() {
@ -1709,7 +1708,7 @@ function user_configure() {
} }
$output = system_settings_form(user_configure_settings()); $output = system_settings_form(user_configure_settings());
print theme('page', $output); return $output;
} }
function user_admin() { function user_admin() {
@ -1732,7 +1731,7 @@ function user_admin() {
default: default:
$output = user_admin_account(); $output = user_admin_account();
} }
print theme('page', $output); return $output;
} }
/** /**
@ -1812,7 +1811,7 @@ function user_help($section) {
* Menu callback; Prints user-specific help information. * Menu callback; Prints user-specific help information.
*/ */
function user_help_page() { function user_help_page() {
print theme('page', user_help('user/help#user')); return user_help('user/help#user');
} }
/** /**

View File

@ -125,7 +125,7 @@ function watchdog_overview() {
$output = '<div class="container-inline">'. form($form) .'</div>'; $output = '<div class="container-inline">'. form($form) .'</div>';
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
print theme('page', $output); return $output;
} }
/** /**
@ -146,7 +146,7 @@ function watchdog_event($id) {
$output .= ' <tr><th>'. t('Hostname') ."</th><td>$watchdog->hostname</td></tr>"; $output .= ' <tr><th>'. t('Hostname') ."</th><td>$watchdog->hostname</td></tr>";
$output .= '</table>'; $output .= '</table>';
} }
print theme('page', $output); return $output;
} }
function _watchdog_get_message_types() { function _watchdog_get_message_types() {

View File

@ -125,7 +125,7 @@ function watchdog_overview() {
$output = '<div class="container-inline">'. form($form) .'</div>'; $output = '<div class="container-inline">'. form($form) .'</div>';
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
print theme('page', $output); return $output;
} }
/** /**
@ -146,7 +146,7 @@ function watchdog_event($id) {
$output .= ' <tr><th>'. t('Hostname') ."</th><td>$watchdog->hostname</td></tr>"; $output .= ' <tr><th>'. t('Hostname') ."</th><td>$watchdog->hostname</td></tr>";
$output .= '</table>'; $output .= '</table>';
} }
print theme('page', $output); return $output;
} }
function _watchdog_get_message_types() { function _watchdog_get_message_types() {