Merge remote-tracking branch 'upstream/3.5.1rc' into 1702-detect-server
This commit is contained in:
commit
0989f725a6
|
@ -63,7 +63,7 @@ Version 3.5.1
|
|||
2850, 2858, 2865, 2892, 2894, 2895, 2907, 2908, 2914, 2015, 2926,
|
||||
2948, 2955, 2958, 2963, 2964, 2968, 2987, 2993, 3020, 3052, 3062,
|
||||
3066, 3091, 3108, 3113, 3116, 3117, 3118, 3126, 3130, 3135, 3155,
|
||||
3160, 3163, 3196
|
||||
3160, 3163, 3187, 3196
|
||||
|
||||
Version 3.5 (2016-09-13)
|
||||
Friendica Core:
|
||||
|
|
|
@ -240,6 +240,17 @@ function profile_content(App $a, $update = 0) {
|
|||
$sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
|
||||
}
|
||||
|
||||
// Belongs the profile page to a forum?
|
||||
// If not then we can improve the performance with an additional condition
|
||||
$r = q("SELECT `uid` FROM `user` WHERE `uid` = %d AND `page-flags` IN (%d, %d)",
|
||||
intval($a->profile['profile_uid']),
|
||||
intval(PAGE_COMMUNITY),
|
||||
intval(PAGE_PRVGROUP));
|
||||
|
||||
if (!dbm::is_result($r)) {
|
||||
$sql_extra3 = sprintf(" AND `thread`.`contact-id` = %d ", intval(intval($a->profile['contact_id'])));
|
||||
}
|
||||
|
||||
if(get_config('system', 'old_pager')) {
|
||||
$r = q("SELECT COUNT(*) AS `total`
|
||||
FROM `thread` INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
|
||||
|
@ -248,7 +259,7 @@ function profile_content(App $a, $update = 0) {
|
|||
WHERE `thread`.`uid` = %d AND `thread`.`visible` = 1 AND `thread`.`deleted` = 0
|
||||
and `thread`.`moderated` = 0
|
||||
AND `thread`.`wall` = 1
|
||||
$sql_extra $sql_extra2 ",
|
||||
$sql_extra3 $sql_extra $sql_extra2 ",
|
||||
intval($a->profile['profile_uid'])
|
||||
);
|
||||
|
||||
|
@ -276,7 +287,7 @@ function profile_content(App $a, $update = 0) {
|
|||
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
||||
|
||||
$r = q("SELECT `thread`.`iid` AS `item_id`, `thread`.`network` AS `item_network`
|
||||
FROM `thread` USE INDEX (`uid_wall_created`)
|
||||
FROM `thread`
|
||||
STRAIGHT_JOIN `item` ON `item`.`id` = `thread`.`iid`
|
||||
$sql_post_table
|
||||
STRAIGHT_JOIN `contact` ON `contact`.`id` = `thread`.`contact-id`
|
||||
|
@ -285,7 +296,7 @@ function profile_content(App $a, $update = 0) {
|
|||
AND NOT `thread`.`deleted`
|
||||
AND NOT `thread`.`moderated`
|
||||
AND `thread`.`wall`
|
||||
$sql_extra $sql_extra2
|
||||
$sql_extra3 $sql_extra $sql_extra2
|
||||
ORDER BY `thread`.`created` DESC $pager_sql",
|
||||
intval($a->profile['profile_uid'])
|
||||
);
|
||||
|
|
12016
view/lang/de/messages.po
12016
view/lang/de/messages.po
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue