=== modified file 'CHANGELOG.txt' --- CHANGELOG.txt 2009-01-16 18:00:08 +0000 +++ CHANGELOG.txt 2009-01-21 12:12:16 +0000 @@ -32,6 +32,7 @@ Drupal 7.0, xxxx-xx-xx (development vers * Redesigned password strength validator. * Redesigned the add content type screen. * Highlight duplicate URL aliases. + * Renamed "input formats" to "text formats". * Added configurable ability for users to cancel their own accounts. - Performance: * Improved performance on uncached page views by loading multiple core === modified file 'includes/form.inc' --- includes/form.inc 2009-01-19 11:00:08 +0000 +++ includes/form.inc 2009-01-21 12:24:29 +0000 @@ -1782,14 +1782,14 @@ function form_process_radios($element) { } /** - * Add input format selector to text elements with the #input_format property. + * Add text format selector to text elements with the #text_format property. * - * The #input_format property should be the ID of an input format, found in + * The #text_format property should be the ID of an text format, found in * {filter_format}.format, which gets passed to filter_form(). * - * If the property #input_format is set, the form element will be expanded into + * If the property #text_format is set, the form element will be expanded into * two separate form elements, one holding the content of the element, and the - * other holding the input format selector. The original element is shifted into + * other holding the text format selector. The original element is shifted into * a child element, but is otherwise unaltered, so that the format selector is * at the same level as the text field which it affects. * @@ -1799,7 +1799,7 @@ function form_process_radios($element) { * $form['body'] = array( * '#type' => 'textarea', * '#title' => t('Body'), - * '#input_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT, + * '#text_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT, * ); * @endcode * @@ -1814,7 +1814,7 @@ function form_process_radios($element) { * '#title' => t('Body'), * '#parents' => array('body'), * ), - * // 'format' holds the input format selector. + * // 'format' holds the text format selector. * 'format' => array( * '#parents' => array('body_format'), * ... @@ -1826,14 +1826,14 @@ function form_process_radios($element) { * @code * // Original, unaltered form element value. * $form_state['values']['body'] = 'Example content'; - * // Chosen input format. + * // Chosen text format. * $form_state['values']['body_format'] = 1; * @endcode * * @see system_elements(), filter_form() */ function form_process_input_format($element) { - if (isset($element['#input_format'])) { + if (isset($element['#text_format'])) { // Determine the form element parents and element name to use for the input // format widget. This simulates the 'element' and 'element_format' pair of // parents that filter_form() expects. @@ -1844,11 +1844,11 @@ function form_process_input_format($elem // We need to break references, otherwise form_builder recurses infinitely. $element['value'] = (array)$element; $element['#type'] = 'markup'; - $element['format'] = filter_form($element['#input_format'], 1, $element_parents); + $element['format'] = filter_form($element['#text_format'], 1, $element_parents); - // We need to clear the #input_format from the new child otherwise we + // We need to clear the #text_format from the new child otherwise we // would get into an infinite loop. - unset($element['value']['#input_format']); + unset($element['value']['#text_format']); $element['value']['#weight'] = 0; } return $element; === modified file 'modules/block/block.module' --- modules/block/block.module 2008-12-30 17:00:08 +0000 +++ modules/block/block.module 2009-01-21 12:24:29 +0000 @@ -328,7 +328,7 @@ function block_box_form($edit = array()) '#type' => 'textarea', '#title' => t('Block body'), '#default_value' => $edit['body'], - '#input_format' => isset($edit['format']) ? $edit['format'] : FILTER_FORMAT_DEFAULT, + '#text_format' => isset($edit['format']) ? $edit['format'] : FILTER_FORMAT_DEFAULT, '#rows' => 15, '#description' => t('The content of the block as shown to the user.'), '#weight' => -17, === modified file 'modules/block/block.test' --- modules/block/block.test 2009-01-07 22:00:13 +0000 +++ modules/block/block.test 2009-01-21 12:11:48 +0000 @@ -77,7 +77,7 @@ class BlockTestCase extends DrupalWebTes $edit['block_' . $bid . '[region]'] = 'left'; $this->drupalPost('admin/build/block', $edit, t('Save blocks')); - // Confirm that the box is being displayed using configured input format. + // Confirm that the box is being displayed using configured text format. $this->assertRaw('
' . t('These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.') . '
'; + $group = '' . t('These are the guidelines that users will see for posting in this text format. They are automatically generated from the filter settings.') . '
'; $group .= $tiplist; $form['tips'] = array('#markup' => '' . t("The filter module allows administrators to configure text input formats for use on your site. An input format defines the HTML tags, codes, and other input allowed in both content and comments, and is a key feature in guarding against potentially damaging input from malicious users. Two input formats included by default are Filtered HTML (which allows only an administrator-approved subset of HTML tags) and Full HTML (which allows the full set of HTML tags). Additional input formats may be created by an administrator.") . '
'; - $output .= '' . t('Each input format uses filters to manipulate text, and most input formats apply several different filters to text in a specific order. Each filter is designed for a specific purpose, and generally either adds, removes or transforms elements within user-entered text before it is displayed. A filter does not change the actual content of a post, but instead, modifies it temporarily before it is displayed. A filter may remove unapproved HTML tags, for instance, while another automatically adds HTML to make links referenced in text clickable.') . '
'; - $output .= '' . t('Users with access to more than one input format can use the Input format fieldset to choose between available input formats when creating or editing multi-line content. Administrators determine the input formats available to each user role, select a default input format, and control the order of formats listed in the Input format fieldset.') . '
'; + $output = '' . t("The filter module allows administrators to configure text formats for use on your site. A text format defines the HTML tags, codes, and other input allowed in both content and comments, and is a key feature in guarding against potentially damaging input from malicious users. Two formats included by default are Filtered HTML (which allows only an administrator-approved subset of HTML tags) and Full HTML (which allows the full set of HTML tags). Additional formats may be created by an administrator.") . '
'; + $output .= '' . t('Each text format uses filters to manipulate text, and most formats apply several different filters to text in a specific order. Each filter is designed for a specific purpose, and generally either adds, removes or transforms elements within user-entered text before it is displayed. A filter does not change the actual content of a post, but instead, modifies it temporarily before it is displayed. A filter may remove unapproved HTML tags, for instance, while another automatically adds HTML to make links referenced in text clickable.') . '
'; + $output .= '' . t('Users with access to more than one text format can use the Text format fieldset to choose between available text formats when creating or editing multi-line content. Administrators determine the text formats available to each user role, select a default text format, and control the order of formats listed in the Text format fieldset.') . '
'; $output .= '' . t('For more information, see the online handbook entry for Filter module.', array('@filter' => 'http://drupal.org/handbook/modules/filter/')) . '
'; return $output; - case 'admin/settings/filters': - $output = '' . t('Use the list below to review the input formats available to each user role, to select a default input format, and to control the order of formats listed in the Input format fieldset. (The Input format fieldset is displayed below textareas when users with access to more than one input format create multi-line content.) The input format selected as Default is available to all users and, unless another format is selected, is applied to all content. All input formats are available to users in roles with the "administer filters" permission.') . '
'; - $output .= '' . t('Since input formats, if available, are presented in the same order as the list below, it may be helpful to arrange the formats in descending order of your preference for their use. To change the order of an input format, grab a drag-and-drop handle under the Name column and drag to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the Save changes button at the bottom of the page.') . '
'; + case 'admin/settings/filter': + $output = '' . t('Use the list below to review the text formats available to each user role, to select a default text format, and to control the order of formats listed in the Text format fieldset. (The Text format fieldset is displayed below textareas when users with access to more than one text format create multi-line content.) The text format selected as Default is available to all users and, unless another format is selected, is applied to all content. All text formats are available to users in roles with the "administer filters" permission.') . '
'; + $output .= '' . t('Since text formats, if available, are presented in the same order as the list below, it may be helpful to arrange the formats in descending order of your preference for their use. To change the order of an text format, grab a drag-and-drop handle under the Name column and drag to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the Save changes button at the bottom of the page.') . '
'; return $output; - case 'admin/settings/filters/%': - return '' . t('Every filter performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format. If you notice some filters are causing conflicts in the output, you can rearrange them.', array('@rearrange' => url('admin/settings/filters/' . $arg[3] . '/order'))) . '
'; - case 'admin/settings/filters/%/configure': - return '' . t('If you cannot find the settings for a certain filter, make sure you have enabled it on the edit tab first.', array('@url' => url('admin/settings/filters/' . $arg[3]))) . '
'; - case 'admin/settings/filters/%/order': + case 'admin/settings/filter/%': + return '' . t('Every filter performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this format. If you notice some filters are causing conflicts in the output, you can rearrange them.', array('@rearrange' => url('admin/settings/filter/' . $arg[3] . '/order'))) . '
'; + case 'admin/settings/filter/%/configure': + return '' . t('If you cannot find the settings for a certain filter, make sure you have enabled it on the edit tab first.', array('@url' => url('admin/settings/filter/' . $arg[3]))) . '
'; + case 'admin/settings/filter/%/order': $output = '' . t('Because of the flexible filtering system, you might encounter a situation where one filter prevents another from doing its job. For example: a word in an URL gets converted into a glossary term, before the URL can be converted to a clickable link. When this happens, rearrange the order of the filters.') . '
'; $output .= '' . t("Filters are executed from top-to-bottom. To change the order of the filters, modify the values in the Weight column or grab a drag-and-drop handle under the Name column and drag filters to new locations in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the Save configuration button at the bottom of the page.") . '
'; return $output; @@ -67,26 +67,26 @@ function filter_theme() { * Implementation of hook_menu(). */ function filter_menu() { - $items['admin/settings/filters'] = array( - 'title' => 'Input formats', + $items['admin/settings/filter'] = array( + 'title' => 'Text formats', 'description' => 'Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters.', 'page callback' => 'drupal_get_form', 'page arguments' => array('filter_admin_overview'), 'access arguments' => array('administer filters'), ); - $items['admin/settings/filters/list'] = array( + $items['admin/settings/filter/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/settings/filters/add'] = array( - 'title' => 'Add input format', + $items['admin/settings/filter/add'] = array( + 'title' => 'Add text format', 'page callback' => 'filter_admin_format_page', 'access arguments' => array('administer filters'), 'type' => MENU_LOCAL_TASK, 'weight' => 1, ); - $items['admin/settings/filters/delete'] = array( - 'title' => 'Delete input format', + $items['admin/settings/filter/delete'] = array( + 'title' => 'Delete text format', 'page callback' => 'drupal_get_form', 'page arguments' => array('filter_admin_delete'), 'access arguments' => array('administer filters'), @@ -98,7 +98,7 @@ function filter_menu() { 'access callback' => TRUE, 'type' => MENU_SUGGESTED_ITEM, ); - $items['admin/settings/filters/%filter_format'] = array( + $items['admin/settings/filter/%filter_format'] = array( 'type' => MENU_CALLBACK, 'title callback' => 'filter_admin_format_title', 'title arguments' => array(3), @@ -106,12 +106,12 @@ function filter_menu() { 'page arguments' => array(3), 'access arguments' => array('administer filters'), ); - $items['admin/settings/filters/%filter_format/edit'] = array( + $items['admin/settings/filter/%filter_format/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => 0, ); - $items['admin/settings/filters/%filter_format/configure'] = array( + $items['admin/settings/filter/%filter_format/configure'] = array( 'title' => 'Configure', 'page callback' => 'filter_admin_configure_page', 'page arguments' => array(3), @@ -119,7 +119,7 @@ function filter_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 1, ); - $items['admin/settings/filters/%filter_format/order'] = array( + $items['admin/settings/filter/%filter_format/order'] = array( 'title' => 'Rearrange', 'page callback' => 'filter_admin_order_page', 'page arguments' => array(3), @@ -148,7 +148,7 @@ function filter_perm() { return array( 'administer filters' => array( 'title' => t('Administer filters'), - 'description' => t('Manage input formats and filters, and select which roles may use them. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + 'description' => t('Manage text formats and filters, and select which roles may use them. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), ), ); } @@ -283,13 +283,13 @@ function filter_filter_tips($delta, $for } /** - * Retrieve a list of input formats. + * Retrieve a list of text formats. */ function filter_formats($index = NULL) { global $user; static $formats; - // Administrators can always use all input formats. + // Administrators can always use all text formats. $all = user_access('administer filters'); if (!isset($formats)) { @@ -355,7 +355,7 @@ function filter_resolve_format($format) return $format == FILTER_FORMAT_DEFAULT ? variable_get('filter_default_format', 1) : $format; } /** - * Check if text in a certain input format is allowed to be cached. + * Check if text in a certain text format is allowed to be cached. */ function filter_format_allowcache($format) { static $cache = array(); @@ -472,9 +472,9 @@ function check_markup($text, $format = F * @param $value * The ID of the format that is currently selected. * @param $weight - * The weight of the input format. + * The weight of the text format. * @param $parents - * Required when defining multiple input formats on a single node or having a different parent than 'format'. + * Required when defining multiple text formats on a single node or having a different parent than 'format'. * @return * HTML for the form element. */ @@ -487,7 +487,7 @@ function filter_form($value = FILTER_FOR if (count($formats) > 1) { $form = array( '#type' => 'fieldset', - '#title' => t('Input format'), + '#title' => t('Text format'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => $weight, @@ -952,7 +952,7 @@ function filter_xss($string, $allowed_ta if (!drupal_validate_utf8($string)) { return ''; } - // Store the input format + // Store the text format _filter_xss_split($allowed_tags, TRUE); // Remove NULL characters (ignored by some browsers) $string = str_replace(chr(0), '', $string); === modified file 'modules/filter/filter.pages.inc' --- modules/filter/filter.pages.inc 2008-12-20 19:00:05 +0000 +++ modules/filter/filter.pages.inc 2009-01-21 12:11:48 +0000 @@ -28,7 +28,7 @@ function filter_tips_long() { * @param $tips * An array containing descriptions and a CSS id in the form of * 'module-name/filter-id' (only used when $long is TRUE) for each input - * filter in one or more input formats. Example: + * filter in one or more text formats. Example: * @code * array( * 'Full HTML' => array( @@ -53,7 +53,7 @@ function theme_filter_tips($tips, $long $multiple = count($tips) > 1; if ($multiple) { - $output = t('Input formats') . ':'; + $output = t('Text formats') . ':'; } if (count($tips)) { === modified file 'modules/filter/filter.test' --- modules/filter/filter.test 2008-12-28 20:00:08 +0000 +++ modules/filter/filter.test 2009-01-21 12:11:48 +0000 @@ -28,15 +28,15 @@ class FilterAdminTestCase extends Drupal // Change default filter. $edit = array(); $edit['default'] = $full; - $this->drupalPost('admin/settings/filters', $edit, t('Save changes')); + $this->drupalPost('admin/settings/filter', $edit, t('Save changes')); $this->assertText(t('Default format updated.'), t('Default filter updated successfully.')); - $this->assertNoRaw('admin/settings/filters/delete/' . $full, t('Delete link not found.')); + $this->assertNoRaw('admin/settings/filter/delete/' . $full, t('Delete link not found.')); // Add an additional tag. $edit = array(); $edit['allowed_html_1'] = ' -
-
- ' . '
'; // Adding tag.
- $this->drupalPost('admin/settings/filters/' . $filtered . '/configure', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/filter/' . $filtered . '/configure', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Allowed HTML tag added.'));
$this->assertRaw(htmlentities($edit['allowed_html_1']), t('Tag displayed.'));
@@ -48,7 +48,7 @@ class FilterAdminTestCase extends Drupal
$edit = array();
$edit['weights[filter/' . $second_filter . ']'] = 1;
$edit['weights[filter/' . $first_filter . ']'] = 2;
- $this->drupalPost('admin/settings/filters/' . $filtered . '/order', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/filter/' . $filtered . '/order', $edit, t('Save configuration'));
$this->assertText(t('The filter ordering has been saved.'), t('Order saved successfully.'));
$result = db_query('SELECT * FROM {filter} WHERE format = %d ORDER BY weight ASC', $filtered);
@@ -66,8 +66,8 @@ class FilterAdminTestCase extends Drupal
$edit['roles[2]'] = TRUE;
$edit['filters[filter/' . $second_filter . ']'] = TRUE;
$edit['filters[filter/' . $first_filter . ']'] = TRUE;
- $this->drupalPost('admin/settings/filters/add', $edit, t('Save configuration'));
- $this->assertRaw(t('Added input format %format.', array('%format' => $edit['name'])), t('New filter created.'));
+ $this->drupalPost('admin/settings/filter/add', $edit, t('Save configuration'));
+ $this->assertRaw(t('Added text format %format.', array('%format' => $edit['name'])), t('New filter created.'));
$format = $this->getFilter($edit['name']);
$this->assertNotNull($format, t('Format found in database.'));
@@ -78,23 +78,23 @@ class FilterAdminTestCase extends Drupal
$this->assertFieldByName('filters[filter/' . $first_filter . ']', '', t('Url filter found.'));
// Delete new filter.
- $this->drupalPost('admin/settings/filters/delete/' . $format->format, array(), t('Delete'));
- $this->assertRaw(t('Deleted input format %format.', array('%format' => $edit['name'])), t('Format successfully deleted.'));
+ $this->drupalPost('admin/settings/filter/delete/' . $format->format, array(), t('Delete'));
+ $this->assertRaw(t('Deleted text format %format.', array('%format' => $edit['name'])), t('Format successfully deleted.'));
}
// Change default filter back.
$edit = array();
$edit['default'] = $filtered;
- $this->drupalPost('admin/settings/filters', $edit, t('Save changes'));
+ $this->drupalPost('admin/settings/filter', $edit, t('Save changes'));
$this->assertText(t('Default format updated.'), t('Default filter updated successfully.'));
- $this->assertNoRaw('admin/settings/filters/delete/' . $filtered, t('Delete link not found.'));
+ $this->assertNoRaw('admin/settings/filter/delete/' . $filtered, t('Delete link not found.'));
// Allow authenticated users on full HTML.
$edit = array();
$edit['roles[2]'] = TRUE;
- $this->drupalPost('admin/settings/filters/' . $full, $edit, t('Save configuration'));
- $this->assertText(t('The input format settings have been updated.'), t('Full HTML format successfully updated.'));
+ $this->drupalPost('admin/settings/filter/' . $full, $edit, t('Save configuration'));
+ $this->assertText(t('The text format settings have been updated.'), t('Full HTML format successfully updated.'));
// Switch user.
$this->drupalLogout();
@@ -128,20 +128,20 @@ class FilterAdminTestCase extends Drupal
// Allowed tags.
$edit = array();
$edit['allowed_html_1'] = ' -
-
- ';
- $this->drupalPost('admin/settings/filters/' . $filtered . '/configure', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/filter/' . $filtered . '/configure', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Changes reverted.'));
// Full HTML.
$edit = array();
$edit['roles[2]'] = FALSE;
- $this->drupalPost('admin/settings/filters/' . $full, $edit, t('Save configuration'));
- $this->assertText(t('The input format settings have been updated.'), t('Full HTML format successfully reverted.'));
+ $this->drupalPost('admin/settings/filter/' . $full, $edit, t('Save configuration'));
+ $this->assertText(t('The text format settings have been updated.'), t('Full HTML format successfully reverted.'));
// Filter order.
$edit = array();
$edit['weights[filter/' . $second_filter . ']'] = 2;
$edit['weights[filter/' . $first_filter . ']'] = 1;
- $this->drupalPost('admin/settings/filters/' . $filtered . '/order', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/filter/' . $filtered . '/order', $edit, t('Save configuration'));
$this->assertText(t('The filter ordering has been saved.'), t('Order successfully reverted.'));
}
@@ -223,14 +223,14 @@ class FilterTestCase extends DrupalWebTe
'roles[2]' => TRUE,
'filters[filter/' . $filter . ']' => TRUE,
);
- $this->drupalPost('admin/settings/filters/add', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/filter/add', $edit, t('Save configuration'));
return db_fetch_object(db_query("SELECT * FROM {filter_format} WHERE name = '%s'", $edit['name']));
}
function deleteFormat($format) {
if ($format !== NULL) {
// Delete new filter.
- $this->drupalPost('admin/settings/filters/delete/' . $format->format, array(), t('Delete'));
+ $this->drupalPost('admin/settings/filter/delete/' . $format->format, array(), t('Delete'));
}
}
}
=== modified file 'modules/node/node.install'
--- modules/node/node.install 2009-01-02 22:00:08 +0000
+++ modules/node/node.install 2009-01-21 12:11:48 +0000
@@ -264,7 +264,7 @@ function node_schema() {
'default' => 0,
),
'format' => array(
- 'description' => "The input format used by this version's body.",
+ 'description' => "The text format used by this version's body.",
'type' => 'int',
'not null' => TRUE,
'default' => 0,
=== modified file 'modules/node/node.pages.inc'
--- modules/node/node.pages.inc 2008-12-30 17:00:08 +0000
+++ modules/node/node.pages.inc 2009-01-21 12:24:29 +0000
@@ -297,7 +297,7 @@ function node_body_field(&$node, $label,
'#default_value' => $include ? $node->body : ($node->teaser . $node->body),
'#rows' => 20,
'#required' => ($word_count > 0),
- '#input_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT,
+ '#text_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT,
);
return $form;
=== modified file 'modules/node/node.test'
--- modules/node/node.test 2009-01-09 17:00:08 +0000
+++ modules/node/node.test 2009-01-21 12:11:48 +0000
@@ -210,7 +210,7 @@ class NodeTeaserTestCase extends DrupalW
// The teasers we expect node_teaser() to return when $size is the index
// of each array item.
- // Using an input format with no line-break filter:
+ // Using an text format with no line-break filter:
$teasers = array(
"
\nHi\n
\n\nfolks\n
\n!\n
",
"<",
@@ -252,7 +252,7 @@ class NodeTeaserTestCase extends DrupalW
"\nHi\n
\n\nfolks\n
\n!\n
",
);
- // And Using an input format WITH the line-break filter.
+ // And Using an text format WITH the line-break filter.
$teasers_lb = array(
"\nHi\n
\n\nfolks\n
\n!\n
",
"<",
=== modified file 'modules/php/php.install'
--- modules/php/php.install 2008-12-06 09:01:58 +0000
+++ modules/php/php.install 2009-01-21 12:11:48 +0000
@@ -6,7 +6,7 @@
*/
function php_install() {
$format_exists = db_result(db_query("SELECT COUNT(*) FROM {filter_format} WHERE name = 'PHP code'"));
- // Add a PHP code input format, if it does not exist. Do this only for the
+ // Add a PHP code text format, if it does not exist. Do this only for the
// first install (or if the format has been manually deleted) as there is no
// reliable method to identify the format in an uninstall hook or in
// subsequent clean installs.
@@ -17,7 +17,7 @@ function php_install() {
// Enable the PHP evaluator filter.
db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, 'php', 0, 0)", $format);
- drupal_set_message(t('A !php-code input format has been created.', array('!php-code' => l('PHP code', 'admin/settings/filters/' . $format))));
+ drupal_set_message(t('A !php-code text format has been created.', array('!php-code' => l('PHP code', 'admin/settings/filter/' . $format))));
}
}
=== modified file 'modules/php/php.module'
--- modules/php/php.module 2008-12-06 09:01:58 +0000
+++ modules/php/php.module 2009-01-21 12:11:48 +0000
@@ -44,7 +44,7 @@ function php_filter_tips($delta, $format
$output .= '- ' . t('Consider including your custom PHP code within a site-specific module or
template.php file rather than embedding it directly into a post or block.') . ' ';
$output .= '- ' . t('Be aware that the ability to embed PHP code within content is provided by the PHP Filter module. If this module is disabled or deleted, then blocks and posts with embedded PHP may display, rather than execute, the PHP code.') . '
';
$output .= '' . t('A basic example: Creating a "Welcome" block that greets visitors with a simple message.') . '
';
- $output .= '- ' . t('
Add a custom block to your site, named "Welcome" . With its input format set to "PHP code" (or another format supporting PHP input), add the following in the Block body:
+ $output .= '- ' . t('
Add a custom block to your site, named "Welcome" . With its text format set to "PHP code" (or another format supporting PHP input), add the following in the Block body:
print t(\'Welcome visitor! Thank you for visiting.\');
') . ' ';
=== modified file 'modules/php/php.test'
--- modules/php/php.test 2008-12-06 09:01:58 +0000
+++ modules/php/php.test 2009-01-21 12:11:48 +0000
@@ -13,7 +13,7 @@ class PHPTestCase extends DrupalWebTestC
$this->drupalLogin($admin_user);
// Confirm that the PHP filter is #3.
- $this->drupalGet('admin/settings/filters/3');
+ $this->drupalGet('admin/settings/filter/3');
$this->assertText('PHP code', t('On PHP code filter page.'));
}
@@ -53,7 +53,7 @@ class PHPFilterTestCase extends PHPTestC
$edit = array();
$edit['roles[2]'] = TRUE; // Set authenticated users to have permission to use filter.
$this->drupalPost(NULL, $edit, 'Save configuration');
- $this->assertText(t('The input format settings have been updated.'), t('PHP format available to authenticated users.'));
+ $this->assertText(t('The text format settings have been updated.'), t('PHP format available to authenticated users.'));
// Create node with PHP filter enabled.
$web_user = $this->drupalCreateUser(array('access content', 'create page content', 'edit own page content'));
@@ -105,4 +105,4 @@ class PHPAccessTestCase extends PHPTestC
$this->drupalGet('node/' . $node->nid . '/edit');
$this->assertNoFieldByName('body_format', '3', t('Format not available.'));
}
-}
\ No newline at end of file
+}
=== modified file 'modules/system/system.install'
--- modules/system/system.install 2009-01-19 11:00:08 +0000
+++ modules/system/system.install 2009-01-21 12:11:48 +0000
@@ -375,11 +375,11 @@ function system_install() {
db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", 0, 0, 'all', 1, 0, 0);
- // Add input formats.
+ // Add text formats.
db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Filtered HTML', ',1,2,', 1);
db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Full HTML', '', 1);
- // Enable filters for each input format.
+ // Enable filters for each text format.
// Filtered HTML:
// URL filter.
@@ -1470,7 +1470,7 @@ function system_update_6008() {
function system_update_6009() {
$ret = array();
- // If any input format used the Drupal 5 PHP filter.
+ // If any text format used the Drupal 5 PHP filter.
if (db_result(db_query("SELECT COUNT(format) FROM {filters} WHERE module = 'filter' AND delta = 1"))) {
// Enable the PHP filter module.
$ret[] = update_sql("UPDATE {system} SET status = 1 WHERE name = 'php' AND type = 'module'");
@@ -1670,7 +1670,7 @@ function system_update_6018() {
while ($format = db_fetch_object($result)) {
$weight = db_result(db_query("SELECT MAX(weight) FROM {filters} WHERE format = %d", $format->format));
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", $format->format, 'filter', 3, max(10, $weight + 1));
- $ret[] = array('success' => TRUE, 'query' => "HTML corrector filter added to the '" . $format->name . "' input format.");
+ $ret[] = array('success' => TRUE, 'query' => "HTML corrector filter added to the '" . $format->name . "' text format.");
}
return $ret;