mirror of
https://github.com/friendica/friendica
synced 2025-04-24 08:30:11 +00:00
The thread table is replaced by post-thread and post-thread-user
This commit is contained in:
parent
e561cad844
commit
5e846dd7c2
13 changed files with 358 additions and 153 deletions
|
@ -1118,8 +1118,8 @@ function api_statuses_update($type)
|
|||
if ($throttle_day > 0) {
|
||||
$datefrom = date(DateTimeFormat::MYSQL, time() - 24*60*60);
|
||||
|
||||
$condition = ["`uid` = ? AND `wall` AND `received` > ?", api_user(), $datefrom];
|
||||
$posts_day = DBA::count('thread', $condition);
|
||||
$condition = ["`gravity` = ? AND `uid` = ? AND `wall` AND `received` > ?", GRAVITY_PARENT, api_user(), $datefrom];
|
||||
$posts_day = Post::count($condition);
|
||||
|
||||
if ($posts_day > $throttle_day) {
|
||||
Logger::log('Daily posting limit reached for user '.api_user(), Logger::DEBUG);
|
||||
|
@ -1132,8 +1132,8 @@ function api_statuses_update($type)
|
|||
if ($throttle_week > 0) {
|
||||
$datefrom = date(DateTimeFormat::MYSQL, time() - 24*60*60*7);
|
||||
|
||||
$condition = ["`uid` = ? AND `wall` AND `received` > ?", api_user(), $datefrom];
|
||||
$posts_week = DBA::count('thread', $condition);
|
||||
$condition = ["`gravity` = ? AND `uid` = ? AND `wall` AND `received` > ?", GRAVITY_PARENT, api_user(), $datefrom];
|
||||
$posts_week = Post::count($condition);
|
||||
|
||||
if ($posts_week > $throttle_week) {
|
||||
Logger::log('Weekly posting limit reached for user '.api_user(), Logger::DEBUG);
|
||||
|
@ -1146,8 +1146,8 @@ function api_statuses_update($type)
|
|||
if ($throttle_month > 0) {
|
||||
$datefrom = date(DateTimeFormat::MYSQL, time() - 24*60*60*30);
|
||||
|
||||
$condition = ["`uid` = ? AND `wall` AND `received` > ?", api_user(), $datefrom];
|
||||
$posts_month = DBA::count('thread', $condition);
|
||||
$condition = ["`gravity` = ? AND `uid` = ? AND `wall` AND `received` > ?", GRAVITY_PARENT, api_user(), $datefrom];
|
||||
$posts_month = Post::count($condition);
|
||||
|
||||
if ($posts_month > $throttle_month) {
|
||||
Logger::log('Monthly posting limit reached for user '.api_user(), Logger::DEBUG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue