Continued with #3254:
- added curly braces + spaces - converted multiple single-line comments to one multi-line comment Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
c4b82133e9
commit
a410f86e9c
19
update.php
19
update.php
|
@ -308,7 +308,7 @@ function update_1030() {
|
||||||
function update_1031() {
|
function update_1031() {
|
||||||
// Repair any bad links that slipped into the item table
|
// Repair any bad links that slipped into the item table
|
||||||
$r = q("SELECT `id`, `object` FROM `item` WHERE `object` != '' ");
|
$r = q("SELECT `id`, `object` FROM `item` WHERE `object` != '' ");
|
||||||
if($r && dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
if (strstr($rr['object'],'type="http')) {
|
if (strstr($rr['object'],'type="http')) {
|
||||||
q("UPDATE `item` SET `object` = '%s' WHERE `id` = %d",
|
q("UPDATE `item` SET `object` = '%s' WHERE `id` = %d",
|
||||||
|
@ -329,19 +329,20 @@ function update_1033() {
|
||||||
`k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
|
`k` CHAR( 255 ) NOT NULL PRIMARY KEY ,
|
||||||
`v` TEXT NOT NULL,
|
`v` TEXT NOT NULL,
|
||||||
`updated` DATETIME NOT NULL
|
`updated` DATETIME NOT NULL
|
||||||
) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
|
) DEFAULT CHARSET=utf8 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function update_1034() {
|
function update_1034() {
|
||||||
|
|
||||||
// If you have any of these parent-less posts they can cause problems, and
|
/*
|
||||||
// we need to delete them. You can't see them anyway.
|
* If you have any of these parent-less posts they can cause problems, and
|
||||||
// Legitimate items will usually get re-created on the next
|
* we need to delete them. You can't see them anyway.
|
||||||
// pull from the hub.
|
* Legitimate items will usually get re-created on the next
|
||||||
// But don't get rid of a post that may have just come in
|
* pull from the hub.
|
||||||
// and may not yet have the parent id set.
|
* But don't get rid of a post that may have just come in
|
||||||
|
* and may not yet have the parent id set.
|
||||||
|
*/
|
||||||
q("DELETE FROM `item` WHERE `parent` = 0 AND `created` < UTC_TIMESTAMP() - INTERVAL 2 MINUTE");
|
q("DELETE FROM `item` WHERE `parent` = 0 AND `created` < UTC_TIMESTAMP() - INTERVAL 2 MINUTE");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue