Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

@@ -41,24 +41,7 @@ class _rsvp extends \IPS\Dispatcher\Controller
*/
protected function manage()
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=calendar&module=stats&controller=rsvp' ), 'calendar_event_rsvp', 'rsvp_date', '', array(
'isStacked' => FALSE,
'backgroundColor' => '#ffffff',
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
) );
$chart->groupBy = 'rsvp_response';
foreach( array( 0,1,2 ) as $response )
{
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('calendar_stats_rsvp_response_' . $response ), 'number', 'COUNT(*)', FALSE, $response );
}
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('calendar_stats_rsvp_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'calendar', 'Rsvp' )->getChart( \IPS\Http\Url::internal( "app=calendar&module=stats&controller=rsvp" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__calendar_stats_rsvp');
\IPS\Output::i()->output = (string) $chart;
}
@@ -144,6 +144,11 @@ class _submit extends \IPS\Dispatcher\Controller
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=calendar&module=calendar&controller=submit', 'front', 'calendar_submit' ) );
}
if( !$existing->canCopyEvent())
{
\IPS\Output::i()->error( 'no_module_permission', '2L179/9', 403, '' );
}
/* Are we the author of the existing event? */
if( $existing->author()->member_id !== \IPS\Member::loggedIn()->member_id )
{
@@ -87,6 +87,12 @@ class _view extends \IPS\Dispatcher\Controller
{
\IPS\Output::i()->breadcrumb[] = array( NULL, $this->_calendar->_title );
}
/* Update Views */
if ( !\IPS\Request::i()->isAjax() )
{
$this->_calendar->updateViews();
}
}
if( $this->_calendar !== NULL AND $this->_calendar->_id )
@@ -155,7 +161,7 @@ class _view extends \IPS\Dispatcher\Controller
try
{
$date = \IPS\calendar\Date::getDate( \IPS\Request::i()->y ?: NULL, \IPS\Request::i()->m ?: NULL, $day );
$date = \IPS\calendar\Date::getDate( \IPS\Request::i()->y ?: NULL, \IPS\Request::i()->m ?: NULL, $day, 12 );
/* Get the events within this range */
$events = \IPS\calendar\Event::retrieveEvents(
@@ -478,7 +484,7 @@ class _view extends \IPS\Dispatcher\Controller
/* Do an IP lookup */
try
{
$geo = \IPS\GeoLocation::getByIp( \IPS\Request::i()->ipAddress() );
$geo = \IPS\GeoLocation::getRequesterLocation();
$location = array( 'lat' => $geo->lat, 'lon' => $geo->long );
}
catch ( \Exception $e )
@@ -662,7 +668,7 @@ class _view extends \IPS\Dispatcher\Controller
{
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_overview.js', 'calendar', 'front' ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( '__app_calendar' );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'overview' )->wrapper( $featured, $nearme, $stream, $form, $mapMarkers, $online, $date );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'overview' )->wrapper( $featured, $nearme, $stream, $form, $mapMarkers, $online, $date, $this->_downloadLinks() );
}
}
@@ -675,7 +681,7 @@ class _view extends \IPS\Dispatcher\Controller
public function getForm()
{
/* Search form */
$form = new \IPS\Helpers\Form('form', 'search', \IPS\Http\Url::internal( 'app=calendar&module=calendar&controller=view&do=search' ) );
$form = new \IPS\Helpers\Form('form', 'search', \IPS\Http\Url::internal( 'app=calendar&module=calendar&controller=view&do=search', 'front', 'calendar_event_search' ) );
if ( \IPS\GeoLocation::enabled() )
{
$form->add( new \IPS\Helpers\Form\Text( 'location', FALSE, \IPS\Request::i()->location, array( 'placeholder' => \IPS\Member::loggedIn()->language()->addToStack( 'events_search_search_location') ) ) );
@@ -745,7 +751,7 @@ class _view extends \IPS\Dispatcher\Controller
/* Do an IP lookup */
try
{
$geo = \IPS\GeoLocation::getByIp( \IPS\Request::i()->ipAddress() );
$geo = \IPS\GeoLocation::getRequesterLocation();
$location = array( 'lat' => $geo->lat, 'lon' => $geo->long );
}
catch ( \Exception $e )
@@ -886,7 +892,7 @@ class _view extends \IPS\Dispatcher\Controller
if( \IPS\Request::i()->isAjax() ){
$countQuery = \IPS\Db::i()->select( $select, 'calendar_events', $where, NULL, array(), NULL, implode( " OR ", $having ) );
$countQuery = \IPS\Db::i()->select( $select, 'calendar_events', $where, NULL, array(), NULL, is_array( $having ) ? implode( " OR ", $having ) : NULL );
$countQuery->join( 'calendar_calendars', "event_calendar_id = cal_id" );
$countQuery->join( 'core_clubs', "cal_club_id = id" );
@@ -906,6 +912,7 @@ class _view extends \IPS\Dispatcher\Controller
return;
}
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( '__app_calendar' );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'overview' )->search( $form, $results, json_encode( $mapMarkers ) );
}