Merge pull request #1339 from brayanpereyra/BUG-10435
Bug 10435 I added option to view history Upgrades SOLVED
This commit is contained in:
@@ -125,6 +125,32 @@ function run_upgrade($command, $args)
|
||||
} else {
|
||||
CLI::logging("Upgrade successful\n");
|
||||
}
|
||||
|
||||
// SAVE Upgrades/Patches
|
||||
$arrayPatch = glob(PATH_TRUNK . 'patch-*');
|
||||
|
||||
if ($arrayPatch) {
|
||||
foreach ($arrayPatch as $value) {
|
||||
if (file_exists($value)) {
|
||||
// copy content the patch
|
||||
$names = pathinfo($value);
|
||||
$nameFile = $names['basename'];
|
||||
|
||||
$contentFile = file_get_contents($value);
|
||||
$contentFile = preg_replace("[\n|\r|\n\r]", '', $contentFile);
|
||||
CLI::logging($contentFile . ' installed (' . $nameFile . ')', PATH_DATA . 'log/upgrades.log');
|
||||
|
||||
// move file of patch
|
||||
$newFile = PATH_DATA . $nameFile;
|
||||
G::rm_dir($newFile);
|
||||
copy($value, $newFile);
|
||||
G::rm_dir($value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CLI::logging('ProcessMaker ' . System::getVersion(). ' installed', PATH_DATA . 'log/upgrades.log');
|
||||
}
|
||||
|
||||
//setting flag to false
|
||||
$flag = G::isPMUnderUpdating(0);
|
||||
}
|
||||
|
||||
@@ -85,6 +85,10 @@ class Main extends Controller
|
||||
$this->render();
|
||||
}
|
||||
|
||||
function screamFileUpgrades () {
|
||||
G::streamFile( PATH_DATA . 'log/upgrades.log', true );
|
||||
}
|
||||
|
||||
function getSystemInfo ()
|
||||
{
|
||||
$this->setResponseType( 'json' );
|
||||
@@ -728,57 +732,64 @@ class Main extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$sysSection = G::loadTranslation( 'ID_SYSTEM_INFO' );
|
||||
$pmSection = 'ProcessMaker Information';
|
||||
$sysSection = G::loadTranslation('ID_SYSTEM_INFO' );
|
||||
$pmSection = G::LoadTranslation('ID_PROCESS_INFORMATION');
|
||||
|
||||
$properties = array ();
|
||||
$ee = class_exists( 'pmLicenseManager' ) ? " - Enterprise Edition" : '';
|
||||
$properties[] = array ('ProcessMaker Ver.',System::getVersion() . $ee,$pmSection
|
||||
);
|
||||
$properties[] = array ('Operating System',$redhat,$sysSection
|
||||
|
||||
if (file_exists(PATH_DATA. 'log/upgrades.log')) {
|
||||
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), '<a href="#" onclick="showUpgradedLogs(); return false;">' . G::LoadTranslation( 'ID_UPGRADE_VIEW_LOG') . '</a>' ,$pmSection);
|
||||
} else {
|
||||
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), G::LoadTranslation( 'ID_UPGRADE_NEVER_UPGRADE') ,$pmSection);
|
||||
}
|
||||
|
||||
$properties[] = array (G::LoadTranslation('ID_OPERATING_SYSTEM') ,$redhat,$sysSection
|
||||
);
|
||||
$properties[] = array ('Time Zone',(defined( 'TIME_ZONE' )) ? TIME_ZONE : "Unknown",$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_TIME_ZONE') ,(defined( 'TIME_ZONE' )) ? TIME_ZONE : "Unknown",$sysSection
|
||||
);
|
||||
$properties[] = array ('Web Server',getenv( 'SERVER_SOFTWARE' ),$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_WEB_SERVER') ,getenv( 'SERVER_SOFTWARE' ),$sysSection
|
||||
);
|
||||
$properties[] = array ('Server Name',getenv( 'SERVER_NAME' ),$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_SERVER_NAME') ,getenv( 'SERVER_NAME' ),$pmSection
|
||||
);
|
||||
$properties[] = array ('Server IP Address',$this->lookup( $ip ),$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_SERVER_IP') ,$this->lookup( $ip ),$sysSection
|
||||
);
|
||||
$properties[] = array ('PHP Version',phpversion(),$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_PHP_VERSION') ,phpversion(),$sysSection
|
||||
);
|
||||
|
||||
if (defined( "DB_HOST" )) {
|
||||
$properties[] = array ('Data Base',$dbNetView->dbName( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')',$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,$dbNetView->dbName( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')',$pmSection
|
||||
);
|
||||
$properties[] = array ('Data Base Server',DB_HOST,$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,DB_HOST,$pmSection
|
||||
);
|
||||
$properties[] = array ('Data Base Name',DB_NAME,$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,DB_NAME,$pmSection
|
||||
);
|
||||
$properties[] = array ('Available DB Engines',$availdb,$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,$availdb,$sysSection
|
||||
);
|
||||
} else {
|
||||
$properties[] = array ('Data Base',"Not defined",$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,"Not defined",$pmSection
|
||||
);
|
||||
$properties[] = array ('Data Base Server',"Not defined",$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,"Not defined",$pmSection
|
||||
);
|
||||
$properties[] = array ('Data Base Name',"Not defined",$pmSection
|
||||
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,"Not defined",$pmSection
|
||||
);
|
||||
$properties[] = array ('Available DB Engines',"Not defined",$sysSection
|
||||
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,"Not defined",$sysSection
|
||||
);
|
||||
}
|
||||
|
||||
$properties[] = array ('Workspace',defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
|
||||
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
|
||||
);
|
||||
|
||||
$properties[] = array ('Server Protocol',getenv( 'SERVER_PROTOCOL' ),$sysSection
|
||||
$properties[] = array ( G::LoadTranslation('ID_SERVER_PROTOCOL') ,getenv( 'SERVER_PROTOCOL' ),$sysSection
|
||||
);
|
||||
$properties[] = array ('Server Port',getenv( 'SERVER_PORT' ),$sysSection
|
||||
$properties[] = array ( G::LoadTranslation('ID_SERVER_PORT') ,getenv( 'SERVER_PORT' ),$properties
|
||||
);
|
||||
//$properties[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
|
||||
$properties[] = array ('Server Addr.',getenv( 'SERVER_ADDR' ),$sysSection
|
||||
//$sysSection[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
|
||||
$properties[] = array ( G::LoadTranslation('ID_SERVER_NAME') , getenv( 'SERVER_ADDR' ),$sysSection
|
||||
);
|
||||
$properties[] = array ('User\'s Browser',getenv( 'HTTP_USER_AGENT' ),$sysSection
|
||||
$properties[] = array ( G::LoadTranslation('ID_USER_BROWSER') , getenv( 'HTTP_USER_AGENT' ),$sysSection
|
||||
);
|
||||
|
||||
return $properties;
|
||||
|
||||
@@ -29,3 +29,7 @@ dbInfo.application = {
|
||||
|
||||
Ext.onReady(dbInfo.application.init, dbInfo.application);
|
||||
|
||||
|
||||
function showUpgradedLogs() {
|
||||
window.location = '../../uxmodern/main/screamFileUpgrades';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user