Solving some more SQL warnings ("limit" must never be used in update statements)
This commit is contained in:
parent
1d19e056e7
commit
b0dd16696a
|
@ -98,7 +98,7 @@ function dfrn_request_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_array($contact_record)) {
|
if(is_array($contact_record)) {
|
||||||
$r = q("UPDATE `contact` SET `ret-aes` = %d, hidden = %d WHERE `id` = %d LIMIT 1",
|
$r = q("UPDATE `contact` SET `ret-aes` = %d, hidden = %d WHERE `id` = %d",
|
||||||
intval($aes_allow),
|
intval($aes_allow),
|
||||||
intval($hidden),
|
intval($hidden),
|
||||||
intval($contact_record['id'])
|
intval($contact_record['id'])
|
||||||
|
@ -406,7 +406,7 @@ function dfrn_request_post(&$a) {
|
||||||
`uri-date` = '%s',
|
`uri-date` = '%s',
|
||||||
`avatar-date` = '%s',
|
`avatar-date` = '%s',
|
||||||
`hidden` = 0,
|
`hidden` = 0,
|
||||||
WHERE `id` = %d LIMIT 1
|
WHERE `id` = %d
|
||||||
",
|
",
|
||||||
dbesc($photos[0]),
|
dbesc($photos[0]),
|
||||||
dbesc($photos[1]),
|
dbesc($photos[1]),
|
||||||
|
@ -486,7 +486,7 @@ function dfrn_request_post(&$a) {
|
||||||
if(is_array($contact_record)) {
|
if(is_array($contact_record)) {
|
||||||
// There is a contact record but no issued-id, so this
|
// There is a contact record but no issued-id, so this
|
||||||
// is a reciprocal introduction from a known contact
|
// is a reciprocal introduction from a known contact
|
||||||
$r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d LIMIT 1",
|
$r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d",
|
||||||
dbesc($issued_id),
|
dbesc($issued_id),
|
||||||
intval($contact_record['id'])
|
intval($contact_record['id'])
|
||||||
);
|
);
|
||||||
|
@ -741,7 +741,7 @@ function dfrn_request_content(&$a) {
|
||||||
// If we are auto_confirming, this record will have already been nuked
|
// If we are auto_confirming, this record will have already been nuked
|
||||||
// in dfrn_confirm_post()
|
// in dfrn_confirm_post()
|
||||||
|
|
||||||
$r = q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s' LIMIT 1",
|
$r = q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s'",
|
||||||
dbesc($_GET['confirm_key'])
|
dbesc($_GET['confirm_key'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ function notifications_post(&$a) {
|
||||||
goaway($a->get_baseurl(true) . '/notifications/intros');
|
goaway($a->get_baseurl(true) . '/notifications/intros');
|
||||||
}
|
}
|
||||||
if($_POST['submit'] == t('Ignore')) {
|
if($_POST['submit'] == t('Ignore')) {
|
||||||
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d LIMIT 1",
|
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
|
||||||
intval($intro_id));
|
intval($intro_id));
|
||||||
goaway($a->get_baseurl(true) . '/notifications/intros');
|
goaway($a->get_baseurl(true) . '/notifications/intros');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user