mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use !empty instead of isset to prevent accidental deletion of the last used repository URL when firmware update gitsync settings have been saved without a repository URL.
This commit is contained in:
parent
f2ff5c8b7a
commit
eb2d95f9ba
@ -7,9 +7,9 @@
|
||||
require_once("functions.inc");
|
||||
|
||||
if(file_exists("/usr/local/bin/git") && isset($config['system']['gitsync']['synconupgrade'])) {
|
||||
if(isset($config['system']['gitsync']['repositoryurl']))
|
||||
if(!empty($config['system']['gitsync']['repositoryurl']))
|
||||
exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url " . escapeshellarg($config['system']['gitsync']['repositoryurl']));
|
||||
if(isset($config['system']['gitsync']['branch']))
|
||||
if(!empty($config['system']['gitsync']['branch']))
|
||||
system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading");
|
||||
}
|
||||
|
||||
@ -25,4 +25,4 @@
|
||||
if(file_exists($filename))
|
||||
exec("/bin/rm -f $filename");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user