Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -32,6 +32,7 @@ use IPS\Helpers\Form;
use IPS\Helpers\Form\Number;
use IPS\Http\Url;
use IPS\Member;
use IPS\Notification;
use IPS\Output;
use IPS\Request;
use IPS\Session;
@@ -414,6 +415,14 @@ class event extends Controller
) );
Member::loggedIn()->achievementAction( 'calendar', 'Rsvp', $this->event );
/* If we responded that we are going, send a notification to the event owner */
if( $_go == EventClass::RSVP_YES )
{
$notification = new Notification( Application::load( 'calendar' ), 'event_rsvp', $this->event, [ $this->event, Member::loggedIn() ], [ 'member' => Member::loggedIn()->member_id ] );
$notification->recipients->attach( $this->event->author() );
$notification->send();
}
}
$webhookData = [
@@ -60,6 +60,8 @@ class venue extends Controller
Output::i()->error( 'node_error', '2L354/1', 404, '' );
}
Output::i()->bodyAttributes['contentClass'] = VenueClass::class;
parent::execute();
}
@@ -22,6 +22,7 @@ use InvalidArgumentException;
use IPS\calendar\Calendar;
use IPS\calendar\Date;
use IPS\calendar\Event;
use IPS\Db;
use IPS\Dispatcher\Controller;
use IPS\GeoLocation;
use IPS\Helpers\Form;
@@ -176,6 +177,8 @@ class view extends Controller
$this->$method( $jump );
Output::i()->bodyAttributes['contentClass'] = Calendar::class;
/* Online User Location */
if ( $this->_calendar )
{
@@ -804,18 +807,9 @@ class view extends Controller
$locations = static::geocodeLocation( Request::i()->location, FALSE );
if( count( $locations ) )
{
if( $locations[0]['value'] )
{
$having[] = "( event_title LIKE CONCAT( '%', '" . $locations[0]['value'] . "', '%' ) OR name LIKE CONCAT( '%', '" . $locations[0]['value'] . "', '%' ) )";
}
$location = array( 'lat' => $locations[0]['lat'], 'lon' => $locations[0]['long'] );
$searchNearLocation = TRUE;
}
else
{
$having[] = "( event_title LIKE CONCAT( '%', '" . Request::i()->location . "', '%' ) OR name LIKE CONCAT( '%', '" . Request::i()->location . "', '%' ) )";
}
}
else if ( isset( Request::i()->lat ) and isset( Request::i()->lon ) and Request::i()->lat !== 0 and Request::i()->lon !== 0 )
{
@@ -840,11 +834,6 @@ class view extends Controller
{
$select = $select . ', ( 3959 * acos( cos( radians(' . $location['lat'] . ') ) * cos( radians( event_latitude ) ) * cos( radians( event_longitude ) - radians(' . $location['lon'] . ') ) + sin( radians(' . $location['lat'] . ') ) * sin(radians(event_latitude)) ) ) AS distance';
if( $searchNearLocation )
{
$having[] = 'distance < 500';
}
if( isset( Request::i()->sortBy ) && Request::i()->sortBy == 'nearest' )
{
$sort = 'distance asc';