mirror of
https://github.com/friendica/friendica
synced 2025-04-23 12:30:10 +00:00
Improved indexes, avoiding SQL errors, improving speed
This commit is contained in:
parent
d2360d14ed
commit
92a8a399de
8 changed files with 43 additions and 75 deletions
|
@ -315,13 +315,13 @@ class Community extends BaseModule
|
|||
{
|
||||
if (self::$content == 'local') {
|
||||
if (!is_null(self::$accountType)) {
|
||||
$condition = ["`wall` AND `origin` AND `private` = ? AND `owner`.`contact-type` = ?", Item::PUBLIC, self::$accountType];
|
||||
$condition = ["`wall` AND `origin` AND `private` = ? AND `owner-contact-type` = ?", Item::PUBLIC, self::$accountType];
|
||||
} else {
|
||||
$condition = ["`wall` AND `origin` AND `private` = ?", Item::PUBLIC];
|
||||
}
|
||||
} elseif (self::$content == 'global') {
|
||||
if (!is_null(self::$accountType)) {
|
||||
$condition = ["`uid` = ? AND `private` = ? AND `owner`.`contact-type` = ?", 0, Item::PUBLIC, self::$accountType];
|
||||
$condition = ["`uid` = ? AND `private` = ? AND `owner-contact-type` = ?", 0, Item::PUBLIC, self::$accountType];
|
||||
} else {
|
||||
$condition = ["`uid` = ? AND `private` = ?", 0, Item::PUBLIC];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue