diff --git a/web/includes/actions/privacy.php b/web/includes/actions/privacy.php index 99bbd7150..f3a805773 100644 --- a/web/includes/actions/privacy.php +++ b/web/includes/actions/privacy.php @@ -19,18 +19,18 @@ // if ( !canEdit('System') ) { - Warning("Need System permissions to update privacy"); + Warning('Need System permissions to update privacy'); return; } -if ( ($action == 'privacy') && isset($_REQUEST['option']) ) { - switch( $_REQUEST['option'] ) { - case 'decline' : +if ( ($action == 'privacy') && isset($_POST['option']) ) { + switch( $_POST['option'] ) { + case '0' : dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_SHOW_PRIVACY'"); dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_TELEMETRY_DATA'"); $redirect = '?view=console'; break; - case 'accept' : + case '1' : dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_SHOW_PRIVACY'"); dbQuery("UPDATE Config SET Value = '1' WHERE Name = 'ZM_TELEMETRY_DATA'"); $redirect = '?view=console'; diff --git a/web/skins/classic/views/js/privacy.js b/web/skins/classic/views/js/privacy.js deleted file mode 100644 index bbf17f864..000000000 --- a/web/skins/classic/views/js/privacy.js +++ /dev/null @@ -1,10 +0,0 @@ -function submitForm( element ) { - var form = element.form; - if ( form.option.selectedIndex == 0 ) { - form.view.value = currentView; - } else { - form.view.value = 'none'; - } - form.submit(); -} - diff --git a/web/skins/classic/views/privacy.php b/web/skins/classic/views/privacy.php index 21c0bdb59..d82e4327f 100644 --- a/web/skins/classic/views/privacy.php +++ b/web/skins/classic/views/privacy.php @@ -18,20 +18,19 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // -if ( !canEdit( 'System' ) ) -{ - $view = "error"; - return; +if ( !canEdit('System') ) { + $view = 'error'; + return; } $options = array( - "accept" => translate('Accept'), - "decline" => translate('Decline'), + '1' => translate('Accept'), + '0' => translate('Decline'), ); $focusWindow = true; -xhtmlHeaders(__FILE__, translate('Privacy') ); +xhtmlHeaders(__FILE__, translate('Privacy')); ?>