summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2012-04-26 19:47:57 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2012-04-27 02:30:10 -0600
commiteb2d95f9ba2fbdaf19a379241ab59d6f92ac6439 (patch)
tree9ce48bd92de7087ce0f7a5bafe34f57e93851aba /tmp
parentf2ff5c8b7ac78204ebfe29aa4f928ff3b2e14e4d (diff)
downloadpfsense-eb2d95f9ba2fbdaf19a379241ab59d6f92ac6439.zip
pfsense-eb2d95f9ba2fbdaf19a379241ab59d6f92ac6439.tar.gz
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.
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/post_upgrade_command.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php
index a188710..dc2a44e 100755
--- a/tmp/post_upgrade_command.php
+++ b/tmp/post_upgrade_command.php
@@ -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");
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud