Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -1089,7 +1089,7 @@ EOF;
|
||||
$buttons['export'] = array(
|
||||
'icon' => 'download',
|
||||
'title' => 'download',
|
||||
'link' => \IPS\Http\Url::internal("app=core&module=applications&controller=applications&appKey={$this->_id}&do=downloadMafia")
|
||||
'link' => \IPS\Http\Url::internal("app=core&module=applications&controller=applications&appKey={$this->_id}&do=customDownload")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1164,8 +1164,24 @@ EOF;
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ( $this->requires_manual_intervention )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Lang string for the tooltip when this is locked
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get__lockedLang()
|
||||
{
|
||||
return $this->requires_manual_intervention ? 'invalid_php8_customization' : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Get Node Description
|
||||
@@ -3148,6 +3164,9 @@ EOF;
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
/* Use full upgrader? */
|
||||
$forceFullUpgrade = FALSE;
|
||||
|
||||
/* Write the application data to the application.json file */
|
||||
$applicationData = array(
|
||||
'application_title' => \IPS\Member::loggedIn()->language()->get('__app_' . $this->directory ),
|
||||
@@ -3268,15 +3287,22 @@ EOF;
|
||||
{
|
||||
\unlink( $jsChangesFile );
|
||||
}
|
||||
|
||||
/* Force full upgrade if global JS has changed */
|
||||
foreach( new \RecursiveIteratorIterator( new \RecursiveArrayIterator( $jsChanges ) ) as $k => $v )
|
||||
{
|
||||
if( mb_substr( $v, 0, 6 ) === 'global' )
|
||||
{
|
||||
$forceFullUpgrade = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->installJavascript();
|
||||
|
||||
/* Take care of hooks for this app */
|
||||
$this->buildHooks();
|
||||
|
||||
/* Take care of features for this app */
|
||||
$this->buildNewFeatures();
|
||||
|
||||
/* And custom build routines */
|
||||
foreach( $this->extensions( 'core', 'Build' ) as $builder )
|
||||
{
|
||||
@@ -3343,11 +3369,10 @@ EOF;
|
||||
'tasks' => file_exists( $setupDir . "/tasks.json" ),
|
||||
'modules' => file_exists( $setupDir . "/modules.json" ),
|
||||
'widgets' => file_exists( $setupDir . "/widgets.json" ),
|
||||
'whatsnew' => file_exists( $setupDir . "/whatsnew.json" ),
|
||||
'customOptions' => file_exists( $setupDir . "/options.php" ),
|
||||
'customRoutines' => file_exists( $setupDir . "/upgrade.php" ),
|
||||
),
|
||||
'forceMainUpgrader' => FALSE,
|
||||
'forceMainUpgrader' => $forceFullUpgrade,
|
||||
'forceManualDownloadNoCiC' => FALSE,
|
||||
'forceManualDownloadCiC' => FALSE,
|
||||
), JSON_PRETTY_PRINT ) );
|
||||
@@ -3440,47 +3465,6 @@ EOF;
|
||||
|
||||
return $previousChanges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build New Feature Highlights
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function buildNewFeatures()
|
||||
{
|
||||
/* Assign any that are flagged is "current" to this version */
|
||||
\IPS\Db::i()->update( 'core_members_features', array( 'feature_version_added' => $this->long_version ), array( "feature_version_added=? AND feature_app=?", -1, $this->directory ) );
|
||||
|
||||
/* Write the JSON file */
|
||||
\IPS\Application\Feature::writeJsonFile( $this->directory, $this->long_version );
|
||||
}
|
||||
|
||||
/**
|
||||
* Install new feature highlights
|
||||
*
|
||||
* @param string $appKey The application key
|
||||
* @param int $versionId The version ID
|
||||
* @return void
|
||||
*/
|
||||
public static function installNewFeatures( string $appKey, int $versionId )
|
||||
{
|
||||
if ( !\in_array( $appKey, \IPS\IPS::$ipsApps ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( file_exists( \IPS\ROOT_PATH . "/applications/{$appKey}/setup/upg_{$versionId}/whatsnew.json" ) )
|
||||
{
|
||||
if ( $data = @json_decode( \file_get_contents( \IPS\Application::load( $appKey )->getApplicationPath() . "/setup/upg_{$versionId}/whatsnew.json" ), TRUE ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->insert( 'core_members_features', $data );
|
||||
}
|
||||
catch ( \IPS\Db\Exception $e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build skin templates for an app
|
||||
|
||||
Reference in new issue
Block a user