Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -28,9 +28,10 @@ class _Calendar extends Core
|
||||
/**
|
||||
* Returns an array of items that we can convert, including the amount of rows stored in the Community Suite as well as the recommend value of rows to convert per cycle
|
||||
*
|
||||
* @param bool $rowCounts enable row counts
|
||||
* @return array
|
||||
*/
|
||||
public function menuRows()
|
||||
public function menuRows( $rowCounts=FALSE )
|
||||
{
|
||||
$return = array();
|
||||
|
||||
@@ -42,8 +43,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_calendars',
|
||||
'step_method' => 'convertCalendarCalendars',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_calendars' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_calendars' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array(),
|
||||
'link_type' => 'calendar_calendars',
|
||||
@@ -54,8 +55,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_venues',
|
||||
'step_method' => 'convertCalendarVenues',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_venues' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_venues' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array( 'convertCalendarCalendars' ),
|
||||
'link_type' => 'calendar_venues',
|
||||
@@ -66,8 +67,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_events',
|
||||
'step_method' => 'convertCalendarEvents',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_events' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_events' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1500,
|
||||
'dependencies' => array( 'convertCalendarCalendars' ),
|
||||
'link_type' => 'calendar_events',
|
||||
@@ -79,8 +80,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_comments',
|
||||
'step_method' => 'convertCalendarComments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_comments' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_comments' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 2000,
|
||||
'dependencies' => array( 'convertCalendarEvents' ),
|
||||
'link_type' => 'calendar_event_comments',
|
||||
@@ -92,8 +93,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_reviews',
|
||||
'step_method' => 'convertCalendarReviews',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_reviews' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_reviews' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 2000,
|
||||
'dependencies' => array( 'convertCalendarEvents' ),
|
||||
'link_type' => 'calendar_event_reviews',
|
||||
@@ -105,8 +106,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_rsvps',
|
||||
'step_method' => 'convertCalendarRsvps',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_rsvp' )->first(),
|
||||
'source_rows' => $this->sofrware->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_rsvp' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 2000,
|
||||
'dependencies' => array( 'convertCalendarEvents' ),
|
||||
'link_type' => 'calendar_event_rsvp',
|
||||
@@ -117,8 +118,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_feeds',
|
||||
'step_method' => 'convertCalendarFeeds',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_import_feeds' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_import_feeds' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array( 'convertCalendarCalendars' ),
|
||||
'link_type' => 'calendar_import_feeds',
|
||||
@@ -129,8 +130,8 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_calendar_reminders',
|
||||
'step_method' => 'convertCalendarReminders',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_reminders' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_reminders' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array( 'convertCalendarEvents' ),
|
||||
'link_type' => 'calendar_reminders',
|
||||
@@ -141,10 +142,10 @@ class _Calendar extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_attachments',
|
||||
'step_method' => 'convertAttachments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments', array( "location_key=?", 'calendar_Events' ) )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( "location_key=?", 'calendar_Calendar' ) ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 100,
|
||||
'dependencies' => array( 'convertCalendarEvents', 'convertCalendarComments', 'convertCalendarReviews' ),
|
||||
'dependencies' => array( 'convertCalendarEvents' ),
|
||||
'link_type' => 'core_attachments',
|
||||
);
|
||||
break;
|
||||
@@ -152,7 +153,13 @@ class _Calendar extends Core
|
||||
}
|
||||
|
||||
$return = $this->software->extraMenuRows( $return );
|
||||
|
||||
|
||||
/* Run the queries if we want row counts */
|
||||
if( $rowCounts )
|
||||
{
|
||||
$return = $this->getDatabaseRowCounts( $return );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -210,9 +217,13 @@ class _Calendar extends Core
|
||||
case 'convertCalendarReminders':
|
||||
$return['convertCalendarReminders'] = array( 'calender_reminders' => NULL );
|
||||
break;
|
||||
|
||||
case 'convertAttachments':
|
||||
$return['convertAttachments'] = array( 'core_attachments' => array( "location_key=?", 'calendar_Events' ) );
|
||||
$attachIds = array();
|
||||
foreach( \IPS\Db::i()->select( 'attachment_id', 'core_attachments_map', array( 'location_key=?', 'calendar_Calendar' ) ) AS $attachment )
|
||||
{
|
||||
$attachIds[] = $attachment;
|
||||
}
|
||||
$return['convertAttachments'] = array( 'core_attachments' => \IPS\Db::i()->in( 'attach_id', $attachIds ), 'core_attachments_map' => array( "location_key=?", 'calendar_Calendar' ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -321,6 +332,8 @@ class _Calendar extends Core
|
||||
|
||||
\IPS\Lang::saveCustom( 'calendar', "calendar_calendar_{$inserted_id}", $name );
|
||||
\IPS\Lang::saveCustom( 'calendar', "calendar_calendar_{$inserted_id}_desc", $desc );
|
||||
|
||||
\IPS\Db::i()->insert( 'core_permission_index', array( 'app' => 'calendar', 'perm_type' => 'calendar', 'perm_type_id' => $inserted_id, 'perm_view' => '' ) );
|
||||
|
||||
if ( $info['cal_club_id'] )
|
||||
{
|
||||
@@ -1318,13 +1331,14 @@ class _Calendar extends Core
|
||||
$map['id1_type'] = 'calendar_events';
|
||||
$map['id1_from_parent'] = FALSE;
|
||||
$map['id2_from_parent'] = FALSE;
|
||||
|
||||
/* Some set up */
|
||||
if ( !isset( $info['id3'] ) )
|
||||
if ( !isset( $map['id3'] ) )
|
||||
{
|
||||
$info['id3'] = NULL;
|
||||
$map['id3'] = NULL;
|
||||
}
|
||||
|
||||
if ( is_null( $info['id3'] ) OR $info['id3'] != 'review' )
|
||||
if ( is_null( $map['id3'] ) OR $map['id3'] != 'review' )
|
||||
{
|
||||
$map['id2_type'] = 'calendar_event_comments';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user