Check teaser and body before smart tagging

alienbrain - December 7, 2008 - 07:00
Project:Delicious
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:paulbooker
Status:closed
Description

The code in delicious_nodeapi() calls _delicious_tag_text() for both $node->body and $node->teaser. However, almost always only one of them is the right one to process. The other will be empty.

When this happens, _delicious_tag_text() unnecessarily loops on all the tags passing an empty $text variable to a preg_match().

Attached a patch which does an emptiness check in delicious_nodeapi() before processing.

AttachmentSize
delicious_body_teaser_check.patch797 bytes

#1

paulbooker - January 22, 2009 - 23:21
Assigned to:Anonymous» paulbooker
Status:needs review» fixed

Thankyou!

I'll get that committed to the development branch tomorrow.

#2

System Message - February 5, 2009 - 23:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.