Option to hide webmin and module updates
authorJamie Cameron <jcameron@webmin.com>
Sat, 30 Apr 2011 22:46:36 +0000 (15:46 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sat, 30 Apr 2011 22:46:36 +0000 (15:46 -0700)
webmin/CHANGELOG
webmin/change_startpage.cgi
webmin/edit_startpage.cgi
webmin/lang/en
webmin/webmin-lib.pl

index 4466418..778c2cf 100644 (file)
@@ -103,3 +103,5 @@ Added an option to the User Interface page to always put the hostname before the
 Strong PCI-compliant ciphers can now be selected on the SSL Encryption page.
 ---- Changes since 1.540 ----
 Added the Sending Email page which controls how Webmin itself sends messages.
+---- Changes since 1.550 ----
+Added fields to the Index Page Options page to control the display of Webmin and module updates.
index 030b4d9..1ace61e 100755 (executable)
@@ -18,6 +18,8 @@ $gconfig{'gotoone'} = $in{'gotoone'};
 $gconfig{'deftab'} = $in{'deftab'};
 $gconfig{'nohostname'} = $in{'nohostname'};
 $gconfig{'gotomodule'} = $in{'gotomodule'};
+$gconfig{'nowebminup'} = !$in{'webminup'};
+$gconfig{'nomoduleup'} = !$in{'moduleup'};
 &write_file("$config_directory/config", \%gconfig);
 &unlock_file("$config_directory/config");
 &webmin_log("startpage", undef, undef, \%in);
index 58d94e8..4962a27 100755 (executable)
@@ -8,7 +8,7 @@ require './webmin-lib.pl';
 print $text{'startpage_intro2'},"<p>\n";
 
 print &ui_form_start("change_startpage.cgi", "post");
-print &ui_table_start($text{'startpage_title'}, undef, 2, [ "width=30%" ]);
+print &ui_table_start($text{'startpage_title'}, undef, 2);
 
 print &ui_table_row($text{'startpage_nocol'},
        &ui_opt_textbox("nocols", $gconfig{'nocols'}, 5, $text{'default'}));
@@ -37,6 +37,12 @@ print &ui_table_row($text{'startpage_gotomodule'},
                  map { [ $_->{'dir'}, $_->{'desc'} ] }
                      sort { $a->{'desc'} cmp $b->{'desc'} } @modules ]));
 
+print &ui_table_row($text{'startpage_webminup'},
+       &ui_yesno_radio("webminup", !$gconfig{'nowebminup'}));
+
+print &ui_table_row($text{'startpage_moduleup'},
+       &ui_yesno_radio("moduleup", !$gconfig{'nomoduleup'}));
+
 print &ui_table_end();
 print &ui_form_end([ [ "", $text{'save'} ] ]);
 
index 49a7994..5685cbe 100644 (file)
@@ -393,6 +393,8 @@ startpage_deftab=Default category
 startpage_nohost=Show version, hostname and OS in title?
 startpage_gotonone=&lt;None&gt;
 startpage_gotomodule=After login, always go to module
+startpage_webminup=Show Webmin updates on System Information page?
+startpage_moduleup=Show module updates on System Information page?
 
 upgrade_title=Upgrade Webmin
 upgrade_desc=This form allows you to upgrade your entire Webmin installation to a new version. You can install from a local file, an uploaded file or from the latest version at <a href=http://www.webmin.com/>www.webmin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
index 00d01d6..8a4f323 100755 (executable)
@@ -1145,7 +1145,8 @@ if (&foreign_check("acl")) {
 
 # New Webmin version is available, but only once per day
 my $now = time();
-if (&foreign_available($module_name) && !$noupdates) {
+if (&foreign_available($module_name) && !$noupdates &&
+    !$gconfig{'nowebminup'}) {
        if (!$config{'last_version_check'} ||
             $now - $config{'last_version_check'} > 24*60*60) {
                # Cached last version has expired .. re-fetch
@@ -1179,7 +1180,8 @@ if (&foreign_available($module_name) && !$noupdates) {
        }
 
 # Webmin module updates
-if (&foreign_available($module_name) && !$noupdates) {
+if (&foreign_available($module_name) && !$noupdates &&
+    !$gconfig{'nomoduleup'}) {
        my @st = stat($update_cache);
        my $allupdates = [ ];
        my @urls = $config{'upsource'} ?