Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -210,6 +210,24 @@ class _convert extends \IPS\Dispatcher\Controller
|
||||
if ( isset( \IPS\Request::i()->empty_local_data ) AND \IPS\Request::i()->empty_local_data == 1 )
|
||||
{
|
||||
$app->getSource()->getLibrary()->emptyLocalData( \IPS\Request::i()->method );
|
||||
|
||||
/* If this step has extra steps, we need to unset the completed flag. */
|
||||
$canConvert = $app->getSource()->getLibrary()->getConvertableItems();
|
||||
if ( isset( $canConvert[ \IPS\Request::i()->method ]['extra_steps'] ) )
|
||||
{
|
||||
$next = NULL;
|
||||
$session = $app->_session;
|
||||
foreach( $canConvert[ \IPS\Request::i()->method ]['extra_steps'] as $next )
|
||||
{
|
||||
if( $key = array_search( $next, $session['completed'] ) )
|
||||
{
|
||||
unset( $session['completed'][ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the new session data */
|
||||
$app->_session = $session;
|
||||
}
|
||||
}
|
||||
|
||||
/* Are we continuing? We need to tell the library that, but we need to use sessions to do it so it only does it on the first cycle. */
|
||||
|
||||
@@ -70,7 +70,18 @@ class _create extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
if ( ucwords( $node->directory ) === str_replace( '.php', '', $file->getFilename() ) )
|
||||
{
|
||||
if ( $node->directory === 'core' OR $appCount > 0 )
|
||||
$hasFile = FALSE;
|
||||
/* Only show the node if there is a converter available */
|
||||
foreach( new \DirectoryIterator( \IPS\ROOT_PATH . '/applications/convert/sources/Software/' . ucwords( $node->directory ) ) AS $softwareFile )
|
||||
{
|
||||
if( mb_substr( $softwareFile->getFilename(), -3 ) === 'php' )
|
||||
{
|
||||
$hasFile = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( $node->directory === 'core' OR $appCount > 0 ) and $hasFile )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -214,6 +225,11 @@ class _create extends \IPS\Dispatcher\Controller
|
||||
|
||||
try
|
||||
{
|
||||
if ( !isset( $values['convert_start_database_prefix'] ) )
|
||||
{
|
||||
$values['convert_start_database_prefix'] = '';
|
||||
}
|
||||
|
||||
/* Test the connection */
|
||||
$connectionSettings = array(
|
||||
'sql_host' => $values['convert_start_database_host'],
|
||||
@@ -307,11 +323,6 @@ class _create extends \IPS\Dispatcher\Controller
|
||||
$app->parent = 0;
|
||||
}
|
||||
|
||||
if ( !isset( $values['convert_start_database_prefix'] ) )
|
||||
{
|
||||
$values['convert_start_database_prefix'] = '';
|
||||
}
|
||||
|
||||
$app->db_host = $values['convert_start_database_host'];
|
||||
$app->db_port = $values['convert_start_database_port'];
|
||||
$app->db_db = $values['convert_start_database_name'];
|
||||
|
||||
@@ -101,29 +101,26 @@ class _manage extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
);
|
||||
|
||||
$table->rootButtons = array(
|
||||
'start' => array(
|
||||
'icon' => 'plus',
|
||||
'title' => 'convert_start',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=create&_new=1" ),
|
||||
)
|
||||
\IPS\Output::i()->sidebar['actions']['start'] = array(
|
||||
'primary' => true,
|
||||
'icon' => 'plus',
|
||||
'title' => 'convert_start',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=create&_new=1" ),
|
||||
);
|
||||
|
||||
if ( \IPS\IN_DEV )
|
||||
{
|
||||
$table->rootButtons += array(
|
||||
'software' => array(
|
||||
'icon' => 'plus',
|
||||
'title' => 'new_software',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=manage&do=software" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('new_software') )
|
||||
),
|
||||
'library' => array(
|
||||
'icon' => 'plus',
|
||||
'title' => 'new_library',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=manage&do=library" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('new_library') )
|
||||
)
|
||||
\IPS\Output::i()->sidebar['actions']['software'] = array(
|
||||
'icon' => 'plus',
|
||||
'title' => 'new_software',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=manage&do=software" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('new_software') )
|
||||
);
|
||||
\IPS\Output::i()->sidebar['actions']['library'] = array(
|
||||
'icon' => 'plus',
|
||||
'title' => 'new_library',
|
||||
'link' => \IPS\Http\Url::internal( "app=convert&module=manage&controller=manage&do=library" ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('new_library') )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -185,7 +182,7 @@ class _manage extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( 'menu__convert_manage' );
|
||||
\IPS\Output::i()->output .= \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( 'title', (string) $table );
|
||||
\IPS\Output::i()->output .= (string) $table;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user