Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -185,7 +185,7 @@ class _event extends \IPS\Content\Controller
|
||||
}
|
||||
|
||||
/* We delete either way at this point, because even if we select a different action we have to remove any existing RSVP preference */
|
||||
\IPS\Db::i()->delete( 'calendar_event_rsvp', array( 'rsvp_event_id=? AND rsvp_member_id=?', $this->event->id, \IPS\Member::loggedIn()->member_id ) );
|
||||
\IPS\Db::i()->delete( 'calendar_event_rsvp', array( 'rsvp_event_id=? AND rsvp_member_id=?', $this->event->id, (int) \IPS\Member::loggedIn()->member_id ) );
|
||||
|
||||
if( \IPS\Request::i()->action == 'leave' )
|
||||
{
|
||||
@@ -229,7 +229,7 @@ class _event extends \IPS\Content\Controller
|
||||
|
||||
\IPS\Db::i()->insert( 'calendar_event_rsvp', array(
|
||||
'rsvp_event_id' => $this->event->id,
|
||||
'rsvp_member_id' => \IPS\Member::loggedIn()->member_id,
|
||||
'rsvp_member_id' => (int) \IPS\Member::loggedIn()->member_id,
|
||||
'rsvp_date' => time(),
|
||||
'rsvp_response' => (int) $_go
|
||||
) );
|
||||
@@ -239,4 +239,16 @@ class _event extends \IPS\Content\Controller
|
||||
|
||||
\IPS\Output::i()->redirect( $this->event->url(), $message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit Item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function edit()
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_submit.js', 'calendar', 'front' ) );
|
||||
|
||||
return parent::edit();
|
||||
}
|
||||
}
|
||||
@@ -495,21 +495,25 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
\IPS\Request::i()->view = 'day';
|
||||
|
||||
if( \IPS\Request::i()->goto )
|
||||
{
|
||||
\IPS\Request::i()->y = null;
|
||||
\IPS\Request::i()->m = null;
|
||||
\IPS\Request::i()->d = null;
|
||||
\IPS\Request::i()->w = null;
|
||||
$dateToGoTo = \IPS\DateTime::create();
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Request::i()->y = $values['jump_to']->format('Y');
|
||||
\IPS\Request::i()->m = $values['jump_to']->format('m');
|
||||
\IPS\Request::i()->d = $values['jump_to']->format('j');
|
||||
$dateToGoTo = $values['jump_to'];
|
||||
}
|
||||
|
||||
if ( $this->_calendar )
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=calendar&module=calendar&controller=view&view=day&id={$this->_calendar->_id}&y={$dateToGoTo->format('Y')}&m={$dateToGoTo->format('m')}&d={$dateToGoTo->format('j')}", 'front', 'calendar_calday', $this->_calendar->title_seo );
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=calendar&module=calendar&controller=view&view=day&y={$dateToGoTo->format('Y')}&m={$dateToGoTo->format('m')}&d={$dateToGoTo->format('j')}", 'front', 'calendar_day' );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $url );
|
||||
}
|
||||
|
||||
return $form;
|
||||
|
||||
Reference in new issue
Block a user