diff options
author | Renato Botelho <renato.botelho@bluepex.com> | 2010-06-23 08:18:19 -0300 |
---|---|---|
committer | Renato Botelho <renato.botelho@bluepex.com> | 2010-06-23 08:18:19 -0300 |
commit | 71f6dd50a0a711321ecf61f31d3d7db1205153cd (patch) | |
tree | 0770fbed24e8454b906bd91840ddf1f41dd46aa9 /usr/local/www | |
parent | 610d960ec988c76419742973e3339a1e9cf3bc22 (diff) | |
parent | dbe8c192179edaf68a7efbc0eae3c735be671df1 (diff) | |
download | pfsense-71f6dd50a0a711321ecf61f31d3d7db1205153cd.zip pfsense-71f6dd50a0a711321ecf61f31d3d7db1205153cd.tar.gz |
Merge remote branch 'mainline/master'
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/interfaces_ppps.php | 2 | ||||
-rwxr-xr-x | usr/local/www/system_firmware_auto.php | 16 | ||||
-rwxr-xr-x | usr/local/www/system_firmware_check.php | 11 | ||||
-rw-r--r-- | usr/local/www/system_usermanager.php | 12 |
4 files changed, 35 insertions, 6 deletions
diff --git a/usr/local/www/interfaces_ppps.php b/usr/local/www/interfaces_ppps.php index 5a6c306..e6d4880 100644 --- a/usr/local/www/interfaces_ppps.php +++ b/usr/local/www/interfaces_ppps.php @@ -88,7 +88,7 @@ include("head.inc"); $tab_array[2] = array("Wireless", false, "interfaces_wireless.php"); $tab_array[3] = array("VLANs", false, "interfaces_vlan.php"); $tab_array[4] = array("QinQs", false, "interfaces_qinq.php"); - $tab_array[5] = array("PPPs", false, "interfaces_ppps.php"); + $tab_array[5] = array("PPPs", true, "interfaces_ppps.php"); $tab_array[6] = array("GRE", false, "interfaces_gre.php"); $tab_array[7] = array("GIF", false, "interfaces_gif.php"); $tab_array[8] = array("Bridges", false, "interfaces_bridge.php"); diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php index d5b7cd5..48d727c 100755 --- a/usr/local/www/system_firmware_auto.php +++ b/usr/local/www/system_firmware_auto.php @@ -124,7 +124,12 @@ include("head.inc"); <?php update_status(gettext("Downloading current version information") . "..."); -download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version"); +$nanosize = ""; +if ($g['platform'] == "nanobsd") { + $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt"))); +} + +download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version"); $latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version")); if(!$latest_version) { update_output_window(gettext("Unable to check for updates.")); @@ -143,8 +148,13 @@ if(!$latest_version) { if (pfs_version_compare($current_installed_buildtime, $current_installed_version, $latest_version) == -1) { update_status(gettext("Downloading updates") . "..."); conf_mount_rw(); - $status = download_file_with_progress_bar("{$updater_url}/latest.tgz", "{$g['upload_path']}/latest.tgz", "read_body_firmware"); - $status = download_file_with_progress_bar("{$updater_url}/latest.tgz.sha256", "{$g['upload_path']}/latest.tgz.sha256"); + if ($g['platform'] == "nanobsd") { + $update_filename = "latest{$nanosize}.img.gz"; + } else { + $update_filename = "latest.tgz"; + } + $status = download_file_with_progress_bar("{$updater_url}/{$update_filename}", "{$g['upload_path']}/latest.tgz", "read_body_firmware"); + $status = download_file_with_progress_bar("{$updater_url}/{$update_filename}.sha256", "{$g['upload_path']}/latest.tgz.sha256"); conf_mount_ro(); update_output_window("{$g['product_name']} " . gettext("download complete.")); } else { diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php index 9eabe26..c676950 100755 --- a/usr/local/www/system_firmware_check.php +++ b/usr/local/www/system_firmware_check.php @@ -120,7 +120,13 @@ else $updater_url = $g['update_url']; $needs_system_upgrade = false; $static_text .= gettext("Downloading new version information..."); -download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version"); + +$nanosize = ""; +if ($g['platform'] == "nanobsd") { + $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt"))); +} + +download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version"); $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version")); $static_text .= gettext("done") . "\\n"; if (!$remote_version) { @@ -155,6 +161,9 @@ if ($needs_system_upgrade == false) { echo "\n<script>$('invokeupgrade').style.visibility = 'visible';</script>"; $txt = gettext("A new version is now available") . "\\n\\n"; $txt .= gettext("Current version") .": ". $current_installed_version . "\\n"; +if ($g['platform'] == "nanobsd") { + $txt .= " " . gettext("NanoBSD Size") . " : " . trim(file_get_contents("/etc/nanosize.txt")) . "\\n"; +} $txt .= " " . gettext("Built On") .": ". $current_installed_buildtime . "\\n"; $txt .= " " . gettext("New version") .": ". $remote_version . "\\n\\n"; $txt .= " " . gettext("Update source") .": ". $updater_url . "\\n"; diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php index c3da004..058046a 100644 --- a/usr/local/www/system_usermanager.php +++ b/usr/local/www/system_usermanager.php @@ -174,7 +174,6 @@ if (isAllowedPage("system_usermanager")) { } if ($_POST) { - conf_mount_rw(); unset($input_errors); $pconfig = $_POST; @@ -253,6 +252,7 @@ if (isAllowedPage("system_usermanager")) { } if (!$input_errors) { + conf_mount_rw(); $userent = array(); if (isset($id) && $a_user[$id]) $userent = $a_user[$id]; @@ -303,6 +303,16 @@ if (isAllowedPage("system_usermanager")) { $userent['cert'][] = $cert; } $userent['uid'] = $config['system']['nextuid']++; + /* Add the user to All Users group. */ + if (!is_array($config['system']['group']['member'])) + $config['system']['group']['member'] = array(); + foreach ($config['system']['group'] as $gidx => $group) { + if ($group['name'] == "all") { + $config['system']['group'][$gidx]['member'][] = $userent['uid']; + break; + } + } + $a_user[] = $userent; } |