mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update functions_atom.php
This commit is contained in:
parent
01dd6009c9
commit
a92248ad10
@ -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 .= "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
|
||||
$atom = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
|
||||
$atom .= "<feed xmlns=\"http://www.w3.org/2005/Atom\" xml:base=\"" . FULL_URL . "\">\n";
|
||||
$atom .= "<title>$title</title>\n";
|
||||
$atom .= "<updated>". $date ."T$time+00:00</updated>\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 .= "<entry>\n";
|
||||
$atom .= " <title type=\"html\"><![CDATA[$updated$topic_title$tor_size]]></title>\n";
|
||||
$atom .= " <title type=\"html\"><![CDATA[$updated$topic_title$tor_status$tor_size]]></title>\n";
|
||||
$atom .= " <author>\n";
|
||||
$atom .= " <name>$author_name</name>\n";
|
||||
$atom .= " </author>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user