Version 3.4.9

This commit is contained in:
Neo committed 2025-12-19 00:44:43 -08:00
1 parent c603205a25
commit f9e857d255
920 files changed
+28189 -6840

No files matched your search

@@ -0,0 +1,13 @@
<?php
/**
* @file defaultSection.php Define the default section for the 'feed' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* $Revision: 8655 $
*/
$DEFAULT_SECTION = 'output';
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -0,0 +1,126 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Calendar iCalendar/webcal output
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 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 Calendar
* @link http://www.invisionpower.com
* @version $Rev: 10721 $
*/
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 public_calendar_feed_output extends ipsCommand
{
/**
* Calendar data
*
* @var array
*/
protected $calendar = array();
/**
* Calendar functions
*
* @var object
*/
protected $functions;
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/functions.php", 'app_calendar_classes_functions', 'calendar' );
$this->functions = new $classToLoad( $this->registry );
$this->calendar = $this->functions->getCalendar();
//-----------------------------------------
// Switch
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'download':
$this->downloadIcalFeed();
break;
}
}
/**
* Serve the iCalendar feed (valid for both download as .ics and webcal:// protocol)
*
* @return @e void
*/
public function downloadIcalFeed()
{
//-----------------------------------------
// Get main view class
//-----------------------------------------
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/view.php', 'public_calendar_calendar_view' );
$calendar = new $classToLoad( $this->registry );
$calendar->makeRegistryShortcuts( $this->registry );
$calendar->initCalendar();
//-----------------------------------------
// Load (all) events
//-----------------------------------------
$calendar->calendarGetEventsSQL( gmstrftime( '%m' ), gmstrftime( '%Y' ), array( 'timenow' => '1', 'timethen' => '2000000000', 'cal_id' => $this->calendar['cal_id'], 'honor_permissions' => true, 'no_date_convert' => true ) );
$events = $calendar->calendarGetAllEvents();
//-----------------------------------------
// Load iCalendar class
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . "/sources/icalendar.php", 'app_calendar_classes_icalendarOutput', 'calendar' );
$iCalendar = new $classToLoad( $this->registry, $this->calendar['cal_id'] );
//-----------------------------------------
// Send data to iCalendar class and get output
//-----------------------------------------
foreach( $events as $event )
{
$event = $calendar->calendarMakeEventHTML( $event, true );
$iCalendar->addEvent( $event );
}
$feed = $iCalendar->buildICalendarFeed();
//-----------------------------------------
// Output
//-----------------------------------------
@header( "Content-type: text/calendar; charset=" . IPS_DOC_CHAR_SET );
@header( "Content-Disposition: inline; filename=calendarEvents.ics" );
print $feed;
exit;
}
}