? dif ? dme.module.cleaned ? dme_no_nodeapi_hacks.patch cvs diff: Diffing . Index: dme.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/dme/dme.module,v retrieving revision 1.1 diff -u -p -r1.1 dme.module --- dme.module 28 Jan 2008 22:54:01 -0000 1.1 +++ dme.module 14 Apr 2008 04:30:33 -0000 @@ -30,19 +30,12 @@ function dme_filter($op, $delta = 0, $fo $text = $dme->_dme_prepare_text($text); return $text; case 'process': - // What we're doing here is trying to bypass the problem with filters. If we've got a nid that we can scavenge from the url, then we work at - // filtering with it so that we can get the advantage of the caching. If not, then we skip this and continue on, with the hope that - // dme_nodeapi can then pick up and handle the text change. - $nid = arg(1); - if (is_numeric($nid) && arg(0) == 'node') { + if (arg(0) == 'node' && is_numeric(arg(1))) { $node = new stdClass(); - $node->nid = $nid; + $node->nid = arg(1); $dme->setNode($node); - $text = $dme->_dme_process_text($text); } - //drupal_set_message('Final:'. $text); - return $text; - + return $dme->_dme_process_text($text); default: return $text; } @@ -70,34 +63,6 @@ function dme_filter_tips($delta, $format } /** - * Implements hook_nodeapi - * - * @param unknown_type $node - * @param unknown_type $op - * @param unknown_type $a3 - * @param unknown_type $a4 - */ -function dme_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { - if ($op == 'alter') { - $dme = new dmeEngine(); - $dme->setNode($node); - if ($a3) { - $node->teaser = $dme->_dme_process_text($node->teaser); - } - else { - $node->body = $dme->_dme_process_text($node->body); - } - } - if ($op == 'rss item') { - if ('teaser' == variable_get('feed_item_length', 'teaser')) { - $dme = new dmeEngine(); - $dme->setNode($node); - $node->teaser = $dme->_dme_process_text($node->teaser); - } - } -} - -/** * Implementation of hook_simpletest(). * */ cvs diff: Diffing dme_test_module cvs diff: Diffing tests