forked from friendica/friendica-addons
syntax errors
This commit is contained in:
parent
34959e6b7a
commit
3bb542fd34
|
@ -206,8 +206,8 @@ function phototrack_search_table($a, $table) {
|
|||
}
|
||||
}
|
||||
$r = DBA::p("SELECT COUNT(*) FROM `$table` LEFT OUTER JOIN phototrack_row_check ON ( phototrack_row_check.`table` = '$table' AND phototrack_row_check.`row-id` = `$table`.id ) WHERE ( ( phototrack_row_check.checked IS NULL ) OR ( phototrack_row_check.checked < DATE_SUB(NOW(), INTERVAL 1 MONTH) ) )");
|
||||
$remaining = DBA::fetch($r)['count(*)'];
|
||||
Logger::info('phototrack: searched ' . count($rows) . ' rows in table ' . $table . ', ' . $remaining . ' still remaining to search');
|
||||
$remaining = DBA::fetch($r)['count'];
|
||||
Logger::info('phototrack: searched ' . DBA::numRows($rows) . ' rows in table ' . $table . ', ' . $remaining . ' still remaining to search');
|
||||
return $remaining;
|
||||
}
|
||||
|
||||
|
@ -262,12 +262,12 @@ function phototrack_tidy() {
|
|||
Logger::debug('phototrack: remove photo ' . $row['resource-id']);
|
||||
DBA::e('DELETE FROM photo WHERE `resource-id` = "' . $row['resource-id'] . '"');
|
||||
}
|
||||
Logger::info('phototrack_tidy: deleted ' . count($rows) . ' photos');
|
||||
Logger::info('phototrack_tidy: deleted ' . DBA::numRows($rows) . ' photos');
|
||||
}
|
||||
DBA::e('DROP TABLE `phototrack-temp`');
|
||||
$rows = DBA::p('SELECT id FROM phototrack_photo_use WHERE checked < DATE_SUB(NOW(), INTERVAL 14 DAY)');
|
||||
foreach ($rows as $row) {
|
||||
DBA::e( 'DELETE FROM phototrack_photo_use WHERE id = ' . $row['id']);
|
||||
}
|
||||
Logger::info('phototrack_tidy: deleted ' . count($rows) . ' phototrack_photo_use rows');
|
||||
Logger::info('phototrack_tidy: deleted ' . DBA::numRows($rows) . ' phototrack_photo_use rows');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue