From: Friendika Date: Thu, 6 Oct 2011 04:04:53 +0000 (-0700) Subject: use strpos instead of strstr, faster X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce11d231b8157568a48bf046ae28ef23e500887e;p=friendica.git use strpos instead of strstr, faster --- diff --git a/include/diaspora.php b/include/diaspora.php index cdb1d6d11b..93e7d2cdbc 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -762,7 +762,7 @@ function diaspora_photo($importer,$xml,$msg) { $link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n"; - if(! strstr($parent_item['body'],$link_text)) { + if(strpos($parent_item['body'],$link_text) === false) { $r = q("update item set `body` = '%s' where `id` = %d and `uid` = %d limit 1", dbesc($link_text . $parent_item['body']), intval($parent_item['id']),