]> git.mxchange.org Git - friendica.git/commitdiff
use strpos instead of strstr, faster
authorFriendika <info@friendika.com>
Thu, 6 Oct 2011 04:04:53 +0000 (21:04 -0700)
committerFriendika <info@friendika.com>
Thu, 6 Oct 2011 04:04:53 +0000 (21:04 -0700)
include/diaspora.php

index cdb1d6d11b20fa915ea0a6c9707b5424c86e6977..93e7d2cdbc57c3f90794ec51fabc64499c7eba1f 100644 (file)
@@ -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']),