Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -369,6 +369,18 @@ class _event extends \IPS\Content\Controller
|
||||
*/
|
||||
protected function edit()
|
||||
{
|
||||
if ( \IPS\Application::appIsEnabled('cloud') and $this->event->livetopic_id )
|
||||
{
|
||||
/* Allow live topic edit form to handle this */
|
||||
try
|
||||
{
|
||||
/* Make sure it's a valid topic */
|
||||
$liveTopic = \IPS\cloud\LiveTopic::load( $this->event->livetopic_id );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=modcp&controller=modcp&tab=livetopics&action=create&fromEvent=1&id=' . $liveTopic->id, 'front', 'modcp_livetopics' ) );
|
||||
}
|
||||
catch( \Exception ) { }
|
||||
}
|
||||
|
||||
/* Are we blocking changes to past events? */
|
||||
if( $this->event->hasPassed() AND \IPS\Settings::i()->calendar_block_past_changes )
|
||||
{
|
||||
|
||||
@@ -648,7 +648,7 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
/* Build an array of month objects for the nav */
|
||||
$months = new \DatePeriod( (new \DateTime)->setDate( date('Y'), date('m'), 1 ), new \DateInterval( 'P1M' ), 11 );
|
||||
|
||||
$stream = \IPS\Theme::i()->getTemplate( 'overview', 'calendar' )->byMonth( $calendars, $date, $featured, $events, NULL, $months );
|
||||
$stream = \IPS\Theme::i()->getTemplate( 'overview', 'calendar' )->byMonth( $calendars, \IPS\calendar\Date::getDate( $date->firstDayOfMonth('year'), $date->firstDayOfMonth('mon'), $date->firstDayOfMonth('mday') ), $featured, $events, NULL, $months );
|
||||
|
||||
$form = $this->getForm();
|
||||
|
||||
@@ -762,16 +762,14 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$having[] = 'distance < 500';
|
||||
}
|
||||
|
||||
if( isset( \IPS\Request::i()->sortBy ) && \IPS\Request::i()->sortBy == 'nearest' )
|
||||
{
|
||||
$sort = 'distance asc';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sort = 'event_start_date asc';
|
||||
|
||||
if( isset( \IPS\Request::i()->sortBy ) && \IPS\Request::i()->sortBy == 'nearest' && $location )
|
||||
{
|
||||
$sort = 'distance asc';
|
||||
}
|
||||
|
||||
/* Filter? */
|
||||
if( isset( \IPS\Request::i()->show ) && \IPS\Request::i()->show !== 'all' )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user