Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -54,11 +54,19 @@ abstract class _Library
|
||||
* @brief \IPS\convert\Software instance for the software we are converting from
|
||||
*/
|
||||
public $software = NULL;
|
||||
|
||||
/**
|
||||
* @brief Obscure filenames?
|
||||
*
|
||||
* This is only referenced in certain content types that may be referenced in already parsed data such as attachments and emoticons
|
||||
* - Designed for use with the Invision Community converter.
|
||||
*/
|
||||
public static $obscureFilenames = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Array of field types
|
||||
*/
|
||||
protected static $fieldTypes = array( 'Address', 'Checkbox', 'CheckboxSet', 'Codemirror', 'Color', 'Date', 'Editor', 'Email', 'Member', 'Number', 'Password', 'Poll', 'Radio', 'Rating', 'Select', 'Tel', 'Text', 'TextArea', 'Upload', 'Url', 'YesNo' );
|
||||
protected static $fieldTypes = array( 'Address', 'Checkbox', 'CheckboxSet', 'Codemirror', 'Color', 'Date', 'Editor', 'Email', 'Item', 'Member', 'Number', 'Password', 'Poll', 'Radio', 'Rating', 'Select', 'Tel', 'Text', 'TextArea', 'Upload', 'Url', 'YesNo' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -185,9 +193,9 @@ abstract class _Library
|
||||
|
||||
/* Set as last key value */
|
||||
$this->setLastKeyValue( $lastId );
|
||||
|
||||
/* Set this to FALSE so we don't do this again. */
|
||||
$_SESSION['convertContinue'] = FALSE;
|
||||
|
||||
/* Unset this so we don't do this again. */
|
||||
unset( $_SESSION['convertContinue'] );
|
||||
}
|
||||
|
||||
/* Fetch data from the software */
|
||||
@@ -353,6 +361,10 @@ abstract class _Library
|
||||
public function emptyLocalData( $method )
|
||||
{
|
||||
$truncate = $this->truncate( $method );
|
||||
|
||||
/* Get the link type */
|
||||
$menuRows = $this->menuRows();
|
||||
|
||||
foreach( $truncate as $table => $where )
|
||||
{
|
||||
/* Kind of a hacky way to make sure we truncate the right forums archive table */
|
||||
@@ -364,10 +376,23 @@ abstract class _Library
|
||||
{
|
||||
\IPS\Db::i()->delete( $table, $where );
|
||||
}
|
||||
|
||||
/* Do we have a specific link type? */
|
||||
$linkType = NULL;
|
||||
if( isset( $menuRows[ $method ] ) AND isset( $menuRows[ $method ]['link_type'] ) )
|
||||
{
|
||||
$linkType = $menuRows[ $method ]['link_type'];
|
||||
}
|
||||
|
||||
/* Remove links... we don't really care about which table they are in right now */
|
||||
foreach( array( 'convert_link', 'convert_link_pms', 'convert_link_posts', 'convert_link_topics' ) as $linkTable )
|
||||
{
|
||||
if( $linkType !== NULL )
|
||||
{
|
||||
\IPS\Db::i()->delete( $linkTable, array( "type=? AND app=?", $linkType, $this->software->app->app_id ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
\IPS\Db::i()->delete( $linkTable, array( "type=? AND app=?", $table, $this->software->app->app_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user