summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-09-27 09:10:40 -0400
committerjim-p <jimp@pfsense.org>2012-09-27 09:18:22 -0400
commit7a058f067eb1b7216eace85aa12d2eaaacf443d2 (patch)
treebb91d0456b6a0517a0b34b4b67045c03192165d7 /usr/local/www
parent96f7a687af3b826c4e23150291e5d0c8ea1073a1 (diff)
downloadpfsense-7a058f067eb1b7216eace85aa12d2eaaacf443d2.zip
pfsense-7a058f067eb1b7216eace85aa12d2eaaacf443d2.tar.gz
Add option to disable the dashboard auto-update check
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/system_firmware_settings.php21
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php19
2 files changed, 30 insertions, 10 deletions
diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php
index 5792a2e..34849d1 100755
--- a/usr/local/www/system_firmware_settings.php
+++ b/usr/local/www/system_firmware_settings.php
@@ -50,12 +50,17 @@ if ($_POST) {
unset($config['system']['firmware']['alturl']['enable']);
unset($config['system']['firmware']['alturl']['firmwareurl']);
unset($config['system']['firmware']['alturl']);
- unset($config['system']['firmware']);
+ unset($config['system']['firmware']);
}
if($_POST['allowinvalidsig'] == "yes")
- $config['system']['firmware']['allowinvalidsig'] = true;
- else
- unset($config['system']['firmware']['allowinvalidsig']);
+ $config['system']['firmware']['allowinvalidsig'] = true;
+ else
+ unset($config['system']['firmware']['allowinvalidsig']);
+
+ if($_POST['disablecheck'] == "yes")
+ $config['system']['firmware']['disablecheck'] = true;
+ else
+ unset($config['system']['firmware']['disablecheck']);
if($_POST['synconupgrade'] == "yes")
$config['system']['gitsync']['synconupgrade'] = true;
@@ -166,6 +171,14 @@ function enable_altfirmwareurl(enable_over) {
<?=gettext("Allow auto-update firmware images with a missing or invalid digital signature to be used."); ?>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dashboard check"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="disablecheck" type="checkbox" id="disablecheck" value="yes" <?php if (isset($curcfg['disablecheck'])) echo "checked"; ?> />
+ <br />
+ <?=gettext("Disable the automatic dashboard auto-update check."); ?>
+ </td>
+ </tr>
<?php if(file_exists("/usr/local/bin/git") && $g['platform'] == "pfSense"): ?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index f057866..2a7055d 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -38,6 +38,9 @@ require_once("guiconfig.inc");
require_once('notices.inc');
if($_REQUEST['getupdatestatus']) {
+ if(isset($config['system']['firmware']['disablecheck'])) {
+ exit;
+ }
if(isset($config['system']['firmware']['alturl']['enable']))
$updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
else
@@ -93,9 +96,11 @@ $curcfg = $config['system']['firmware'];
(<?php echo php_uname("m"); ?>)
<br />
built on <?php readfile("/etc/version.buildtime"); ?>
- <br />
- <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
- <div id='updatestatus'><br/>Obtaining update status...</div>
+ <br />
+ <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
+ <div id='updatestatus'><br/><?php echo gettext("Obtaining update status"); ?> ...</div>
+ <?php endif; ?>
</td>
</tr>
<?php if(!$g['hideplatform']): ?>
@@ -248,6 +253,10 @@ $curcfg = $config['system']['firmware'];
</tbody>
</table>
<script type="text/javascript">
+ function swapuname() {
+ jQuery('#uname').html("<?php echo php_uname("a"); ?>");
+ }
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
function getstatus() {
scroll(0,0);
var url = "/widgets/widgets/system_information.widget.php";
@@ -265,8 +274,6 @@ $curcfg = $config['system']['firmware'];
// to avoid this we set the innerHTML property
jQuery('#updatestatus').prop('innerHTML',transport.responseText);
}
- function swapuname() {
- jQuery('#uname').html("<?php echo php_uname("a"); ?>");
- }
setTimeout('getstatus()', 4000);
+ <?php endif; ?>
</script>
OpenPOWER on IntegriCloud