summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2012-04-26 19:47:57 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2012-04-26 19:47:57 -0600
commitc5d8b1f44120761b0919882d86dbf2460aa72671 (patch)
treeb9120b2d9a8981f5a35e008965915b2b9e133b44
parentf122c1a3d7e482073b12e705b90d3f7dc29930ab (diff)
downloadpfsense-c5d8b1f44120761b0919882d86dbf2460aa72671.zip
pfsense-c5d8b1f44120761b0919882d86dbf2460aa72671.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.
-rwxr-xr-xtmp/post_upgrade_command.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php
index 9a273cf..00172b2 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");
}
OpenPOWER on IntegriCloud