mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix very outdated code in RSS parser part of content widget
This commit is contained in:
parent
b837e3e69e
commit
fa64d5a087
1 changed files with 5 additions and 3 deletions
|
|
@ -506,6 +506,7 @@ class content extends WidgetHandler
|
|||
$xml_doc = $oXmlParser->parse($buff);
|
||||
if($xml_doc->rss)
|
||||
{
|
||||
$rss = new stdClass;
|
||||
$rss->title = $xml_doc->rss->channel->title->body;
|
||||
$rss->link = $xml_doc->rss->channel->link->body;
|
||||
|
||||
|
|
@ -519,7 +520,7 @@ class content extends WidgetHandler
|
|||
foreach ($items as $key => $value)
|
||||
{
|
||||
if($key >= $args->list_count * $args->page_count) break;
|
||||
unset($item);
|
||||
$item = new stdClass;
|
||||
|
||||
foreach($value as $key2 => $value2)
|
||||
{
|
||||
|
|
@ -545,6 +546,7 @@ class content extends WidgetHandler
|
|||
else if($xml_doc->{'rdf:rdf'})
|
||||
{
|
||||
// rss1.0 supported (XE's XML is case-insensitive because XML parser converts all to small letters. Fixed by misol
|
||||
$rss = new stdClass;
|
||||
$rss->title = $xml_doc->{'rdf:rdf'}->channel->title->body;
|
||||
$rss->link = $xml_doc->{'rdf:rdf'}->channel->link->body;
|
||||
|
||||
|
|
@ -558,7 +560,7 @@ class content extends WidgetHandler
|
|||
foreach ($items as $key => $value)
|
||||
{
|
||||
if($key >= $args->list_count * $args->page_count) break;
|
||||
unset($item);
|
||||
$item = new stdClass;
|
||||
|
||||
foreach($value as $key2 => $value2)
|
||||
{
|
||||
|
|
@ -609,7 +611,7 @@ class content extends WidgetHandler
|
|||
foreach ($items as $key => $value)
|
||||
{
|
||||
if($key >= $args->list_count * $args->page_count) break;
|
||||
unset($item);
|
||||
$item = new stdClass;
|
||||
|
||||
foreach($value as $key2 => $value2)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue