Skip to content

Commit

Permalink
- Patch 20910 by chx: centralize print theme page.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuytaert committed Apr 24, 2005
1 parent 79a5700 commit a76a1e1
Show file tree
Hide file tree
Showing 52 changed files with 260 additions and 268 deletions.
3 changes: 1 addition & 2 deletions includes/menu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ function menu_execute_active_handler() {
$arguments = array_merge($arguments, explode('/', $arg));
}

call_user_func_array($menu['items'][$mid]['callback'], $arguments);
return MENU_FOUND;
return call_user_func_array($menu['items'][$mid]['callback'], $arguments);
}

/**
Expand Down
9 changes: 7 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@

fix_gpc_magic();

$status = menu_execute_active_handler();
switch ($status) {
$return = menu_execute_active_handler();
switch ($return) {
case MENU_NOT_FOUND:
drupal_not_found();
break;
case MENU_ACCESS_DENIED:
drupal_access_denied();
break;
default:
if (!empty($return)) {
print theme('page', $return);
}
break;
}

drupal_page_footer();
Expand Down
14 changes: 7 additions & 7 deletions modules/aggregator.module
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ function aggregator_edit() {
$output = aggregator_form_feed(aggregator_get_feed(arg(2)));
}

print theme('page', $output);
return $output;
}


Expand Down Expand Up @@ -792,7 +792,7 @@ function aggregator_admin_edit_category($category = 0) {
$output = aggregator_form_category();
}
}
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -822,7 +822,7 @@ function aggregator_admin_edit_feed($feed = 0) {
$output = aggregator_form_feed();
}
}
print theme('page', $output);
return $output;
}

/**
Expand All @@ -845,7 +845,7 @@ function aggregator_admin_refresh_feed($feed) {
* Menu callback; displays the aggregator administration page.
*/
function aggregator_admin_overview() {
print theme('page', aggregator_view());
return aggregator_view();
}

/**
Expand Down Expand Up @@ -946,7 +946,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
$output .= $pager;
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -971,7 +971,7 @@ function aggregator_page_sources() {
}
$output .= theme('xml_icon', url('aggregator/opml'));
$output .= '</div>';
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -1020,7 +1020,7 @@ function aggregator_page_categories() {
}
$output .= '</div>';

print theme('page', $output);
return $output;
}

/**
Expand Down
14 changes: 7 additions & 7 deletions modules/aggregator/aggregator.module
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ function aggregator_edit() {
$output = aggregator_form_feed(aggregator_get_feed(arg(2)));
}

print theme('page', $output);
return $output;
}


Expand Down Expand Up @@ -792,7 +792,7 @@ function aggregator_admin_edit_category($category = 0) {
$output = aggregator_form_category();
}
}
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -822,7 +822,7 @@ function aggregator_admin_edit_feed($feed = 0) {
$output = aggregator_form_feed();
}
}
print theme('page', $output);
return $output;
}

/**
Expand All @@ -845,7 +845,7 @@ function aggregator_admin_refresh_feed($feed) {
* Menu callback; displays the aggregator administration page.
*/
function aggregator_admin_overview() {
print theme('page', aggregator_view());
return aggregator_view();
}

/**
Expand Down Expand Up @@ -946,7 +946,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
$output .= $pager;
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -971,7 +971,7 @@ function aggregator_page_sources() {
}
$output .= theme('xml_icon', url('aggregator/opml'));
$output .= '</div>';
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -1020,7 +1020,7 @@ function aggregator_page_categories() {
}
$output .= '</div>';

print theme('page', $output);
return $output;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/archive.module
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function archive_page($year = 0, $month = 0, $day = 0) {
$output .= node_view(node_load(array('nid' => $nid->nid)), 1);
}
}
print theme('page', $output);
return $output;
}

?>
2 changes: 1 addition & 1 deletion modules/archive/archive.module
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function archive_page($year = 0, $month = 0, $day = 0) {
$output .= node_view(node_load(array('nid' => $nid->nid)), 1);
}
}
print theme('page', $output);
return $output;
}

?>
8 changes: 4 additions & 4 deletions modules/block.module
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function block_admin_configure($module = NULL, $delta = 0) {

$form .= form_submit(t('Save block'));

print theme('page', form($form));
return form($form);
}
}

Expand All @@ -323,7 +323,7 @@ function block_box_add() {
$output .= form($form);
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -348,7 +348,7 @@ function block_box_delete($bid = 0) {
t('Delete'));
}

print theme('page', $output);
return $output;
}

function block_box_form($edit = array()) {
Expand Down Expand Up @@ -390,7 +390,7 @@ function block_admin() {
cache_clear_all();
drupal_goto($_GET['q']);
}
print theme('page', block_admin_display());
return block_admin_display();
}

/**
Expand Down
8 changes: 4 additions & 4 deletions modules/block/block.module
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function block_admin_configure($module = NULL, $delta = 0) {

$form .= form_submit(t('Save block'));

print theme('page', form($form));
return form($form);
}
}

Expand All @@ -323,7 +323,7 @@ function block_box_add() {
$output .= form($form);
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -348,7 +348,7 @@ function block_box_delete($bid = 0) {
t('Delete'));
}

print theme('page', $output);
return $output;
}

function block_box_form($edit = array()) {
Expand Down Expand Up @@ -390,7 +390,7 @@ function block_admin() {
cache_clear_all();
drupal_goto($_GET['q']);
}
print theme('page', block_admin_display());
return block_admin_display();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions modules/blog.module
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function blog_page_user($uid) {
$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") .'" />');
print theme('page', $output);
return $output;
}
else {
drupal_not_found();
Expand All @@ -173,7 +173,7 @@ function blog_page_last() {
$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') .'" />');
print theme('page', $output);
return $output;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions modules/blog/blog.module
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function blog_page_user($uid) {
$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") .'" />');
print theme('page', $output);
return $output;
}
else {
drupal_not_found();
Expand All @@ -173,7 +173,7 @@ function blog_page_last() {
$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') .'" />');
print theme('page', $output);
return $output;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions modules/book.module
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function book_outline() {
}

drupal_set_title(check_plain($node->title));
print theme('page', form($output));
return form($output);
}
}
}
Expand Down Expand Up @@ -611,7 +611,7 @@ function book_render() {
}

drupal_set_title(t('Books'));
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -767,7 +767,7 @@ function book_admin_orphan() {
$output .= theme('table', $header, $rows);
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -785,7 +785,7 @@ function book_admin($nid = 0) {
$output .= book_admin_view($nid);
break;
}
print theme('page', $output);
return $output;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions modules/book/book.module
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function book_outline() {
}

drupal_set_title(check_plain($node->title));
print theme('page', form($output));
return form($output);
}
}
}
Expand Down Expand Up @@ -611,7 +611,7 @@ function book_render() {
}

drupal_set_title(t('Books'));
print theme('page', $output);
return $output;
}

/**
Expand Down Expand Up @@ -767,7 +767,7 @@ function book_admin_orphan() {
$output .= theme('table', $header, $rows);
}

print theme('page', $output);
return $output;
}

/**
Expand All @@ -785,7 +785,7 @@ function book_admin($nid = 0) {
$output .= book_admin_view($nid);
break;
}
print theme('page', $output);
return $output;
}

/**
Expand Down
Loading

0 comments on commit a76a1e1

Please sign in to comment.