From: Roland Häder Date: Tue, 13 Dec 2016 08:59:43 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/develop' into develop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d489ba1510a2dcfaa7851d937d3c37a9541544c9;p=friendica.git Merge remote-tracking branch 'upstream/develop' into develop Also removed <<<<< as this interfers (a bit) with searching for merge conflicts with a more simplier editor. Signed-off-by: Roland Häder Conflicts: mod/ping.php view/lang/fr/messages.po view/lang/fr/strings.php --- d489ba1510a2dcfaa7851d937d3c37a9541544c9 diff --cc library/langdet/Text/LanguageDetect.php index d3caaff390,d3caaff390..45337ea8fc --- a/library/langdet/Text/LanguageDetect.php +++ b/library/langdet/Text/LanguageDetect.php @@@ -396,7 -396,7 +396,7 @@@ class Text_LanguageDetec * Returns the list of detectable languages * * @access public -- * @return array the names of the languages known to this object<<<<<<< ++ * @return array the names of the languages known to this object * @throws Text_LanguageDetect_Exception */ function getLanguages() diff --cc mod/ping.php index 3f6dc730b2,7e20b9383d..1bbddbe5c3 --- a/mod/ping.php +++ b/mod/ping.php @@@ -111,33 -174,27 +174,30 @@@ function ping_init(App $a intval(local_user()) ); - $intro = count($intros1) + count($intros2); - $intros = $intros1+$intros2; + $intro_count = count($intros1) + count($intros2); - $intros = $intros1+$intros2; ++ $intros = $intros1 + $intros2; $myurl = $a->get_baseurl() . '/profile/' . $a->user['nickname'] ; - $mails = q("SELECT * FROM `mail` + $mails = qu("SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail` WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ", intval(local_user()), dbesc($myurl) ); - $mail = count($mails); + $mail_count = count($mails); if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()){ - $regs = q("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created` FROM `contact` RIGHT JOIN `register` ON `register`.`uid`=`contact`.`uid` WHERE `contact`.`self`=1"); - $register = count($regs); - } else { - $register = 0; - } + $regs = qu("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) AS `total` + FROM `contact` RIGHT JOIN `register` ON `register`.`uid` = `contact`.`uid` + WHERE `contact`.`self` = 1"); - if ($regs) { + - $all_events = 0; - $all_events_today = 0; - $events = 0; - $events_today = 0; - $birthdays = 0; - $birthdays_today = 0; ++ $register_count = 0; + ++ if (dbm::is_result($regs)) { + $register_count = $regs[0]['total']; + } + } - $ev = q("SELECT count(`event`.`id`) as total, type, start, adjust FROM `event` + $ev = qu("SELECT count(`event`.`id`) AS total, type, start, adjust FROM `event` WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0 ORDER BY `start` ASC ", intval(local_user()),