Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+48 -8
View File
@@ -3,7 +3,7 @@
* @brief Calendar Application Class
* @author <a href=''>Invision Power Services, Inc.</a>
* @copyright (c) 2013 Invision Power Services, Inc.
* @package IPS Social Suite
* @package IPS Community Suite
* @subpackage Calendar
* @since 18 Dec 2013
* @version
@@ -30,7 +30,7 @@ class _Application extends \IPS\Application
if( \IPS\Request::i()->member )
{
$member = \IPS\Member::load( \IPS\Request::i()->member );
if( \IPS\Request::i()->key != md5( ( $member->members_pass_hash ?: $member->email ) . $member->members_pass_salt ) )
if( !\IPS\Login::compareHashes( md5( ( $member->members_pass_hash ?: $member->email ) . $member->members_pass_salt ), (string) \IPS\Request::i()->key ) )
{
\IPS\Output::i()->error( 'node_error', '2L217/1', 404, '' );
}
@@ -77,11 +77,18 @@ class _Application extends \IPS\Application
/* Are we viewing a specific calendar only? */
if( \IPS\Request::i()->id )
{
$calendar = \IPS\calendar\Calendar::load( \IPS\Request::i()->id );
if ( !$calendar->can( 'view' ) )
try
{
throw new \OutOfRangeException;
$calendar = \IPS\calendar\Calendar::load( \IPS\Request::i()->id );
if ( !$calendar->can( 'view', $member ) )
{
throw new \OutOfRangeException;
}
}
catch( \OutOfRangeException $e )
{
\IPS\Output::i()->error( 'node_error', '2L217/3', 404, '' );
}
}
@@ -92,7 +99,7 @@ class _Application extends \IPS\Application
$where[] = array( 'event_calendar_id=?', $calendar->id );
}
foreach( \IPS\calendar\Event::getItemsWithPermission( $where, 'event_lastupdated DESC', 500, 'read', NULL, 0, $member ) as $event )
foreach( \IPS\calendar\Event::getItemsWithPermission( $where, 'event_lastupdated DESC', 500, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, $member ) as $event )
{
$feed->addEvent( $event );
}
@@ -136,7 +143,7 @@ class _Application extends \IPS\Application
$endDate = $_today->adjust( "+" . \IPS\Settings::i()->calendar_rss_feed_days . " days" );
}
foreach ( \IPS\calendar\Event::retrieveEvents( $_today, $endDate, NULL, NULL, FALSE ) as $event )
foreach ( \IPS\calendar\Event::retrieveEvents( $_today, $endDate, NULL, NULL, FALSE, $member ) as $event )
{
$document->addItem( $event->title, $event->url(), $event->content, $event->nextOccurrence( $_today, 'startDate' ), $event->id );
}
@@ -144,4 +151,37 @@ class _Application extends \IPS\Application
/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */
\IPS\Output::i()->sendOutput( $document->asXML(), 200, 'text/xml' );
}
/**
* Default front navigation
*
* @code
// Each item...
array(
'key' => 'Example', // The extension key
'app' => 'core', // [Optional] The extension application. If ommitted, uses this application
'config' => array(...), // [Optional] The configuration for the menu item
'title' => 'SomeLangKey', // [Optional] If provided, the value of this language key will be copied to menu_item_X
'children' => array(...), // [Optional] Array of child menu items for this item. Each has the same format.
)
return array(
'rootTabs' => array(), // These go in the top row
'browseTabs' => array(), // These go under the Browse tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
'browseTabsEnd' => array(), // These go under the Browse tab after all other items on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
'activityTabs' => array(), // These go under the Activity tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Activity tab may not exist)
)
* @endcode
* @return array
*/
public function defaultFrontNavigation()
{
return array(
'rootTabs' => array(),
'browseTabs' => array( array( 'key' => 'Calendar' ) ),
'browseTabsEnd' => array(),
'activityTabs' => array()
);
}
}