mirror of
https://github.com/friendica/friendica
synced 2025-04-29 02:24:22 +02:00
Issue 9799: Ensure that the first post date is after the registration date
This commit is contained in:
parent
ab9090ede1
commit
6a4540e6f6
3 changed files with 34 additions and 3 deletions
|
@ -181,6 +181,31 @@ class Post
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single record from the post-thread table and returns it in an associative array
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $condition
|
||||
* @param array $params
|
||||
* @return bool|array
|
||||
* @throws \Exception
|
||||
* @see DBA::select
|
||||
*/
|
||||
public static function selectFirstThread(array $fields = [], array $condition = [], $params = [])
|
||||
{
|
||||
$params['limit'] = 1;
|
||||
|
||||
$result = self::selectThread($fields, $condition, $params);
|
||||
|
||||
if (is_bool($result)) {
|
||||
return $result;
|
||||
} else {
|
||||
$row = self::fetch($result);
|
||||
DBA::close($result);
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Select rows from the post table and returns them as an array
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue