Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* RSS Import
|
||||
* Owner: Matt Mecham
|
||||
* Last Updated: $Date: 2009-02-04 20:03:59 +0000 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 24th November 2009
|
||||
* @version $Revision: 3887 $
|
||||
* @version $Revision: 6925 $
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -215,6 +217,10 @@ class rss_import
|
||||
$this->_rssClass->rss_max_show = 100;
|
||||
}
|
||||
|
||||
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
|
||||
|
||||
$this->_settings['LinkBack'] = "<a href=\"{url}\">" . $this->registry->getClass('class_localization')->words['_rssimportsource'] . "</a>";
|
||||
|
||||
/* Reset class */
|
||||
$this->_reset();
|
||||
}
|
||||
@@ -341,7 +347,7 @@ class rss_import
|
||||
/* Error check */
|
||||
if ( ! $item_data['title'] OR ! $item_data['content'] )
|
||||
{
|
||||
$this->errors[] = "No title or content";
|
||||
$this->errors[] = $this->registry->getClass('class_localization')->words['_rssimportnotoc'];
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -377,7 +383,7 @@ class rss_import
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
$this->DB->build( array( 'select' => 'rss_guid',
|
||||
'from' => 'core_rss_imported',
|
||||
'where' => "rss_foreign_key='" . $this->_key . "' AND rss_guid IN ('".implode( "','", $check_guids )."')" ) );
|
||||
$i = $this->DB->execute();
|
||||
@@ -533,13 +539,24 @@ class rss_import
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics';
|
||||
|
||||
/* Force the RTE */
|
||||
$this->memberData['_canUseRTE'] = true;
|
||||
$this->registry->member()->setProperty('_canUseRTE', TRUE );
|
||||
$_POST['ed-0_wysiwyg_used'] = 1;
|
||||
IPSText::getTextClass( 'editor' )->method = 'rte';
|
||||
|
||||
/* Clean up.. */
|
||||
$content = preg_replace( "#<br />(\r)?\n#is", "<br />", $content );
|
||||
|
||||
if ( ! $this->_settings['ParseHtml'] )
|
||||
{
|
||||
$_raw = stripslashes($content);
|
||||
|
||||
$content = IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( $_raw ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = stripslashes($content);
|
||||
}
|
||||
|
||||
/* Add in Show link... */
|
||||
if ( $this->_settings['LinkBack'] AND $link )
|
||||
{
|
||||
@@ -558,18 +575,10 @@ class rss_import
|
||||
|
||||
$content .= $the_link;
|
||||
}
|
||||
|
||||
if ( ! $this->_settings['ParseHtml'] )
|
||||
{
|
||||
$_raw = stripslashes($content);
|
||||
|
||||
$content = IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( $_raw ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = stripslashes($content);
|
||||
}
|
||||
|
||||
/* few final things */
|
||||
$content = str_replace( '&raquo;', $this->lang->words['_raquo'], $content );
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
@@ -598,8 +607,8 @@ class rss_import
|
||||
/* Validate Data - HTTP Status Code/Text */
|
||||
if ( $this->_rssClass->classFileManagement->http_status_code != "200" )
|
||||
{
|
||||
$this->errors[0] = "Code: " . $this->_rssClass->classFileManagement->http_status_code;
|
||||
print_r( $this->errors );
|
||||
$this->errors[0] = $this->registry->getClass('class_localization')->words['_rssimportcode'] . $this->_rssClass->classFileManagement->http_status_code;
|
||||
//print_r( $this->errors );
|
||||
throw new Exception( 'HTTP_STATUS_CODE' );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user