Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -27,13 +27,14 @@ class _Blog extends Core
|
||||
* @brief Application
|
||||
*/
|
||||
public $app = 'blog';
|
||||
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
@@ -45,8 +46,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_blogs',
|
||||
'step_method' => 'convertBlogs',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_blogs' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_blogs' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1000,
|
||||
'dependencies' => array(),
|
||||
'link_type' => 'blog_blogs',
|
||||
@@ -57,8 +58,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_blog_entries',
|
||||
'step_method' => 'convertBlogEntries',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_entries' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_entries' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1500,
|
||||
'dependencies' => array( 'convertBlogs' ),
|
||||
'link_type' => 'blog_entries',
|
||||
@@ -69,8 +70,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_blog_comments',
|
||||
'step_method' => 'convertBlogComments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_comments' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_comments' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1500,
|
||||
'dependencies' => array( 'convertBlogEntries' ),
|
||||
'link_type' => 'bog_comments',
|
||||
@@ -81,8 +82,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_blog_rss_import',
|
||||
'step_method' => 'convertBlogRssImport',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_rss_import' )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_rss_import' ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 2000,
|
||||
'dependencies' => array( 'convertBlogs' ),
|
||||
'link_type' => 'blog_rss_import',
|
||||
@@ -93,8 +94,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_club_blogs',
|
||||
'step_method' => 'convertClubBlogs',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 2000,
|
||||
'dependencies' => array( 'convertClubs' ),
|
||||
'link_type' => 'core_club_blogs'
|
||||
@@ -105,8 +106,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_club_blog_entries',
|
||||
'step_method' => 'convertClubBlogEntries',
|
||||
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(blog_entries)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'SUM(blog_entries)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1000,
|
||||
'dependencies' => array( 'convertClubBlogs' ),
|
||||
'link_type' => 'core_club_blogs_entries',
|
||||
@@ -118,8 +119,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_club_blog_comments',
|
||||
'step_method' => 'convertClubBlogComments',
|
||||
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(blog_comments)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'SUM(blog_comments)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 1000,
|
||||
'dependencies' => array( 'convertClubBlogEntries' ),
|
||||
'link_type' => 'core_club_blogs_comments',
|
||||
@@ -131,8 +132,8 @@ class _Blog extends Core
|
||||
$return[ $k ] = array(
|
||||
'step_title' => 'convert_blog_attachments',
|
||||
'step_method' => 'convertAttachments',
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( 'location_key=? AND id1<>? AND id2 IS NULL', 'blog_Entries', 0 ) )->first(),
|
||||
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
|
||||
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( 'location_key=? AND id1<>? AND id2 IS NULL', 'blog_Entries', 0 ) ),
|
||||
'source_rows' => array( 'table' => $v['table'], 'where' => $v['where'] ),
|
||||
'per_cycle' => 250,
|
||||
'dependencies' => array( 'convertBlogEntries', 'convertBlogComments' ),
|
||||
'link_type' => 'core_attachments',
|
||||
@@ -143,6 +144,12 @@ class _Blog extends Core
|
||||
|
||||
$return = $this->software->extraMenuRows( $return );
|
||||
|
||||
/* Run the queries if we want row counts */
|
||||
if( $rowCounts )
|
||||
{
|
||||
$return = $this->getDatabaseRowCounts( $return );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user