// Set parent id - and also make sure to inherit the parent's ACL's.
$r = q("UPDATE `item` SET `parent` = %d, `allow_cid` = '%s', `allow_gid` = '%s',
- `deny_cid` = '%s', `deny_gid` = '%s', `private` = %d, `deleted` = %d WHERE `id` = %d LIMIT 1",
+ `deny_cid` = '%s', `deny_gid` = '%s', `private` = %d, `deleted` = %d WHERE `id` = %d",
intval($parent_id),
dbesc($allow_cid),
dbesc($allow_gid),
// update the commented timestamp on the parent
- q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($parent_id)
// mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment)
// delete it!
logger("tag_deliver: no-mention top-level post to communuty or private group. delete.");
- q("DELETE FROM item WHERE id = %d and uid = %d limit 1",
+ q("DELETE FROM item WHERE id = %d and uid = %d",
intval($item_id),
intval($uid)
);
$forum_mode = (($prvgroup) ? 2 : 1);
- q("update item set wall = 1, origin = 1, forum_mode = %d, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s',
- `private` = %d, `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' where id = %d limit 1",
+ q("update item set wall = 1, origin = 1, forum_mode = %d, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s',
+ `private` = %d, `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' where id = %d",
intval($forum_mode),
dbesc($c[0]['name']),
dbesc($c[0]['url']),
if($perm) {
if((($perm == 'rw') && (! intval($contact['writable'])))
|| (($perm == 'r') && (intval($contact['writable'])))) {
- q("update contact set writable = %d where id = %d limit 1",
+ q("update contact set writable = %d where id = %d",
intval(($perm == 'rw') ? 1 : 0),
intval($contact['id'])
);
$a = get_app();
q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s'
- WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ WHERE `uid` = %d AND `id` = %d",
dbesc(datetime_convert()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-4.'.$img->getExt()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-5.'.$img->getExt()),
intval($contact['id'])
);
- $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d",
dbesc(notags(trim($new_name))),
dbesc(datetime_convert()),
intval($contact['uid']),
// update bdyear
- q("UPDATE `contact` SET `bdyear` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ q("UPDATE `contact` SET `bdyear` = '%s' WHERE `uid` = %d AND `id` = %d",
dbesc(substr($birthday,0,4)),
intval($contact['uid']),
intval($contact['id'])
$community_page = intval($rawtags[0]['data']);
}
if(is_array($contact) && intval($contact['forum']) != $community_page) {
- q("update contact set forum = %d where id = %d limit 1",
+ q("update contact set forum = %d where id = %d",
intval($community_page),
intval($contact['id'])
);
if(trim($tag) !== trim($xo->body))
$newtags[] = trim($tag);
}
- q("update item set tag = '%s' where id = %d limit 1",
+ q("update item set tag = '%s' where id = %d",
dbesc(implode(',',$newtags)),
intval($i[0]['id'])
);
else {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
`body` = '', `title` = ''
- WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ WHERE `uri` = '%s' AND `uid` = %d",
dbesc($when),
dbesc(datetime_convert()),
dbesc($uri),
dbesc($item['parent-uri']),
intval($item['uid'])
);
- // who is the last child now?
- $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d
+ // who is the last child now?
+ $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d
ORDER BY `created` DESC LIMIT 1",
dbesc($item['parent-uri']),
intval($importer['uid'])
);
if(count($r)) {
- q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d",
intval($r[0]['id'])
);
}
- }
+ }
}
- }
+ }
}
}
}
// Update content if 'updated' changes
if(count($r)) {
- if (edited_timestamp_is_newer($r[0], $datarray)) {
+ if (edited_timestamp_is_newer($r[0], $datarray)) {
// do not accept (ignore) an earlier edit than one we currently have.
if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited'])
continue;
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
dbesc($parent_uri),
intval($importer['uid'])
);
- $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
intval($allow[0]['data']),
dbesc(datetime_convert()),
dbesc($item_id),
if($xo->id && $xo->content) {
$newtag = '#[url=' . $xo->id . ']'. $xo->content . '[/url]';
if(! (stristr($r[0]['tag'],$newtag))) {
- q("UPDATE item SET tag = '%s' WHERE id = %d LIMIT 1",
+ q("UPDATE item SET tag = '%s' WHERE id = %d",
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . $newtag),
intval($r[0]['id'])
);
if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited'])
continue;
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
$allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow');
if($allow && $allow[0]['data'] != $r[0]['last-child']) {
- $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
intval($allow[0]['data']),
dbesc(datetime_convert()),
dbesc($item_id),
else {
$resource_id = photo_new_resource();
}
-
+
$img_str = fetch_url($photo_url,true);
// guess mimetype from headers or filename
$type = guess_image_type($photo_url,true);
-
-
+
+
$img = new Photo($img_str, $type);
if($img->is_valid()) {
if($have_photo) {
$a = get_app();
q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s'
- WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ WHERE `uid` = %d AND `id` = %d",
dbesc(datetime_convert()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-4.'.$img->getExt()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-5.'.$img->getExt()),
intval($importer['id'])
);
- $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d",
dbesc(notags(trim($new_name))),
dbesc(datetime_convert()),
intval($importer['importer_uid']),
$community_page = intval($rawtags[0]['data']);
}
if(intval($importer['forum']) != $community_page) {
- q("update contact set forum = %d where id = %d limit 1",
+ q("update contact set forum = %d where id = %d",
intval($community_page),
intval($importer['id'])
);
// check for relayed deletes to our conversation
- $is_reply = false;
+ $is_reply = false;
$r = q("select * from item where uri = '%s' and uid = %d limit 1",
dbesc($uri),
intval($importer['importer_uid'])
$parent_uri = $r[0]['parent-uri'];
if($r[0]['id'] != $r[0]['parent'])
$is_reply = true;
- }
+ }
if($is_reply) {
$community = false;
if(trim($tag) !== trim($xo->body))
$newtags[] = trim($tag);
}
- q("update item set tag = '%s' where id = %d limit 1",
+ q("update item set tag = '%s' where id = %d",
dbesc(implode(',',$newtags)),
intval($i[0]['id'])
);
else {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
`body` = '', `title` = ''
- WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ WHERE `uri` = '%s' AND `uid` = %d",
dbesc($when),
dbesc(datetime_convert()),
dbesc($uri),
intval($importer['importer_uid'])
);
if(count($r)) {
- q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d",
intval($r[0]['id'])
);
}
}
else
$sql_extra = " and contact.self = 1 and item.wall = 1 ";
-
- // was the top-level post for this reply written by somebody on this site?
- // Specifically, the recipient?
+
+ // was the top-level post for this reply written by somebody on this site?
+ // Specifically, the recipient?
$is_a_remote_comment = false;
$top_uri = $parent_uri;
-
+
$r = q("select `item`.`parent-uri` from `item`
WHERE `item`.`uri` = '%s'
LIMIT 1",
$top_uri = $r[0]['parent-uri'];
// POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used?
- $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
- `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
- LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
+ `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
+ LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
- AND `item`.`uid` = %d
+ AND `item`.`uid` = %d
$sql_extra
LIMIT 1",
dbesc($top_uri),
continue;
logger('received updated comment' , LOGGER_DEBUG);
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
intval($importer['importer_uid'])
);
if(count($i) && ! intval($i[0]['blocktags'])) {
- q("UPDATE item SET tag = '%s', `edited` = '%s' WHERE id = %d LIMIT 1",
+ q("UPDATE item SET tag = '%s', `edited` = '%s' WHERE id = %d",
dbesc($tagp[0]['tag'] . (strlen($tagp[0]['tag']) ? ',' : '') . $newtag),
intval($tagp[0]['id']),
dbesc(datetime_convert())
intval($r[0]['parent'])
);
- $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d",
dbesc(datetime_convert()),
intval($importer['importer_uid']),
intval($posted_id)
// Update content if 'updated' changes
if(count($r)) {
- if (edited_timestamp_is_newer($r[0], $datarray)) {
+ if (edited_timestamp_is_newer($r[0], $datarray)) {
// do not accept (ignore) an earlier edit than one we currently have.
if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited'])
continue;
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
dbesc($parent_uri),
intval($importer['importer_uid'])
);
- $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
intval($allow[0]['data']),
dbesc(datetime_convert()),
dbesc($item_id),
// extract tag, if not duplicate, add to parent item
if($xo->content) {
if(! (stristr($r[0]['tag'],trim($xo->content)))) {
- q("UPDATE item SET tag = '%s' WHERE id = %d LIMIT 1",
+ q("UPDATE item SET tag = '%s' WHERE id = %d",
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'),
intval($r[0]['id'])
);
// Update content if 'updated' changes
if(count($r)) {
- if (edited_timestamp_is_newer($r[0], $datarray)) {
+ if (edited_timestamp_is_newer($r[0], $datarray)) {
// do not accept (ignore) an earlier edit than one we currently have.
if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited'])
continue;
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
$allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow');
if($allow && $allow[0]['data'] != $r[0]['last-child']) {
- $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
intval($allow[0]['data']),
dbesc(datetime_convert()),
dbesc($item_id),
if(is_array($contact)) {
if(($contact['network'] == NETWORK_OSTATUS && $contact['rel'] == CONTACT_IS_SHARING)
|| ($sharing && $contact['rel'] == CONTACT_IS_FOLLOWER)) {
- $r = q("UPDATE `contact` SET `rel` = %d, `writable` = 1 WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `rel` = %d, `writable` = 1 WHERE `id` = %d AND `uid` = %d",
intval(CONTACT_IS_FRIEND),
intval($contact['id']),
intval($importer['uid'])
function lose_follower($importer,$contact,$datarray,$item) {
if(($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_SHARING)) {
- q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d LIMIT 1",
+ q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d",
intval(CONTACT_IS_SHARING),
intval($contact['id'])
);
function lose_sharer($importer,$contact,$datarray,$item) {
if(($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_FOLLOWER)) {
- q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d LIMIT 1",
+ q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d",
intval(CONTACT_IS_FOLLOWER),
intval($contact['id'])
);
logger('subscribe_to_hub: ' . $hubmode . ' ' . $contact['name'] . ' to hub ' . $url . ' endpoint: ' . $push_url . ' with verifier ' . $verify_token);
if(! strlen($contact['hub-verify'])) {
- $r = q("UPDATE `contact` SET `hub-verify` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `hub-verify` = '%s' WHERE `id` = %d",
dbesc($verify_token),
intval($contact['id'])
);
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
// delete the item
- $r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($item['id'])
// If item is a link to an event, nuke the event record.
if(intval($item['event-id'])) {
- q("DELETE FROM `event` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ q("DELETE FROM `event` WHERE `id` = %d AND `uid` = %d",
intval($item['event-id']),
intval($item['uid'])
);
intval($item['uid'])
);
if(count($r)) {
- q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d",
intval($r[0]['id'])
);
}
$importer_uid = $contact['uid'];
-
+
$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` LEFT JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
intval($importer_uid)
);
logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['name']}, CONTACT: {$contact['name']}");
- $last_update = (($contact['last-update'] === '0000-00-00 00:00:00')
+ $last_update = (($contact['last-update'] === '0000-00-00 00:00:00')
? datetime_convert('UTC','UTC','now - 7 days', ATOM_TIME)
: datetime_convert('UTC','UTC',$contact['last-update'], ATOM_TIME)
);
if($contact['network'] === NETWORK_DFRN) {
-
+
$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
if(intval($contact['duplex']) && $contact['dfrn-id'])
$idtosend = '0:' . $orig_id;
// But this may be our first communication, so set the writable flag if it isn't set already.
if(! intval($contact['writable']))
- q("update contact set writable = 1 where id = %d limit 1", intval($contact['id']));
+ q("update contact set writable = 1 where id = %d", intval($contact['id']));
- $url = $contact['poll'] . '?dfrn_id=' . $idtosend
- . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
- . '&type=data&last_update=' . $last_update
+ $url = $contact['poll'] . '?dfrn_id=' . $idtosend
+ . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
+ . '&type=data&last_update=' . $last_update
. '&perm=' . $perm ;
$handshake_xml = fetch_url($url);
logger("poller: $url appears to be dead - marking for death ");
// dead connection - might be a transient event, or this might
- // mean the software was uninstalled or the domain expired.
+ // mean the software was uninstalled or the domain expired.
// Will keep trying for one month.
mark_for_death($contact);
// set the last-update so we don't keep polling
- $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($contact['id'])
);
mark_for_death($contact);
- $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($contact['id'])
);
$res = parse_xml_string($handshake_xml);
-
+
if(intval($res->status) == 1) {
logger("poller: $url replied status 1 - marking for death ");
// set the last-update so we don't keep polling
- $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($contact['id'])
);
return;
if(((float) $res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
- q("update contact set poco = '%s' where id = %d limit 1",
+ q("update contact set poco = '%s' where id = %d",
dbesc(str_replace('/profile/','/poco/', $contact['url'])),
intval($contact['id'])
);
$stat_writeable = 1;
if($stat_writeable != $contact['writable']) {
- q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
+ q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d",
intval($stat_writeable),
intval($contact['id'])
);
unset($password);
logger("Mail: Connect to " . $mailconf[0]['user']);
if($mbox) {
- q("UPDATE `mailacct` SET `last_check` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ q("UPDATE `mailacct` SET `last_check` = '%s' WHERE `id` = %d AND `uid` = %d",
dbesc(datetime_convert()),
intval($mailconf[0]['id']),
intval($importer_uid)
// Only delete when mails aren't automatically moved or deleted
if (($mailconf[0]['action'] != 1) AND ($mailconf[0]['action'] != 3))
if($meta->deleted && ! $r[0]['deleted']) {
- q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($r[0]['id'])
);
dbesc($datarray['parent-uri']),
intval($importer_uid)
);
- q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d",
intval($stored_item)
);
switch ($mailconf[0]['action']) {
logger('poller: received xml : ' . $xml, LOGGER_DATA);
if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
- $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($contact['id'])
);
$updated = datetime_convert();
- $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d",
dbesc($updated),
dbesc($updated),
intval($contact['id'])