1
0
Fork 0

small fixes

This commit is contained in:
Friendika 2011-02-16 13:19:54 -08:00
parent acce5c95a3
commit d6998ffef2
2 changed files with 4 additions and 3 deletions

View file

@ -545,7 +545,7 @@ function item_content(&$a) {
// generate a resource-id and therefore aren't intimately linked to the item. // generate a resource-id and therefore aren't intimately linked to the item.
if(strlen($item['resource-id'])) { if(strlen($item['resource-id'])) {
$q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ", q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ",
dbesc($item['resource-id']), dbesc($item['resource-id']),
intval($item['uid']) intval($item['uid'])
); );

View file

@ -87,10 +87,11 @@ function message_post(&$a) {
$image_uri = substr($image,strrpos($image,'/') + 1); $image_uri = substr($image,strrpos($image,'/') + 1);
$image_uri = substr($image_uri,0, strpos($image_uri,'-')); $image_uri = substr($image_uri,0, strpos($image_uri,'-'));
$r = q("UPDATE `photo` SET `allow_cid` = '%s' $r = q("UPDATE `photo` SET `allow_cid` = '%s'
WHERE `resource-id` = '%s' AND `album` = '%s' ", WHERE `resource-id` = '%s' AND `album` = '%s' AND `uid` = %d ",
dbesc('<' . $recipient . '>'), dbesc('<' . $recipient . '>'),
dbesc($image_uri), dbesc($image_uri),
dbesc( t('Wall Photos')) dbesc( t('Wall Photos')),
intval(local_user())
); );
} }
} }