use strpos instead of strstr, faster
This commit is contained in:
parent
d0bef869db
commit
ce11d231b8
1 changed files with 1 additions and 1 deletions
|
@ -762,7 +762,7 @@ function diaspora_photo($importer,$xml,$msg) {
|
||||||
|
|
||||||
$link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
|
$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",
|
$r = q("update item set `body` = '%s' where `id` = %d and `uid` = %d limit 1",
|
||||||
dbesc($link_text . $parent_item['body']),
|
dbesc($link_text . $parent_item['body']),
|
||||||
intval($parent_item['id']),
|
intval($parent_item['id']),
|
||||||
|
|
Loading…
Reference in a new issue