Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.37
diff -u -p -r1.37 filter.admin.inc
--- modules/filter/filter.admin.inc	24 Aug 2009 00:14:20 -0000	1.37
+++ modules/filter/filter.admin.inc	24 Aug 2009 05:39:34 -0000
@@ -353,7 +353,7 @@ function filter_admin_configure(&$form_s
   foreach ($list as $filter) {
     $filter_info = module_invoke($filter->module, 'filter_info');
     if (isset($filter_info[$filter->name]['settings callback']) && function_exists($filter_info[$filter->name]['settings callback'])) {
-      $form_module = call_user_func($filter_info[$filter->name]['settings callback'], $format->format);
+      $form_module = $filter_info[$filter->name]['settings callback']($format->format);
     }
     if (isset($form_module) && is_array($form_module)) {
       $form = array_merge($form, $form_module);
Index: modules/filter/filter.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.api.php,v
retrieving revision 1.9
diff -u -p -r1.9 filter.api.php
--- modules/filter/filter.api.php	13 Aug 2009 19:53:19 -0000	1.9
+++ modules/filter/filter.api.php	24 Aug 2009 05:28:40 -0000
@@ -13,7 +13,7 @@
 
 /**
  * Define content filters.
- * 
+ *
  * Content in Drupal is passed through all enabled filters before it is
  * output. This lets a module modify content to the site administrator's
  * liking.
@@ -24,21 +24,21 @@
  * the filter system which filters are available.
  *
  * Filtering is a two-step process. First, the content is 'prepared' by calling
- * the 'prepare callback' function for every filter. The purpose of the 'prepare callback'
- * is to escape HTML-like structures. For example, imagine a filter which allows the
- * user to paste entire chunks of programming code without requiring manual
- * escaping of special HTML characters like @< or @&. If the programming code
- * were left untouched, then other filters could think it was HTML and change
- * it. For most filters however, the prepare-step is not necessary, and they can
- * just return the input without changes.
- *
- * Filters should not use the 'prepare callback' step for anything other than escaping,
- * because that would short-circuits the control the user has over the order
- * in which filters are applied.
- *
- * The second step is the actual processing step. The result from the
- * prepare-step gets passed to all the filters again, this time with the
- * 'process callback' function. It's here that filters should perform actual changing of
+ * the 'prepare callback' function for every filter. The purpose of the 'prepare
+ * callback' is to escape HTML-like structures. For example, imagine a filter
+ * which allows the user to paste entire chunks of programming code without
+ * requiring manual escaping of special HTML characters like @< or @&. If the
+ * programming code were left untouched, then other filters could think it was
+ * HTML and change it. For most filters however, the prepare-step is not
+ * necessary, and they can just return the input without changes.
+ *
+ * Filters should not use the 'prepare callback' step for anything other than
+ * escaping, because that would short-circuits the control the user has over the
+ * order in which filters are applied.
+ *
+ * The second step is the actual processing step. The result from the prepare
+ * step gets passed to all the filters again, this time with the 'process
+ * callback' function. It's here that filters should perform actual changing of
  * the content: transforming URLs into hyperlinks, converting smileys into
  * images, etc.
  *
@@ -65,42 +65,44 @@
  * if it's not needed. You can clear the cache by running the SQL query 'DELETE
  * FROM cache_filter';
  *
- * @return 
- *  An array of filter items. Each filter item has a numeric key corresponding to the
- *  filter delta in the module. The item is an associative array that may
- *  contain the following key-value pairs:
- *   - "name": Required. The name of the filter.
- *   - "description": Short description of what this filter does.
- *   - "prepare callback": The callback function to call in the 'prepare' step of 
- *     the filtering.
- *   - "process callback": Required. The callback function to call in the 'process' step of 
- *     the filtering.
- *   - "settings callback": The callback function that provides form controls for 
- *     the filter's settings. These settings are stored with variable_set() when
- *     the form is submitted. Remember to use the $format identifier in the variable
- *     and control names  to store settings per text format (e.g. "mymodule_setting_$format").
- *   - "tips callback": The callback function that provide tips for using filters.
- *     A module's tips should be informative and to the point. Short tips are
- *     preferably one-liners.
- *   - "cache": Specify if the filter result can be cached. TRUE by default.
+ * @return
+ *   An array of filter items. Each filter item has a numeric key corresponding
+ *   to the filter delta in the module. The item is an associative array that
+ *   may contain the following key-value pairs:
+ *   - 'name': Required. The name of the filter.
+ *   - 'description': Short description of what this filter does.
+ *   - 'prepare callback': The callback function to call in the 'prepare' step
+ *     of the filtering.
+ *   - 'process callback': Required. The callback function to call in the
+ *     'process' step of the filtering.
+ *   - 'settings callback': The callback function that provides form controls
+ *     for the filter's settings. These settings are stored with variable_set()
+ *     when the form is submitted. Remember to use the $format identifier in the
+ *     variable and control names  to store settings per text format (e.g.
+ *     'mymodule_setting_$format').
+ *   - 'tips callback': The callback function that provide tips for using
+ *     filters. A module's tips should be informative and to the point. Short
+ *     tips are preferably one-liners.
+ *   - 'cache': Specify if the filter result can be cached. TRUE by default.
  *
  * For a detailed usage example, see filter_example.module. For an example of
  * using multiple filters in one module, see filter_filter_info().
  */
 function hook_filter_info() {
-  $filters[0] = array(
-    'name' => t('Limit allowed HTML tags'),
+  $filters['filter_html'] = array(
+    'title' => t('Limit allowed HTML tags'),
     'description' => t('Allows you to restrict the HTML tags the user can use. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.'),
     'process callback' => '_filter_html',
     'settings callback' => '_filter_html_settings',
-    'tips callback'  => '_filter_html_tips'
+    'tips callback' => '_filter_html_tips',
   );
-  $filters[1] = array(
-    'name' => t('Convert line breaks'),
+  $filters['filter_autop'] = array(
+    'title' => t('Convert line breaks'),
     'description' => t('Converts line breaks into HTML (i.e. &lt;br&gt; and &lt;p&gt;) tags.'),
     'process callback' => '_filter_autop',
-    'tips callback' => '_filter_autop_tips'
+    'tips callback' => '_filter_autop_tips',
   );
+  return $filters;
 }
 
 /**
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.17
diff -u -p -r1.17 filter.install
--- modules/filter/filter.install	21 Aug 2009 17:28:26 -0000	1.17
+++ modules/filter/filter.install	24 Aug 2009 05:55:37 -0000
@@ -153,10 +153,10 @@ function filter_update_7003() {
       '4' => 'filter_html_escape',
     ),
     'php' => array(
-      '0' => 'php_code'
-    )
+      '0' => 'php_code',
+    ),
   );
-  
+
   // Rename field 'delta' to 'name'.
   db_drop_unique_key($ret, 'filter', 'fmd');
   db_drop_index($ret, 'filter', 'list');
@@ -174,10 +174,10 @@ function filter_update_7003() {
       ),
       'indexes' => array(
         'list' => array('format', 'weight', 'module', 'name'),
-      )      
-    )
+      ),
+    ),
   );
-    
+
   // Loop through each filter and make changes to the core filter table.
   foreach ($renamed_deltas as $module => $deltas) {
     foreach ($deltas as $old_delta => $new_delta) {
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.277
diff -u -p -r1.277 filter.module
--- modules/filter/filter.module	24 Aug 2009 00:14:20 -0000	1.277
+++ modules/filter/filter.module	24 Aug 2009 05:43:29 -0000
@@ -339,10 +339,10 @@ function filter_list_all() {
 
   foreach (module_implements('filter_info') as $module) {
     $function = $module . '_filter_info';
-    $info = $function('list');
+    $info = $function();
     if (isset($info) && is_array($info)) {
       foreach ($info as $name => $filter) {
-        $filters[$module . '/' . $name] = (object)($filter + array(
+        $filters[$module . '/' . $name] = (object) ($filter + array(
           'module' => $module,
           'name' => $name,
         ));
@@ -454,7 +454,7 @@ function check_markup($text, $format = F
     foreach ($filters as $filter) {
       $filter_info = module_invoke($filter->module, 'filter_info');
       if (isset($filter_info[$filter->name]['prepare callback']) && function_exists($filter_info[$filter->name]['prepare callback'])) {
-        $text = call_user_func($filter_info[$filter->name]['prepare callback'], $text, $format, $langcode, $cache_id);
+        $text = $filter_info[$filter->name]['prepare callback']($text, $format, $langcode, $cache_id);
       }
     }
 
@@ -462,7 +462,7 @@ function check_markup($text, $format = F
     foreach ($filters as $filter) {
       $filter_info = module_invoke($filter->module, 'filter_info');
       if (isset($filter_info[$filter->name]['process callback']) && function_exists($filter_info[$filter->name]['process callback'])) {
-        $text = call_user_func($filter_info[$filter->name]['process callback'], $text, $format, $langcode, $cache_id);
+        $text = $filter_info[$filter->name]['process callback']($text, $format, $langcode, $cache_id);
       }
     }
 
@@ -653,26 +653,29 @@ function theme_filter_guidelines($format
  * Filters implemented by the filter.module.
  */
 
+/**
+ * Implement hook_filter_info().
+ */
 function filter_filter_info() {
   $filters['filter_html'] = array(
     'title' => t('Limit allowed HTML tags'),
     'description' => t('Allows you to restrict the HTML tags the user can use. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.'),
     'process callback' => '_filter_html',
     'settings callback' => '_filter_html_settings',
-    'tips callback'  => '_filter_html_tips'
+    'tips callback' => '_filter_html_tips',
   );
   $filters['filter_autop'] = array(
     'title' => t('Convert line breaks'),
     'description' => t('Converts line breaks into HTML (i.e. &lt;br&gt; and &lt;p&gt;) tags.'),
     'process callback' => '_filter_autop',
-    'tips callback' => '_filter_autop_tips'
+    'tips callback' => '_filter_autop_tips',
   );
   $filters['filter_url'] = array(
     'title' => t('Convert URLs into links'),
     'description' => t('Turns web and e-mail addresses into clickable links.'),
     'process callback' => '_filter_url',
     'settings callback' => '_filter_url_settings',
-    'tips callback' => '_filter_url_tips'
+    'tips callback' => '_filter_url_tips',
   );
   $filters['filter_htmlcorrector'] = array(
     'title' =>  t('Correct broken HTML'),
@@ -683,13 +686,13 @@ function filter_filter_info() {
     'title' => t('Escape all HTML'),
     'description' => t('Escapes all HTML tags, so they will be visible instead of being effective.'),
     'process callback' => '_filter_html_escape',
-    'tips callback' => '_filter_html_escape_tips'
+    'tips callback' => '_filter_html_escape_tips',
   );
   return $filters;
 }
 
 /**
- * Settings for the HTML filter.
+ * Settings callback for the HTML filter.
  */
 function _filter_html_settings($format) {
   $form['filter_html'] = array(
@@ -740,7 +743,7 @@ function _filter_html($text, $format) {
 }
 
 /**
- * Settings for URL filter.
+ * Settings callback for URL filter.
  */
 function _filter_url_settings($format) {
   $form['filter_urlfilter'] = array(
Index: modules/filter/filter.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.test,v
retrieving revision 1.32
diff -u -p -r1.32 filter.test
--- modules/filter/filter.test	22 Aug 2009 00:58:53 -0000	1.32
+++ modules/filter/filter.test	24 Aug 2009 05:30:30 -0000
@@ -423,7 +423,7 @@ class FilterUnitTest extends DrupalWebTe
    *   or better a whitelist approach should be used for that too.
    */
   function testFilter() {
-    $format = "fake format";
+    $format = 'fake_format';
 
     // HTML filter is not able to secure some tags, these should never be
     // allowed.
Index: modules/php/php.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/php/php.module,v
retrieving revision 1.18
diff -u -p -r1.18 php.module
--- modules/php/php.module	21 Aug 2009 17:28:27 -0000	1.18
+++ modules/php/php.module	24 Aug 2009 05:42:06 -0000
@@ -6,7 +6,6 @@
  * Additional filter for PHP input.
  */
 
-
 /**
  * Implement hook_help().
  */
@@ -120,22 +119,17 @@ else {
 
 /**
  * Implement hook_filter_info().
- * 
- * Contains a basic PHP evaluator.
  *
  * Executes PHP code. Use with care.
  */
 function php_filter_info() {
-  return array(
-    'php_code' => array(
-      'title' => t('PHP evaluator'),
-      'description' => t('Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!'), 
-      'cache' => FALSE,
-      'process callback' => 'php_eval',
-      'tips callback' => '_php_filter_tips'
-    )
+  $filters['php_code'] = array(
+    'title' => t('PHP evaluator'),
+    'description' => t('Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!'),
+    'process callback' => 'php_eval',
+    'tips callback' => '_php_filter_tips',
+    'cache' => FALSE,
   );
+  return $filters;
 }
 
-
-
