Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -1,133 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 8021 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class rss_output_forums
|
||||
{
|
||||
/**
|
||||
* Expiration date
|
||||
*
|
||||
* @var integer Expiration timestamp
|
||||
*/
|
||||
protected $expires = 0;
|
||||
|
||||
/**
|
||||
* Grab the RSS links
|
||||
*
|
||||
* @return array RSS links
|
||||
*/
|
||||
public function getRssLinks()
|
||||
{
|
||||
$return = array();
|
||||
|
||||
ipsRegistry::DB()->build( array( 'select' => 'rss_export_title, rss_export_id', 'from' => 'rss_export', 'where' => 'rss_export_enabled=1' ) );
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while( $r = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
$return[] = array( 'title' => $r['rss_export_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=forums&id=" . $r['rss_export_id'], '%%' . $r['rss_export_title'] . '%%', 'section=rss2' ) );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document content and return it
|
||||
*
|
||||
* @return string RSS document
|
||||
*/
|
||||
public function returnRSSDocument()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_export_id = intval( ipsRegistry::$request['id'] );
|
||||
$rss_data = array();
|
||||
$to_print = '';
|
||||
$this->expires = time();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get RSS export
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'rss_export',
|
||||
'where' => 'rss_export_id=' . $rss_export_id ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Got one?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rss_data['rss_export_id'] AND $rss_data['rss_export_enabled'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Correct expires time
|
||||
//-----------------------------------------
|
||||
|
||||
$this->expires += $rss_data['rss_export_cache_time'] * 60;
|
||||
|
||||
//-----------------------------------------
|
||||
// Need to recache?
|
||||
//-----------------------------------------
|
||||
|
||||
$time_check = time() - ( $rss_data['rss_export_cache_time'] * 60 );
|
||||
|
||||
if ( ( ! $rss_data['rss_export_cache_content'] ) OR $time_check > $rss_data['rss_export_cache_last'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Yes
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IN_ACP', 1 );
|
||||
|
||||
ipsRegistry::getAppClass( 'forums' );
|
||||
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/export.php', 'admin_forums_rss_export' );
|
||||
$rss_export = new $classToLoad();
|
||||
$rss_export->makeRegistryShortcuts( ipsRegistry::instance() );
|
||||
|
||||
return $rss_export->rssExportRebuildCache( $rss_data['rss_export_id'], 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// No
|
||||
//-----------------------------------------
|
||||
|
||||
return $rss_data['rss_export_cache_content'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document expiration timestamp
|
||||
*
|
||||
* @return integer Expiration timestamp
|
||||
*/
|
||||
public function grabExpiryDate()
|
||||
{
|
||||
return $this->expires ? $this->expires : time();
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class rss_output_forums
|
||||
{
|
||||
/**
|
||||
* Expiration date
|
||||
*
|
||||
* @var integer Expiration timestamp
|
||||
*/
|
||||
protected $expires = 0;
|
||||
|
||||
/**
|
||||
* Grab the RSS links
|
||||
*
|
||||
* @return array RSS links
|
||||
*/
|
||||
public function getRssLinks()
|
||||
{
|
||||
$return = array();
|
||||
|
||||
ipsRegistry::DB()->build( array( 'select' => 'rss_export_title, rss_export_id', 'from' => 'rss_export', 'where' => 'rss_export_enabled=1' ) );
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while( $r = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
$return[] = array( 'title' => $r['rss_export_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=forums&id=" . $r['rss_export_id'], '%%' . $r['rss_export_title'] . '%%', 'section=rss2' ) );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document content and return it
|
||||
*
|
||||
* @return string RSS document
|
||||
*/
|
||||
public function returnRSSDocument()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_export_id = intval( ipsRegistry::$request['id'] );
|
||||
$rss_data = array();
|
||||
$to_print = '';
|
||||
$this->expires = time();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get RSS export
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'rss_export',
|
||||
'where' => 'rss_export_id=' . $rss_export_id ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Got one?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rss_data['rss_export_id'] AND $rss_data['rss_export_enabled'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Correct expires time
|
||||
//-----------------------------------------
|
||||
|
||||
$this->expires += $rss_data['rss_export_cache_time'] * 60;
|
||||
|
||||
//-----------------------------------------
|
||||
// Need to recache?
|
||||
//-----------------------------------------
|
||||
|
||||
$time_check = time() - ( $rss_data['rss_export_cache_time'] * 60 );
|
||||
|
||||
if ( ( ! $rss_data['rss_export_cache_content'] ) OR $time_check > $rss_data['rss_export_cache_last'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Yes
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IN_ACP', 1 );
|
||||
|
||||
ipsRegistry::getAppClass( 'forums' );
|
||||
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/export.php', 'admin_forums_rss_export' );
|
||||
$rss_export = new $classToLoad();
|
||||
$rss_export->makeRegistryShortcuts( ipsRegistry::instance() );
|
||||
|
||||
return $rss_export->rssExportRebuildCache( $rss_data['rss_export_id'], 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// No
|
||||
//-----------------------------------------
|
||||
|
||||
return $rss_data['rss_export_cache_content'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document expiration timestamp
|
||||
*
|
||||
* @return integer Expiration timestamp
|
||||
*/
|
||||
public function grabExpiryDate()
|
||||
{
|
||||
return $this->expires ? $this->expires : time();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user