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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| delicious_body_teaser_check.patch | 797 bytes |

#1
Thankyou!
I'll get that committed to the development branch tomorrow.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.