mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Run git as the configured user when ./validate.php is run as root
Move the modified files check out of the get_version function
This commit is contained in:
		@@ -1039,10 +1039,6 @@ function version_info($remote=true) {
 | 
			
		||||
    $output['local_sha']    = rtrim(`git rev-parse HEAD`);
 | 
			
		||||
    $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
 | 
			
		||||
 | 
			
		||||
    exec('git diff --name-only --exit-code', $cmdoutput, $code);
 | 
			
		||||
    $output['git_modified'] = ($code !== 0);
 | 
			
		||||
    $output['git_modified_files'] = $cmdoutput;
 | 
			
		||||
 | 
			
		||||
    $output['db_schema']   = dbFetchCell('SELECT version FROM dbSchema');
 | 
			
		||||
    $output['php_ver']     = phpversion();
 | 
			
		||||
    $output['mysql_ver']   = dbFetchCell('SELECT version()');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user