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 not logged in with that account. Also termed \"anonymous user\".
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 not logged in with that account. Also termed \"anonymous user\".
", 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() {
@@ -103,7 +103,7 @@ function help_page() {
$output .= $temp;
}
}
- print theme('page', $output);
+ return $output;
}
?>
diff --git a/modules/locale.module b/modules/locale.module
index 493d34a99148..aba4acab13eb 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -283,7 +283,7 @@ function locale_admin_manage() {
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('Cancel'),
$extra);
- print theme('page', $output);
+ return $output;
}
/**
@@ -364,7 +364,7 @@ function locale_admin_manage_add() {
}
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');
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']);
break;
}
- print theme('page', _locale_admin_export_screen());
+ return _locale_admin_export_screen();
}
@@ -449,7 +449,7 @@ function locale_admin_string() {
break;
default:
}
- print theme('page', $output);
+ return $output;
}
?>
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 493d34a99148..aba4acab13eb 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -283,7 +283,7 @@ function locale_admin_manage() {
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('Cancel'),
$extra);
- print theme('page', $output);
+ return $output;
}
/**
@@ -364,7 +364,7 @@ function locale_admin_manage_add() {
}
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');
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']);
break;
}
- print theme('page', _locale_admin_export_screen());
+ return _locale_admin_export_screen();
}
@@ -449,7 +449,7 @@ function locale_admin_string() {
break;
default:
}
- print theme('page', $output);
+ return $output;
}
?>
diff --git a/modules/menu.module b/modules/menu.module
index 26ac4e1278d5..7baf23327724 100644
--- a/modules/menu.module
+++ b/modules/menu.module
@@ -104,7 +104,7 @@ function menu_perm() {
function menu_overview() {
menu_rebuild();
- print theme('page', menu_overview_tree());
+ return menu_overview_tree();
}
/**
@@ -124,7 +124,7 @@ function menu_reset() {
'admin/menu',
t('Any custom additions or changes to the menu will be lost.'),
t('Reset all'));
- print theme('page', $output);
+ return $output;
}
}
@@ -150,7 +150,7 @@ function menu_add_menu() {
$output .= menu_edit_item_form($edit);
}
- print theme('page', $output);
+ return $output;
}
/**
@@ -171,7 +171,7 @@ function menu_reset_item($mid) {
'admin/menu',
t('Any customizations will be lost. This action cannot be undone.'),
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)));
}
$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);
}
- print theme('page', $output);
+ return $output;
}
/**
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 26ac4e1278d5..7baf23327724 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -104,7 +104,7 @@ function menu_perm() {
function menu_overview() {
menu_rebuild();
- print theme('page', menu_overview_tree());
+ return menu_overview_tree();
}
/**
@@ -124,7 +124,7 @@ function menu_reset() {
'admin/menu',
t('Any custom additions or changes to the menu will be lost.'),
t('Reset all'));
- print theme('page', $output);
+ return $output;
}
}
@@ -150,7 +150,7 @@ function menu_add_menu() {
$output .= menu_edit_item_form($edit);
}
- print theme('page', $output);
+ return $output;
}
/**
@@ -171,7 +171,7 @@ function menu_reset_item($mid) {
'admin/menu',
t('Any customizations will be lost. This action cannot be undone.'),
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)));
}
$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);
}
- print theme('page', $output);
+ return $output;
}
/**
diff --git a/modules/node.module b/modules/node.module
index 86009f72c095..2066c6e35940 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -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_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().
if ($_POST['op']) {
$_GET['q'] = 'admin/node/configure/types';
+ $options = 'options_'. $type;
+ if (empty($node->$options)) {
+ $node->$options = array();
+ }
}
system_settings_save();
@@ -968,7 +972,7 @@ function node_types_configure($type = NULL) {
$output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
- print theme('page', system_settings_form($output));
+ return system_settings_form($output);
}
else {
$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));
}
- print theme('page', theme('table', $header, $rows));
+ return theme('table', $header, $rows);
}
}
@@ -1111,7 +1115,7 @@ function node_admin() {
default:
$output = node_admin_nodes();
}
- print theme('page', $output);
+ return $output;
}
/**
@@ -1661,13 +1665,13 @@ function node_page() {
node_feed();
return;
case 'add':
- print theme('page', node_add(arg(2)));
+ return node_add(arg(2));
break;
case 'edit':
- print theme('page', node_edit(arg(1)));
+ return node_edit(arg(1));
break;
case 'revisions':
- print theme('page', node_revision_overview(arg(1)));
+ return node_revision_overview(arg(1));
break;
case 'rollback-revision':
node_revision_rollback(arg(1), arg(3));
@@ -1680,7 +1684,7 @@ function node_page() {
$node = node_load(array('nid' => arg(1)), $_GET['revision']);
if ($node->nid) {
drupal_set_title(check_plain($node->title));
- print theme('page', node_show($node, arg(2)));
+ return node_show($node, arg(2));
}
else {
drupal_not_found();
@@ -1690,7 +1694,7 @@ function node_page() {
case t('Preview'):
$edit = node_validate($edit);
drupal_set_title(t('Preview'));
- print theme('page', node_preview($edit));
+ return node_preview($edit);
break;
case t('Submit'):
if ($nid = node_submit($edit)) {
@@ -1703,7 +1707,7 @@ function node_page() {
}
else {
drupal_set_title(t('Submit'));
- print theme('page', node_preview($edit));
+ return node_preview($edit);
}
break;
case 'delete':
@@ -1719,11 +1723,11 @@ function node_page() {
drupal_set_message(t('The node has been deleted.'));
drupal_goto('admin/node');
}
- print theme('page', node_delete($edit));
+ return node_delete($edit);
break;
default:
drupal_set_title('');
- print theme('page', node_page_default());
+ return node_page_default();
}
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 86009f72c095..2066c6e35940 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -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_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().
if ($_POST['op']) {
$_GET['q'] = 'admin/node/configure/types';
+ $options = 'options_'. $type;
+ if (empty($node->$options)) {
+ $node->$options = array();
+ }
}
system_settings_save();
@@ -968,7 +972,7 @@ function node_types_configure($type = NULL) {
$output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
- print theme('page', system_settings_form($output));
+ return system_settings_form($output);
}
else {
$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));
}
- print theme('page', theme('table', $header, $rows));
+ return theme('table', $header, $rows);
}
}
@@ -1111,7 +1115,7 @@ function node_admin() {
default:
$output = node_admin_nodes();
}
- print theme('page', $output);
+ return $output;
}
/**
@@ -1661,13 +1665,13 @@ function node_page() {
node_feed();
return;
case 'add':
- print theme('page', node_add(arg(2)));
+ return node_add(arg(2));
break;
case 'edit':
- print theme('page', node_edit(arg(1)));
+ return node_edit(arg(1));
break;
case 'revisions':
- print theme('page', node_revision_overview(arg(1)));
+ return node_revision_overview(arg(1));
break;
case 'rollback-revision':
node_revision_rollback(arg(1), arg(3));
@@ -1680,7 +1684,7 @@ function node_page() {
$node = node_load(array('nid' => arg(1)), $_GET['revision']);
if ($node->nid) {
drupal_set_title(check_plain($node->title));
- print theme('page', node_show($node, arg(2)));
+ return node_show($node, arg(2));
}
else {
drupal_not_found();
@@ -1690,7 +1694,7 @@ function node_page() {
case t('Preview'):
$edit = node_validate($edit);
drupal_set_title(t('Preview'));
- print theme('page', node_preview($edit));
+ return node_preview($edit);
break;
case t('Submit'):
if ($nid = node_submit($edit)) {
@@ -1703,7 +1707,7 @@ function node_page() {
}
else {
drupal_set_title(t('Submit'));
- print theme('page', node_preview($edit));
+ return node_preview($edit);
}
break;
case 'delete':
@@ -1719,11 +1723,11 @@ function node_page() {
drupal_set_message(t('The node has been deleted.'));
drupal_goto('admin/node');
}
- print theme('page', node_delete($edit));
+ return node_delete($edit);
break;
default:
drupal_set_title('');
- print theme('page', node_page_default());
+ return node_page_default();
}
}
diff --git a/modules/path.module b/modules/path.module
index ecda91ed2bf3..e1e68e14fb3e 100644
--- a/modules/path.module
+++ b/modules/path.module
@@ -95,7 +95,7 @@ function path_menu($may_cache) {
* Menu callback; presents an overview of all URL aliases.
*/
function path_admin() {
- print theme('page', path_overview());
+ return path_overview();
}
/**
@@ -114,7 +114,7 @@ function path_admin_edit($pid = 0) {
$output = path_form();
}
- print theme('page', $output);
+ return $output;
}
/**
diff --git a/modules/path/path.module b/modules/path/path.module
index ecda91ed2bf3..e1e68e14fb3e 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -95,7 +95,7 @@ function path_menu($may_cache) {
* Menu callback; presents an overview of all URL aliases.
*/
function path_admin() {
- print theme('page', path_overview());
+ return path_overview();
}
/**
@@ -114,7 +114,7 @@ function path_admin_edit($pid = 0) {
$output = path_form();
}
- print theme('page', $output);
+ return $output;
}
/**
diff --git a/modules/poll.module b/modules/poll.module
index d5db9b96a755..a9139a2b8af7 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -274,7 +274,7 @@ function poll_page() {
}
$output .= '';
$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() {
if ($node = node_load(array('nid' => arg(1)))) {
drupal_set_title(check_plain($node->title));
- print theme('page', node_show($node, 0));
+ return node_show($node, 0);
}
else {
drupal_not_found();
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index d5db9b96a755..a9139a2b8af7 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -274,7 +274,7 @@ function poll_page() {
}
$output .= '';
$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() {
if ($node = node_load(array('nid' => arg(1)))) {
drupal_set_title(check_plain($node->title));
- print theme('page', node_show($node, 0));
+ return node_show($node, 0);
}
else {
drupal_not_found();
diff --git a/modules/profile.module b/modules/profile.module
index 1dde9a5acf9a..91a5896f593b 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -177,7 +177,7 @@ function profile_browse() {
$output .= '';
drupal_set_title($title);
- print theme('page', $output);
+ return $output;
}
else if ($name && !$field->id) {
drupal_not_found();
@@ -201,7 +201,7 @@ function profile_browse() {
$output .= theme('pager', NULL, 20);
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))));
- 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'])));
- 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 .= '';
- print theme('page', $output);
+ return $output;
}
function theme_profile_block($user, $fields = array()) {
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 1dde9a5acf9a..91a5896f593b 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -177,7 +177,7 @@ function profile_browse() {
$output .= '';
drupal_set_title($title);
- print theme('page', $output);
+ return $output;
}
else if ($name && !$field->id) {
drupal_not_found();
@@ -201,7 +201,7 @@ function profile_browse() {
$output .= theme('pager', NULL, 20);
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))));
- 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'])));
- 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 .= '';
- print theme('page', $output);
+ return $output;
}
function theme_profile_block($user, $fields = array()) {
diff --git a/modules/search.module b/modules/search.module
index 6a43604d88b5..bf5eaa88011a 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -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.'));
$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;
- print theme('page', $output);
+ return $output;
}
else {
drupal_access_denied();
diff --git a/modules/search/search.module b/modules/search/search.module
index 6a43604d88b5..bf5eaa88011a 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -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.'));
$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;
- print theme('page', $output);
+ return $output;
}
else {
drupal_access_denied();
diff --git a/modules/statistics.module b/modules/statistics.module
index 27fd98e408d9..6161b6cb91bf 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -154,7 +154,7 @@ function statistics_access_log($aid) {
$output .= '