? .svn ? paging-fix-d5-d6-upgrade-556334-1.patch ? admin/.svn Index: paging.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/paging/paging.install,v retrieving revision 1.4 diff -u -p -r1.4 paging.install --- paging.install 17 Jan 2009 21:23:15 -0000 1.4 +++ paging.install 23 Aug 2009 06:02:18 -0000 @@ -38,3 +38,32 @@ function paging_update_2() { } return array(); } + +/** + * Re-weight Paging filter after HTML Corrector, to prevent weird HTML comments + * from appearing in all content. + */ +function paging_update_6000() { + $ret = array(); + + // Retrieve list of input formats (Filtered HTML, etc.) + $result = db_query('SELECT format FROM {filter_formats}'); + while ($format = db_fetch_object($result)) { + // Retrieve list of attached filters (Line break converter, etc.) + $filters = filter_list_format($format->format); + + // If format has both HTML Corrector (filter/3) and Paging (paging/0), then + // set weight of Paging to higher than HTML Corrector. + if (isset($filters['filter/3']) && isset($filters['paging/0'])) { + $html_corrector = $filters['filter/3']; + $weight = $html_corrector->weight + 1; + $ret[] = update_sql("UPDATE {filters} SET weight = $weight WHERE format = $format->format AND module = 'paging' AND delta = 0"); + + } + } + + // Clear the filter cache. + cache_clear_all($format->format . ':', 'cache_filter', TRUE); + + return $ret; +}