mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 16:06:15 +00:00
Conversation header CSS fix & unicity fixes for unread messages & peerlist last messages
Note: for unread message count we need one more fix
This commit is contained in:
parent
745d7092ad
commit
010acd7adc
@ -54,7 +54,7 @@
|
||||
|
||||
#app-content-wrapper {
|
||||
padding: 15px;
|
||||
margin-top: 80px;
|
||||
margin-top: 100px;
|
||||
min-height: auto !important;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ class SmsMapper extends Mapper {
|
||||
$phoneList = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
$phoneNumber = preg_replace("#[ ]#", "", $row["sms_address"]);
|
||||
if (!in_array($phoneNumber, $phoneList)) {
|
||||
if (!array_key_exists($phoneNumber, $phoneList)) {
|
||||
$phoneList[$phoneNumber] = $row["mx"];
|
||||
}
|
||||
// Maybe duplicate due to spaces in database
|
||||
@ -235,10 +235,13 @@ class SmsMapper extends Mapper {
|
||||
$phoneList = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
$phoneNumber = preg_replace("#[ ]#", "", $row["sms_address"]);
|
||||
if (!in_array($phoneNumber, $phoneList)) {
|
||||
if ($this->getLastReadDateForPhoneNumber($userId, $phoneNumber) < $lastDate) {
|
||||
if ($this->getLastReadDateForPhoneNumber($userId, $row["sms_address"]) < $lastDate) {
|
||||
if (!array_key_exists($phoneNumber, $phoneList)) {
|
||||
$phoneList[$phoneNumber] = $row["ct"];
|
||||
}
|
||||
else {
|
||||
$phoneList[$phoneNumber] += $row["ct"];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $phoneList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user