@@ 1499-1509 (lines=11) @@ | ||
1496 | ||
1497 | $base = 'messages-' . $date . '.log.html'; |
|
1498 | ||
1499 | if ($this->groupId && !$friendId) { |
|
1500 | $base = 'messages-' . $date . '_gid-' . $this->groupId . '.log.html'; |
|
1501 | } elseif ($this->sessionId && !$friendId) { |
|
1502 | $base = 'messages-' . $date . '_sid-' . $this->sessionId . '.log.html'; |
|
1503 | } elseif ($friendId) { |
|
1504 | if ($this->userId < $friendId) { |
|
1505 | $base = 'messages-' . $date . '_uid-' . $this->userId . '-' . $friendId . '.log.html'; |
|
1506 | } else { |
|
1507 | $base = 'messages-' . $date . '_uid-' . $friendId . '-' . $this->userId . '.log.html'; |
|
1508 | } |
|
1509 | } |
|
1510 | ||
1511 | if (!$absolute) { |
|
1512 | return $base; |
|
@@ 1576-1586 (lines=11) @@ | ||
1573 | ||
1574 | $filename_chat = 'messages-' . $date_now . '.log.html'; |
|
1575 | ||
1576 | if ($this->groupId && !$friendId) { |
|
1577 | $filename_chat = 'messages-' . $date_now . '_gid-' . $this->groupId . '.log.html'; |
|
1578 | } else if ($this->sessionId && !$friendId) { |
|
1579 | $filename_chat = 'messages-' . $date_now . '_sid-' . $this->sessionId . '.log.html'; |
|
1580 | } elseif ($friendId) { |
|
1581 | if ($this->userId < $friendId) { |
|
1582 | $filename_chat = 'messages-' . $date_now . '_uid-' . $this->userId . '-' . $friendId . '.log.html'; |
|
1583 | } else { |
|
1584 | $filename_chat = 'messages-' . $date_now . '_uid-' . $friendId . '-' . $this->userId . '.log.html'; |
|
1585 | } |
|
1586 | } |
|
1587 | ||
1588 | if (!file_exists($chat_path . $filename_chat)) { |
|
1589 | @fclose(fopen($chat_path . $filename_chat, 'w')); |