mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 3645, php5 대응, 함수 대체
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13202 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5fa0bf23d7
commit
5693e340fe
28 changed files with 95 additions and 125 deletions
|
|
@ -465,7 +465,7 @@ class content extends WidgetHandler
|
|||
$buff = $this->requestFeedContents($args->rss_url);
|
||||
|
||||
$encoding = preg_match("/<\?xml.*encoding=\"(.+)\".*\?>/i", $buff, $matches);
|
||||
if($encoding && !preg_match("/UTF-8/i", $matches[1])) $buff = Context::convertEncodingStr($buff);
|
||||
if($encoding && stripos($matches[1], "UTF-8") === FALSE) $buff = Context::convertEncodingStr($buff);
|
||||
|
||||
$buff = preg_replace("/<\?xml.*\?>/i", "", $buff);
|
||||
|
||||
|
|
@ -602,7 +602,7 @@ class content extends WidgetHandler
|
|||
$content_item->setContentsLink($rss->link);
|
||||
if($item->title)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->title->attrs->type)) $item->title = $value->title->body;
|
||||
if(stripos($value->title->attrs->type, "html") === FALSE) $item->title = $value->title->body;
|
||||
}
|
||||
$content_item->setTitle($item->title);
|
||||
$content_item->setNickName(max($item->author,$item->{'dc:creator'}));
|
||||
|
|
@ -611,14 +611,14 @@ class content extends WidgetHandler
|
|||
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->content);
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->content->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->content->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
if(!$item->description)
|
||||
{
|
||||
$item->description = $item->summary;
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->summary->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->summary->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
}
|
||||
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class login_info extends WidgetHandler
|
|||
$useSsl = Context::getSslStatus();
|
||||
if($useSsl != 'none')
|
||||
{
|
||||
if(preg_match('/^https:\/\//i', Context::getRequestUri())) $ssl_mode = true;
|
||||
if(strncasecmp('https://', Context::getRequestUri(), 8) === 0) $ssl_mode = true;
|
||||
}
|
||||
Context::set('ssl_mode',$ssl_mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ class mcontent extends WidgetHandler
|
|||
$buff = $this->requestFeedContents($args->rss_url);
|
||||
|
||||
$encoding = preg_match("/<\?xml.*encoding=\"(.+)\".*\?>/i", $buff, $matches);
|
||||
if($encoding && !preg_match("/UTF-8/i", $matches[1])) $buff = Context::convertEncodingStr($buff);
|
||||
if($encoding && stripos($matches[1], "UTF-8") === FALSE) $buff = Context::convertEncodingStr($buff);
|
||||
|
||||
$buff = preg_replace("/<\?xml.*\?>/i", "", $buff);
|
||||
|
||||
|
|
@ -548,7 +548,7 @@ class mcontent extends WidgetHandler
|
|||
$content_item->setContentsLink($rss->link);
|
||||
if($item->title)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->title->attrs->type)) $item->title = $value->title->body;
|
||||
if(stripos($value->title->attrs->type, "html") === FALSE) $item->title = $value->title->body;
|
||||
}
|
||||
$content_item->setTitle($item->title);
|
||||
$content_item->setNickName(max($item->author,$item->{'dc:creator'}));
|
||||
|
|
@ -557,14 +557,14 @@ class mcontent extends WidgetHandler
|
|||
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->content);
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->content->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->summary->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
if(!$item->description)
|
||||
{
|
||||
$item->description = $item->summary;
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->summary->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->summary->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
}
|
||||
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue