From a92248ad1055dcb13a4fcf8e0f2b183fcb9304e8 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 16 Dec 2023 16:22:56 +0700 Subject: [PATCH] Update functions_atom.php --- library/includes/functions_atom.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/library/includes/functions_atom.php b/library/includes/functions_atom.php index ecdb9a4f..9ffc437e 100644 --- a/library/includes/functions_atom.php +++ b/library/includes/functions_atom.php @@ -122,6 +122,8 @@ function update_user_feed ($user_id, $username) function create_atom ($file_path, $mode, $id, $title, $topics) { global $lang; + $date = null; + $time = null; $dir = dirname($file_path); if (!file_exists($dir)) { @@ -135,8 +137,7 @@ function create_atom ($file_path, $mode, $id, $title, $topics) $time = bb_date($last_time, 'H:i:s', 0); break; } - $atom = ""; - $atom .= "\n"; + $atom = "\n"; $atom .= "\n"; $atom .= "$title\n"; $atom .= "". $date ."T$time+00:00\n"; @@ -150,6 +151,11 @@ function create_atom ($file_path, $mode, $id, $title, $topics) { $tor_size = str_replace(' ', ' ', ' ['. humn_size($topic['tor_size']) .']'); } + $tor_status = ''; + if (isset($topic['tor_status'])) + { + $tor_status = " ({$lang['TOR_STATUS_NAME'][$topic['tor_status']]})"; + } $topic_title = $topic['topic_title']; $orig_word = array(); $replacement_word = array(); @@ -168,7 +174,7 @@ function create_atom ($file_path, $mode, $id, $title, $topics) $checktime = TIMENOW - 604800; // неделя (week) if ($topic['topic_first_post_edit_time'] && $topic['topic_first_post_edit_time'] > $checktime) $updated = '[' . $lang['ATOM_UPDATED'] . '] '; $atom .= "\n"; - $atom .= " <![CDATA[$updated$topic_title$tor_size]]>\n"; + $atom .= " <![CDATA[$updated$topic_title$tor_status$tor_size]]>\n"; $atom .= " \n"; $atom .= " $author_name\n"; $atom .= " \n";