1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 05:05:56 +00:00

remove a lot of stuff from global context (functions.php), add a few helper classes instead

This commit is contained in:
Andrew Dolgov
2020-09-22 09:04:33 +03:00
parent d04ac399ff
commit 74568df4ff
39 changed files with 1379 additions and 1473 deletions

View File

@@ -14,6 +14,19 @@
require_once "db.php";
require_once "db-prefs.php";
function make_stampfile($filename) {
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
if (flock($fp, LOCK_EX | LOCK_NB)) {
fwrite($fp, time() . "\n");
flock($fp, LOCK_UN);
fclose($fp);
return true;
} else {
return false;
}
}
function cleanup_tags($days = 14, $limit = 1000) {
$days = (int) $days;