Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -12,16 +12,23 @@
|
||||
namespace IPS\convert\Software\Calendar;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\calendar\Date;
|
||||
use IPS\convert\Software;
|
||||
use IPS\Task;
|
||||
use function defined;
|
||||
use function unserialize;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* MyBB Calendar Converter
|
||||
*/
|
||||
class _Mybb extends \IPS\convert\Software
|
||||
class Mybb extends Software
|
||||
{
|
||||
/**
|
||||
* Software Name
|
||||
@@ -92,8 +99,8 @@ class _Mybb extends \IPS\convert\Software
|
||||
public function finish()
|
||||
{
|
||||
/* Content Rebuilds */
|
||||
\IPS\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'calendar_events', 'class' => 'IPS\calendar\Event' ), 2, array( 'app', 'link', 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\calendar\Event' ), 3, array( 'class' ) );
|
||||
Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'calendar_events', 'class' => 'IPS\calendar\Event' ), 2, array( 'app', 'link', 'class' ) );
|
||||
Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\calendar\Event' ), 3, array( 'class' ) );
|
||||
|
||||
return array( "f_rebuild_events", "f_recount_calendar" );
|
||||
}
|
||||
@@ -134,7 +141,7 @@ class _Mybb extends \IPS\convert\Software
|
||||
|
||||
foreach( $this->fetch( 'events', 'eid' ) AS $row )
|
||||
{
|
||||
$repeats = \unserialize( $row['repeats'] );
|
||||
$repeats = unserialize( $row['repeats'] );
|
||||
$recurring = NULL;
|
||||
|
||||
switch( $repeats['repeats'] )
|
||||
@@ -202,8 +209,8 @@ class _Mybb extends \IPS\convert\Software
|
||||
'event_title' => $row['name'],
|
||||
'event_content' => $row['description'],
|
||||
'event_saved' => $row['dateline'],
|
||||
'event_start_date' => \IPS\calendar\Date::ts( $row['starttime'] ),
|
||||
'event_end_date' => $row['endtime'] ? \IPS\calendar\Date::ts( $row['endtime'] ) : NULL,
|
||||
'event_start_date' => Date::ts( $row['starttime'] ),
|
||||
'event_end_date' => $row['endtime'] ? Date::ts( $row['endtime'] ) : NULL,
|
||||
'event_approved' => $row['visible'],
|
||||
'event_recurring' => $recurring,
|
||||
) );
|
||||
|
||||
Reference in new issue
Block a user