From 2b0766503392aaf91837b64ca6a0a3c6d2f035ce Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 5 Sep 2008 09:25:52 +0000 Subject: - Patch #64967 by Arancaytar, meba: ereg -> preg for performance reasons and future compatilbility. PHP6 is rumoured to drop ereg support. --- modules/blogapi/blogapi.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/blogapi') diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 6272a0be7..56408dbb4 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -558,9 +558,9 @@ function blogapi_validate_user($username, $password) { * For the blogger API, extract the node title from the contents field. */ function blogapi_blogger_title(&$contents) { - if (eregi('([^<]*)', $contents, $title)) { + if (preg_match('/(.*?)<\/title>/i', $contents, $title)) { $title = strip_tags($title[0]); - $contents = ereg_replace('<title>[^<]*', '', $contents); + $contents = preg_replace('/.*?<\/title>/i', '', $contents); } else { list($title, $contents) = explode("\n", $contents, 2); -- cgit v1.2.3