Skip to content

Commit

Permalink
Make registration process contingent on PLus vs CE to accommodate aut…
Browse files Browse the repository at this point in the history
…omatic CE -> Plus merging
  • Loading branch information
sbeaver-netgate committed Jan 11, 2022
1 parent b8fd055 commit 5895065
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/usr/local/pfSense/include/www/system_register.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ $idfile = "/var/db/uniqueid";
function activate_plus($action, $token) {
global $g, $FQDN, $idfile;

$product = (strpos($g['product_label'], 'Plus') === false) ? "CE":"Plus";

if (file_exists($idfile)) {
if (function_exists('curl_version')) {
$post = ['act' => $action, 'uid' => file_get_contents($idfile), 'token' => $token, 'product' => "CE"];
$post = ['act' => $action, 'uid' => file_get_contents($idfile), 'token' => $token, 'product' => $product];
$url = $FQDN;

$ch = curl_init();
Expand Down
8 changes: 6 additions & 2 deletions src/usr/local/www/head.inc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ $system_menu[] = array(gettext("Package Manager"), "/pkg_mgr_installed.php");
$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml");
$system_menu[] = array(gettext("Routing"), "/system_gateways.php");
$system_menu[] = array(gettext("Cert. Manager"), "/system_camanager.php");
$system_menu[] = array(gettext("Register"), "/system_register.php");
if (strpos($g['product_label'], 'Plus') === false) {
$system_menu[] = array(gettext("Register"), "/system_register.php");
}

if (!isAllowedPage("system_usermanager.php")) {
$system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php");
Expand Down Expand Up @@ -437,7 +439,9 @@ if (!$g['disablehelpmenu']) {
$help_menu[] = array(gettext("pfSense Book"), "https://redirects.netgate.com/book");
$help_menu[] = array(gettext("FreeBSD Handbook"), "https://redirects.netgate.com/fbsdhandbook");
$help_menu[] = array(gettext("User survey"), "https://redirects.netgate.com/survey_1");
$help_menu[] = array(gettext("Upgrade to pfSense Plus"), "https://redirects.netgate.com/upgrade");
if (strpos($g['product_label'], 'Plus') === false) {
$help_menu[] = array(gettext("Upgrade to pfSense Plus"), "https://redirects.netgate.com/upgrade");
}
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")), 0);
}

Expand Down

0 comments on commit 5895065

Please sign in to comment.