diff --git a/web/includes/actions/donate.php b/web/includes/actions/donate.php index cfd60c8f0..b8659b269 100644 --- a/web/includes/actions/donate.php +++ b/web/includes/actions/donate.php @@ -25,24 +25,20 @@ if ( !canEdit('System') ) { if ( $action == 'donate' && isset($_REQUEST['option']) ) { $option = $_REQUEST['option']; - switch( $option ) { + $nextReminder = time(); + + switch ( $option ) { case 'go' : - // Ignore this, the caller will open the page itself - break; + // Ignore this, the caller will open the page itself, use a return to shortut the view=none + return; case 'hour' : + $nextReminder += 60*60; case 'day' : + $nextReminder += 24*60*60; case 'week' : + $nextReminder += 7*24*60*60; case 'month' : - $nextReminder = time(); - if ( $option == 'hour' ) { - $nextReminder += 60*60; - } elseif ( $option == 'day' ) { - $nextReminder += 24*60*60; - } elseif ( $option == 'week' ) { - $nextReminder += 7*24*60*60; - } elseif ( $option == 'month' ) { - $nextReminder += 30*24*60*60; - } + $nextReminder += 30*24*60*60; dbQuery("UPDATE Config SET Value = '".$nextReminder."' WHERE Name = 'ZM_DYN_DONATE_REMINDER_TIME'"); break; case 'never' : diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index bdef6d4dd..8356c5d7d 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -98,8 +98,8 @@ function getPopupSize( tag, width, height ) { return popupSize; } -function zmWindow() { - var zmWin = window.open( 'http://www.zoneminder.com', 'ZoneMinder' ); +function zmWindow(sub_url) { + var zmWin = window.open( 'https://www.zoneminder.com'+sub_url, 'ZoneMinder' ); if ( ! zmWin ) { // if popup blocking is enabled, the popup won't be defined. console.log("Please disable popup blocking."); diff --git a/web/skins/classic/views/donate.php b/web/skins/classic/views/donate.php index 456fc1e47..6cf873bd4 100644 --- a/web/skins/classic/views/donate.php +++ b/web/skins/classic/views/donate.php @@ -24,13 +24,13 @@ if ( !canEdit('System') ) { } $options = array( - "go" => translate('DonateYes'), - "hour" => translate('DonateRemindHour'), - "day" => translate('DonateRemindDay'), - "week" => translate('DonateRemindWeek'), - "month" => translate('DonateRemindMonth'), - "never" => translate('DonateRemindNever'), - "already" => translate('DonateAlready'), + 'go' => translate('DonateYes'), + 'hour' => translate('DonateRemindHour'), + 'day' => translate('DonateRemindDay'), + 'week' => translate('DonateRemindWeek'), + 'month' => translate('DonateRemindMonth'), + 'never' => translate('DonateRemindNever'), + 'already' => translate('DonateAlready'), ); $focusWindow = true; diff --git a/web/skins/classic/views/js/donate.js b/web/skins/classic/views/js/donate.js index 0cfb42fae..eb3c25f50 100644 --- a/web/skins/classic/views/js/donate.js +++ b/web/skins/classic/views/js/donate.js @@ -1,3 +1,3 @@ -if ( action == "donate" && option == "go" ) { - zmWindow(); +if ( action == 'donate' && option == 'go' ) { + zmWindow('/donate/'); }