summaryrefslogtreecommitdiff
path: root/modules/blogapi/blogapi.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-09-05 09:25:52 +0000
committerDries Buytaert <dries@buytaert.net>2008-09-05 09:25:52 +0000
commit2b0766503392aaf91837b64ca6a0a3c6d2f035ce (patch)
tree0f22a3b443809d12fe13b563b615ed7a0e0df0f5 /modules/blogapi/blogapi.module
parent4231e3e98ba477e34a424bbc2e766e6f3ba42411 (diff)
downloadbrdo-2b0766503392aaf91837b64ca6a0a3c6d2f035ce.tar.gz
brdo-2b0766503392aaf91837b64ca6a0a3c6d2f035ce.tar.bz2
- Patch #64967 by Arancaytar, meba: ereg -> preg for performance reasons and future compatilbility. PHP6 is rumoured to drop ereg support.
Diffstat (limited to 'modules/blogapi/blogapi.module')
-rw-r--r--modules/blogapi/blogapi.module4
1 files changed, 2 insertions, 2 deletions
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('<title>([^<]*)</title>', $contents, $title)) {
+ if (preg_match('/<title>(.*?)<\/title>/i', $contents, $title)) {
$title = strip_tags($title[0]);
- $contents = ereg_replace('<title>[^<]*</title>', '', $contents);
+ $contents = preg_replace('/<title>.*?<\/title>/i', '', $contents);
}
else {
list($title, $contents) = explode("\n", $contents, 2);