mirror of
https://github.com/Combodo/iTop.git
synced 2026-08-13 01:08:19 +02:00
Compare commits
3 Commits
feature/99
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bba486ee8 | ||
|
|
801090fddb | ||
|
|
1d77b9faa2 |
@@ -130,8 +130,8 @@ class HubController
|
||||
$oRuntimeEnv->MoveSelectedExtensions(APPROOT.'/data/downloaded-extensions/', $aSelectedExtensionDirs);
|
||||
|
||||
$oExtensionMap = iTopExtensionsMap::GetExtensionsMap($oRuntimeEnv->GetBuildEnv());
|
||||
$aPreviousRemoteExtensions = $oExtensionMap->GetExtensionsFromDir(APPROOT.'data/'.$oRuntimeEnv->GetFinalEnv().'-modules/') ?: [];
|
||||
$aCurrentRemoteExtensions = $oExtensionMap->GetExtensionsFromDir(APPROOT.'data/'.$oRuntimeEnv->GetBuildEnv().'-modules/') ?: [];
|
||||
$aPreviousRemoteExtensions = $oExtensionMap->GetExtensionsFromDir(APPROOT.'data/'.$oRuntimeEnv->GetFinalEnv().'-modules/');
|
||||
$aCurrentRemoteExtensions = $oExtensionMap->GetExtensionsFromDir(APPROOT.'data/'.$oRuntimeEnv->GetBuildEnv().'-modules/');
|
||||
$aAddedExtensions = array_diff($aCurrentRemoteExtensions, $aPreviousRemoteExtensions);
|
||||
|
||||
$sBuildConfigFile = APPCONF.ITOP_DEFAULT_ENV.'/'.ITOP_CONFIG_FILE;
|
||||
|
||||
@@ -394,12 +394,13 @@ class iTopExtensionsMap
|
||||
*
|
||||
* @param string $sSearchDir The directory to scan
|
||||
*
|
||||
* @return string[]|bool
|
||||
* @return string[]
|
||||
*/
|
||||
public function GetExtensionsFromDir(string $sSearchDir): array|bool
|
||||
public function GetExtensionsFromDir(string $sSearchDir): array
|
||||
{
|
||||
if (!is_readable($sSearchDir)) {
|
||||
return false;
|
||||
SetupLog::Error("No extension found: Directory $sSearchDir is not readable");
|
||||
return [];
|
||||
}
|
||||
|
||||
$aExtensions = [];
|
||||
|
||||
@@ -2177,11 +2177,13 @@ JS
|
||||
*/
|
||||
public static function EraseSetupToken()
|
||||
{
|
||||
$sTokenFile = utils::GetDataPath().'setup/authent';
|
||||
if (is_file($sTokenFile)) {
|
||||
unlink($sTokenFile);
|
||||
if (self::IsSessionSetupTokenValid()) {
|
||||
$sTokenFile = utils::GetDataPath().'setup/authent';
|
||||
if (is_file($sTokenFile)) {
|
||||
unlink($sTokenFile);
|
||||
}
|
||||
Session::Unset('setup_token');
|
||||
}
|
||||
Session::Unset('setup_token');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
$('#{{ oUIBlock.GetId() }}').on('edit_object', function(){
|
||||
let oFavoriteButton = $(this).find('#UIMenuModify');
|
||||
if(oFavoriteButton[0]){
|
||||
oFavoriteButton[0].trigger('click');
|
||||
oFavoriteButton[0].click();
|
||||
}
|
||||
else{
|
||||
let oPopupItemButton = $('[data-role="ibo-popover-menu"]').find('[data-resource-id="UI:Menu:Modify"]');
|
||||
if(oPopupItemButton[0]){
|
||||
oPopupItemButton[0].trigger('click');
|
||||
oPopupItemButton[0].click();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -28,12 +28,12 @@
|
||||
$('#{{ oUIBlock.GetId() }}').on('delete_object', function(){
|
||||
let oFavoriteButton = $(this).find('#UIMenuDelete');
|
||||
if(oFavoriteButton[0]){
|
||||
oFavoriteButton[0].trigger('click');
|
||||
oFavoriteButton[0].click();
|
||||
}
|
||||
else{
|
||||
let oPopupItemButton = $('[data-role="ibo-popover-menu"]').find('[data-resource-id="UI:Menu:Delete"]');
|
||||
if(oPopupItemButton[0]){
|
||||
oPopupItemButton[0].trigger('click');
|
||||
oPopupItemButton[0].click();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -41,12 +41,12 @@
|
||||
$('#{{ oUIBlock.GetId() }}').on('new_object', function(){
|
||||
let oFavoriteButton = $(this).find('#UIMenuNew');
|
||||
if(oFavoriteButton[0]){
|
||||
oFavoriteButton[0].trigger('click');
|
||||
oFavoriteButton[0].click();
|
||||
}
|
||||
else{
|
||||
let oPopupItemButton = $('[data-role="ibo-popover-menu"]').find('[data-resource-id="UI:Menu:New"]');
|
||||
if(oPopupItemButton[0]){
|
||||
oPopupItemButton[0].trigger('click');
|
||||
oPopupItemButton[0].click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user