diff --git a/includes/common.inc b/includes/common.inc index c5ad0d39c81..7263d0a5b22 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2741,26 +2741,15 @@ function drupal_render(&$elements) { // Render all the children that use a theme function. if (isset($elements['#theme']) && empty($elements['#theme_used'])) { $elements['#theme_used'] = TRUE; - - $previous = array(); - foreach (array('#value', '#type', '#prefix', '#suffix') as $key) { - $previous[$key] = isset($elements[$key]) ? $elements[$key] : NULL; - } // If we rendered a single element, then we will skip the renderer. if (empty($children)) { $elements['#printed'] = TRUE; } else { - $elements['#value'] = ''; + $elements['#markup'] = ''; } - $elements['#type'] = 'markup'; - unset($elements['#prefix'], $elements['#suffix']); $content = theme($elements['#theme'], $elements); - - foreach (array('#value', '#type', '#prefix', '#suffix') as $key) { - $elements[$key] = isset($previous[$key]) ? $previous[$key] : NULL; - } } // Render each of the children using drupal_render and concatenate them. if (!isset($content) || $content === '') { diff --git a/includes/form.inc b/includes/form.inc index b4181d449ea..319ed46e372 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1836,7 +1836,7 @@ function form_expand_ahah($element) { * @ingroup themeable */ function theme_item($element) { - return theme('form_element', $element, $element['#value'] . (!empty($element['#children']) ? $element['#children'] : '')); + return theme('form_element', $element, $element['#markup'] . (!empty($element['#children']) ? $element['#children'] : '')); } /** @@ -2085,7 +2085,7 @@ function theme_textarea($element) { */ function theme_markup($element) { - return (isset($element['#value']) ? $element['#value'] : '') . (isset($element['#children']) ? $element['#children'] : ''); + return (isset($element['#markup']) ? $element['#markup'] : '') . (isset($element['#children']) ? $element['#children'] : ''); } /** diff --git a/includes/locale.inc b/includes/locale.inc index 1937bc90489..fe43d69066c 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -46,9 +46,9 @@ function locale_languages_overview_form() { '#type' => 'weight', '#default_value' => $language->weight ); - $form['name'][$langcode] = array('#value' => check_plain($language->name)); - $form['native'][$langcode] = array('#value' => check_plain($language->native)); - $form['direction'][$langcode] = array('#value' => ($language->direction == LANGUAGE_RTL ? t('Right to left') : t('Left to right'))); + $form['name'][$langcode] = array('#markup' => check_plain($language->name)); + $form['native'][$langcode] = array('#markup' => check_plain($language->native)); + $form['direction'][$langcode] = array('#markup' => ($language->direction == LANGUAGE_RTL ? t('Right to left') : t('Left to right'))); } $form['enabled'] = array('#type' => 'checkboxes', '#options' => $options, @@ -230,7 +230,7 @@ function _locale_languages_common_controls(&$form, $language = NULL) { $form['langcode_view'] = array( '#type' => 'item', '#title' => t('Language code'), - '#value' => $language->language + '#markup' => $language->language ); $form['langcode'] = array( '#type' => 'value', @@ -782,7 +782,7 @@ function locale_translate_edit_form(&$form_state, $lid) { 'original' => array( '#type' => 'item', '#title' => t('Original text'), - '#value' => check_plain(wordwrap($source->source, 0)), + '#markup' => check_plain(wordwrap($source->source, 0)), ), 'lid' => array( '#type' => 'value', diff --git a/install.php b/install.php index 1ec0eccce2c..e9ff3aa88a0 100644 --- a/install.php +++ b/install.php @@ -231,7 +231,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting if (count($db_types) == 0) { $form['no_db_types'] = array( - '#value' => st('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.', array('@drupal-databases' => 'http://drupal.org/node/270#database')), + '#markup' => st('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.', array('@drupal-databases' => 'http://drupal.org/node/270#database')), ); } else { @@ -995,7 +995,7 @@ function install_task_list($active = NULL) { function install_configure_form(&$form_state, $url) { $form['intro'] = array( - '#value' => st('To configure your website, please provide the following information.'), + '#markup' => st('To configure your website, please provide the following information.'), '#weight' => -10, ); $form['site_information'] = array( @@ -1024,7 +1024,7 @@ function install_configure_form(&$form_state, $url) { ); $form['admin_account']['account']['#tree'] = TRUE; $form['admin_account']['markup'] = array( - '#value' => '
' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '
', + '#markup' => '' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '
', '#weight' => -10, ); diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc index b899e6b0a3f..f38796a94e8 100644 --- a/modules/aggregator/aggregator.pages.inc +++ b/modules/aggregator/aggregator.pages.inc @@ -157,7 +157,7 @@ function aggregator_categorize_items($items, $feed_source = '') { '#tree' => TRUE, ); foreach ($items as $item) { - $form['items'][$item->iid] = array('#value' => theme('aggregator_item', $item)); + $form['items'][$item->iid] = array('#markup' => theme('aggregator_item', $item)); $form['categories'][$item->iid] = array(); $categories_result = db_query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = %d', $item->iid); $selected = array(); diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc index f09b5a8b17c..af7e47749bf 100644 --- a/modules/block/block.admin.inc +++ b/modules/block/block.admin.inc @@ -53,7 +53,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) { '#value' => $block['delta'], ); $form[$key]['info'] = array( - '#value' => check_plain($block['info']), + '#markup' => check_plain($block['info']), ); $form[$key]['theme'] = array( '#type' => 'hidden', @@ -69,7 +69,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) { '#options' => $block_regions, ); $form[$key]['configure'] = array( - '#value' => l(t('configure'), + '#markup' => l(t('configure'), 'admin/build/block/configure/' . $block['module'] . '/' . $block['delta']), ); if ($block['module'] == 'block') { diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 25b55203343..757196366b0 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -49,7 +49,7 @@ function blog_user($type, &$edit, &$user) { $user->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), - '#value' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))), + '#markup' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))), '#attributes' => array('class' => 'blog'), ); } diff --git a/modules/book/book.module b/modules/book/book.module index 46aa6d083a6..51470470e6f 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -692,7 +692,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) { if (!$teaser) { if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) { $node->content['book_navigation'] = array( - '#value' => theme('book_navigation', $node->book), + '#markup' => theme('book_navigation', $node->book), '#weight' => 100, ); @@ -790,7 +790,7 @@ function book_form_node_delete_confirm_alter(&$form, $form_state) { if (isset($node->book) && $node->book['has_children']) { $form['book_warning'] = array( - '#value' => '' . t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) . '
', + '#markup' => '' . t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) . '
', '#weight' => -10, ); } diff --git a/modules/color/color.module b/modules/color/color.module index f3335653e3d..d336f708079 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -57,7 +57,7 @@ function color_form_alter(&$form, $form_state, $form_id) { foreach (element_children($form) as $theme) { if ($screenshot = variable_get('color_' . $theme . '_screenshot', NULL)) { if (isset($form[$theme]['screenshot'])) { - $form[$theme]['screenshot']['#value'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE); + $form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE); } } } diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 82658c171c1..af7f2090bd1 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -76,19 +76,19 @@ function comment_admin_overview($type = 'new', $arg) { $comments[$comment->cid] = ''; $comment->name = $comment->uid ? $comment->registered_name : $comment->name; $form['subject'][$comment->cid] = array( - '#value' => l($comment->subject, 'node/' . $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-' . $comment->cid)) + '#markup' => l($comment->subject, 'node/' . $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-' . $comment->cid)) ); $form['username'][$comment->cid] = array( - '#value' => theme('username', $comment) + '#markup' => theme('username', $comment) ); $form['node_title'][$comment->cid] = array( - '#value' => l($comment->node_title, 'node/' . $comment->nid) + '#markup' => l($comment->node_title, 'node/' . $comment->nid) ); $form['timestamp'][$comment->cid] = array( - '#value' => format_date($comment->timestamp, 'small') + '#markup' => format_date($comment->timestamp, 'small') ); $form['operations'][$comment->cid] = array( - '#value' => l(t('edit'), 'comment/edit/' . $comment->cid, array('query' => $destination)) + '#markup' => l(t('edit'), 'comment/edit/' . $comment->cid, array('query' => $destination)) ); } $form['comments'] = array( @@ -96,7 +96,7 @@ function comment_admin_overview($type = 'new', $arg) { '#options' => isset($comments) ? $comments: array() ); $form['pager'] = array( - '#value' => theme('pager', NULL, 50, 0) + '#markup' => theme('pager', NULL, 50, 0) ); return $form; @@ -169,7 +169,7 @@ function theme_comment_admin_overview($form) { } $output .= theme('table', $form['header']['#value'], $rows); - if ($form['pager']['#value']) { + if ($form['pager']['#markup']) { $output .= drupal_render($form['pager']); } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index fd949a2f68c..ef03a055071 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1267,7 +1267,7 @@ function comment_form(&$form_state, $edit, $title = NULL) { $form['_author'] = array( '#type' => 'item', '#title' => t('Your name'), - '#value' => theme('username', $user), + '#markup' => theme('username', $user), ); $form['author'] = array( '#type' => 'value', @@ -1452,7 +1452,7 @@ function comment_form_add_preview($form, &$form_state) { } $form['comment_preview'] = array( - '#value' => $output, + '#markup' => $output, '#weight' => -100, '#prefix' => '' . t('These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.') . '
'; $group .= $tiplist; - $form['tips'] = array('#value' => '' . t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) . ' ' . $count . '
'; $form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status')); - $form['status']['status'] = array('#value' => $status); + $form['status']['status'] = array('#markup' => $status); $form['status']['wipe'] = array('#type' => 'submit', '#value' => t('Re-index site')); $items = drupal_map_assoc(array(10, 20, 50, 100, 200, 500)); @@ -58,7 +58,7 @@ function search_admin_settings() { $form['indexing_throttle']['search_cron_limit'] = array('#type' => 'select', '#title' => t('Number of items to index per cron run'), '#default_value' => variable_get('search_cron_limit', 100), '#options' => $items, '#description' => t('The maximum number of items indexed in each pass of a cron maintenance task. If necessary, reduce the number of items to prevent timeouts and memory errors while indexing.', array('@cron' => url('admin/reports/status')))); // Indexing settings: $form['indexing_settings'] = array('#type' => 'fieldset', '#title' => t('Indexing settings')); - $form['indexing_settings']['info'] = array('#value' => t('Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.
The default settings should be appropriate for the majority of sites.
')); + $form['indexing_settings']['info'] = array('#markup' => t('Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.
The default settings should be appropriate for the majority of sites.
')); $form['indexing_settings']['minimum_word_size'] = array('#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => variable_get('minimum_word_size', 3), '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).')); $form['indexing_settings']['overlap_cjk'] = array('#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => variable_get('overlap_cjk', TRUE), '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.')); diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module index 44707d8813a..73a5f82abbf 100644 --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -125,7 +125,7 @@ function simpletest_test_form() { '#collapsed' => $ok, '#description' => $info['description'], ); - $element['result_table']['#value'] = theme('table', $header, $element['result_table']['#rows']); + $element['result_table']['#markup'] = theme('table', $header, $element['result_table']['#rows']); $element['summary']['#ok'] = $ok; $group_ok = $group_ok && $ok; } diff --git a/modules/system/image.gd.inc b/modules/system/image.gd.inc index ab26371f6ae..d12f168e883 100644 --- a/modules/system/image.gd.inc +++ b/modules/system/image.gd.inc @@ -25,7 +25,7 @@ function image_gd_settings() { if (image_gd_check_settings()) { $form = array(); $form['status'] = array( - '#value' => t('The GD toolkit is installed and working properly.') + '#markup' => t('The GD toolkit is installed and working properly.') ); $form['image_jpeg_quality'] = array( diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 2314ea07783..29d390826ee 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -196,7 +196,7 @@ function system_themes_form() { } $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => 'screenshot'), FALSE) : t('no screenshot'); - $form[$theme->name]['screenshot'] = array('#value' => $screenshot); + $form[$theme->name]['screenshot'] = array('#markup' => $screenshot); $form[$theme->name]['info'] = array( '#type' => 'value', '#value' => $theme->info, @@ -204,7 +204,7 @@ function system_themes_form() { $options[$theme->name] = ''; if (!empty($theme->status) || $theme->name == variable_get('admin_theme', '0')) { - $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/' . $theme->name) ); + $form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/build/themes/settings/' . $theme->name) ); } else { // Dummy element for drupal_render. Cleaner than adding a check in the theme function. @@ -645,15 +645,15 @@ function system_modules($form_state = array()) { $disabled = array(); // Traverse the files retrieved and build the form. foreach ($files as $filename => $file) { - $form['name'][$filename] = array('#value' => $file->info['name']); - $form['version'][$filename] = array('#value' => $file->info['version']); - $form['description'][$filename] = array('#value' => t($file->info['description'])); + $form['name'][$filename] = array('#markup' => $file->info['name']); + $form['version'][$filename] = array('#markup' => $file->info['version']); + $form['description'][$filename] = array('#markup' => t($file->info['description'])); // Generate link for module's help page, if there is one. if ($help_arg && module_hook($filename, 'help')) { if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) { // Module has a help page. - $form['help'][$filename] = array('#value' => theme('more_help_link', url("admin/help/$filename"))); + $form['help'][$filename] = array('#markup' => theme('more_help_link', url("admin/help/$filename"))); } } @@ -690,7 +690,7 @@ function system_modules($form_state = array()) { // Add text for dependencies. if (!empty($dependencies)) { $form['description'][$filename]['dependencies'] = array( - '#value' => t('Depends on: !dependencies', array('!dependencies' => implode(', ', $dependencies))), + '#markup' => t('Depends on: !dependencies', array('!dependencies' => implode(', ', $dependencies))), '#prefix' => '' . t('The following modules will be completely uninstalled from your site, and all data from these modules will be lost!') . '
' . theme('item_list', $uninstall)); + $form['modules'] = array('#markup' => '' . t('The following modules will be completely uninstalled from your site, and all data from these modules will be lost!') . '
' . theme('item_list', $uninstall)); $form = confirm_form( $form, t('Confirm uninstall'), diff --git a/modules/system/system.module b/modules/system/system.module index 26a143cb773..3e6bc841813 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -291,7 +291,7 @@ function system_elements() { * Form structure. */ $type['item'] = array( - '#value' => '', + '#markup' => '', ); $type['hidden'] = array( @@ -868,8 +868,8 @@ function system_theme_select_form($description = '', $default_value = '', $weigh $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => 'screenshot'), FALSE) : t('no screenshot'); - $form['themes'][$info->key]['screenshot'] = array('#value' => $screenshot); - $form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#value' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '
'); + $form['settings_general']['upload_max_size'] = array('#markup' => '' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '
'); $roles = user_roles(FALSE, 'upload files'); $form['roles'] = array('#type' => 'value', '#value' => $roles); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index dde2395db9f..fce3eec3966 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -283,7 +283,7 @@ function upload_nodeapi(&$node, $op, $teaser) { if (count($node->files)) { if (!$teaser && user_access('view uploaded files')) { $node->content['files'] = array( - '#value' => theme('upload_attachments', $node->files), + '#markup' => theme('upload_attachments', $node->files), '#weight' => 50, ); } @@ -484,7 +484,7 @@ function _upload_form($node) { $description = file_create_url($file->filepath); $description = "" . check_plain($description) . ""; $form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description ); - $form['files'][$key]['size'] = array('#value' => format_size($file->filesize)); + $form['files'][$key]['size'] = array('#markup' => format_size($file->filesize)); $form['files'][$key]['remove'] = array('#type' => 'checkbox', '#default_value' => !empty($file->remove)); $form['files'][$key]['list'] = array('#type' => 'checkbox', '#default_value' => $file->list); $form['files'][$key]['weight'] = array('#type' => 'weight', '#delta' => count($node->files), '#default_value' => $file->weight); diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index 36bca54e04a..cc488e70352 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -49,10 +49,10 @@ function user_filter_form() { $options = $type == 'permission' ? call_user_func_array('array_merge', $filters[$type]['options']) : $filters[$type]['options']; $params = array('%property' => $filters[$type]['title'] , '%value' => $options[$value]); if ($i++ > 0) { - $form['filters']['current'][] = array('#value' => t('and where %property is %value', $params)); + $form['filters']['current'][] = array('#markup' => t('and where %property is %value', $params)); } else { - $form['filters']['current'][] = array('#value' => t('%property is %value', $params)); + $form['filters']['current'][] = array('#markup' => t('%property is %value', $params)); } } @@ -171,24 +171,24 @@ function user_admin_account() { $accounts = array(); while ($account = db_fetch_object($result)) { $accounts[$account->uid] = ''; - $form['name'][$account->uid] = array('#value' => theme('username', $account)); - $form['status'][$account->uid] = array('#value' => $status[$account->status]); + $form['name'][$account->uid] = array('#markup' => theme('username', $account)); + $form['status'][$account->uid] = array('#markup' => $status[$account->status]); $users_roles = array(); $roles_result = db_query('SELECT rid FROM {users_roles} WHERE uid = %d', $account->uid); while ($user_role = db_fetch_object($roles_result)) { $users_roles[] = $roles[$user_role->rid]; } asort($users_roles); - $form['roles'][$account->uid][0] = array('#value' => theme('item_list', $users_roles)); - $form['member_for'][$account->uid] = array('#value' => format_interval(time() - $account->created)); - $form['last_access'][$account->uid] = array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never')); - $form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination))); + $form['roles'][$account->uid][0] = array('#markup' => theme('item_list', $users_roles)); + $form['member_for'][$account->uid] = array('#markup' => format_interval(time() - $account->created)); + $form['last_access'][$account->uid] = array('#markup' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never')); + $form['operations'][$account->uid] = array('#markup' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination))); } $form['accounts'] = array( '#type' => 'checkboxes', '#options' => $accounts ); - $form['pager'] = array('#value' => theme('pager', NULL, 50, 0)); + $form['pager'] = array('#markup' => theme('pager', NULL, 50, 0)); return $form; } @@ -513,7 +513,7 @@ function user_admin_perm($form_state, $rid = NULL) { foreach (module_list(FALSE, FALSE, TRUE) as $module) { if ($permissions = module_invoke($module, 'perm')) { $form['permission'][] = array( - '#value' => $module, + '#markup' => $module, ); ksort($permissions); foreach ($permissions as $perm => $description) { @@ -525,7 +525,7 @@ function user_admin_perm($form_state, $rid = NULL) { $options[$perm] = ''; $form['permission'][$perm] = array( '#type' => 'item', - '#value' => t($perm), + '#markup' => t($perm), '#description' => $hide_descriptions ? $description : NULL, ); foreach ($role_names as $rid => $name) { @@ -541,7 +541,7 @@ function user_admin_perm($form_state, $rid = NULL) { // Have to build checkboxes here after checkbox arrays are built foreach ($role_names as $rid => $name) { $form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array()); - $form['role_names'][$rid] = array('#value' => $name, '#tree' => TRUE); + $form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE); } $form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions')); @@ -740,7 +740,7 @@ function theme_user_admin_account($form) { } $output .= theme('table', $header, $rows); - if ($form['pager']['#value']) { + if ($form['pager']['#markup']) { $output .= drupal_render($form['pager']); } diff --git a/modules/user/user.module b/modules/user/user.module index 0941b0ac82a..1c19fcbc158 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -653,7 +653,7 @@ function user_user($type, &$edit, &$account, $category = NULL) { $account->content['summary']['member_for'] = array( '#type' => 'user_profile_item', '#title' => t('Member for'), - '#value' => format_interval(time() - $account->created), + '#markup' => format_interval(time() - $account->created), ); } if ($type == 'form' && $category == 'account') { @@ -701,7 +701,7 @@ function user_login_block() { $items[] = l(t('Create new account'), 'user/register', array('attributes' => array('title' => t('Create a new user account.')))); } $items[] = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.')))); - $form['links'] = array('#value' => theme('item_list', $items)); + $form['links'] = array('#markup' => theme('item_list', $items)); return $form; } @@ -1493,7 +1493,7 @@ function user_edit_form(&$form_state, $uid, $edit, $register = FALSE) { $form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1); $picture = theme('user_picture', (object)$edit); if ($edit['picture']) { - $form['picture']['current_picture'] = array('#value' => $picture); + $form['picture']['current_picture'] = array('#markup' => $picture); $form['picture']['picture_delete'] = array('#type' => 'checkbox', '#title' => t('Delete picture'), '#description' => t('Check this box to delete your current picture.')); } else { @@ -2335,7 +2335,7 @@ function user_register() { // Display the registration form. if (!$admin) { - $form['user_registration_help'] = array('#value' => filter_xss_admin(variable_get('user_registration_help', ''))); + $form['user_registration_help'] = array('#markup' => filter_xss_admin(variable_get('user_registration_help', ''))); } // Merge in the default user edit fields. diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 8a32f87c49f..3213208a275 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -105,8 +105,8 @@ function user_pass_reset(&$form_state, $uid, $timestamp, $hashed_pass, $action = drupal_goto('user/' . $user->uid . '/edit'); } else { - $form['message'] = array('#value' => t('This is a one-time login for %user_name and will expire on %expiration_date.
Click on this button to login to the site and change your password.
', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout)))); - $form['help'] = array('#value' => '' . t('This login can be used only once.') . '
'); + $form['message'] = array('#markup' => t('This is a one-time login for %user_name and will expire on %expiration_date.
Click on this button to login to the site and change your password.
', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout)))); + $form['help'] = array('#markup' => '' . t('This login can be used only once.') . '
'); $form['submit'] = array('#type' => 'submit', '#value' => t('Log in')); $form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login"); return $form; @@ -186,7 +186,7 @@ function template_preprocess_user_profile(&$variables) { */ function template_preprocess_user_profile_item(&$variables) { $variables['title'] = $variables['element']['#title']; - $variables['value'] = $variables['element']['#value']; + $variables['value'] = $variables['element']['#markup']; $variables['attributes'] = ''; if (isset($variables['element']['#attributes'])) { $variables['attributes'] = drupal_attributes($variables['element']['#attributes']); diff --git a/update.php b/update.php index c0bf4a38f0f..f328ce4ec97 100644 --- a/update.php +++ b/update.php @@ -223,7 +223,7 @@ function update_script_selection_form() { $last_removed = module_invoke($module, 'update_last_removed'); if ($schema_version < $last_removed) { $form['start'][$module] = array( - '#value' => '' . $module . ' module can not be updated. Its schema version is ' . $schema_version . '. Updates up to and including ' . $last_removed . ' have been removed in this release. In order to update ' . $module . ' module, you will first need to upgrade to the last version in which these updates were available.', + '#markup' => '' . $module . ' module can not be updated. Its schema version is ' . $schema_version . '. Updates up to and including ' . $last_removed . ' have been removed in this release. In order to update ' . $module . ' module, you will first need to upgrade to the last version in which these updates were available.', '#prefix' => '