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