Skip to content

Commit

Permalink
Version 5.13.1
Browse files Browse the repository at this point in the history
* [fix] Unfiltered HTML indicator reversed in Maintenance
* [fix] Missing _nonce value for maintenance functions
  • Loading branch information
adegans committed Jul 13, 2024
1 parent 1f22feb commit f0fd67f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 723 deletions.
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

11 changes: 0 additions & 11 deletions adrotate-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,6 @@ function adrotate_select_pages($saved, $count = 2, $child_of = 0, $parent = 0) {
}
}

/*-------------------------------------------------------------
Name: adrotate_prepare_evaluate_ads
Purpose: Initiate automated evaluations for errors and determine the ad status and return to a dashboard
-------------------------------------------------------------*/
function adrotate_prepare_evaluate_ads() {
// Verify all ads
adrotate_evaluate_ads();

adrotate_return('adrotate-settings', 405, array('tab' => 'maintenance'));
}

/*-------------------------------------------------------------
Name: adrotate_evaluate_ads
Purpose: Initiate evaluations for errors and determine the ad status
Expand Down
2 changes: 0 additions & 2 deletions adrotate-admin-manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,6 @@ function adrotate_request_action() {
}
}
}
// Verify all ads
adrotate_prepare_evaluate_ads(false);
}

if($group_ids != '') {
Expand Down
11 changes: 7 additions & 4 deletions adrotate.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author URI: https://www.arnan.me/?mtm_campaign=adrotate&mtm_keyword=plugin_info
Description: Manage all your adverts with all the features you need while keeping things simple.
Text Domain: adrotate
Version: 5.13
Version: 5.13.1
License: GPLv3
*/

Expand Down Expand Up @@ -76,7 +76,6 @@
include_once($adrotate_path.'/adrotate-admin-statistics.php');
include_once($adrotate_path.'/adrotate-admin-portability.php');

adrotate_check_config();
/*--- Dashboard hooks ---------------------------------------*/
add_action('admin_menu', 'adrotate_dashboard');
add_action('admin_enqueue_scripts', 'adrotate_dashboard_scripts');
Expand All @@ -91,7 +90,6 @@
if(isset($_POST['adrotate_create_folder'])) add_action('init', 'adrotate_insert_folder');
if(isset($_POST['adrotate_action_submit'])) add_action('init', 'adrotate_request_action');
if(isset($_POST['adrotate_save_options'])) add_action('init', 'adrotate_options_submit');
if(isset($_POST['adrotate_evaluate_all_ads'])) add_action('init', 'adrotate_prepare_evaluate_ads');
}

/*-------------------------------------------------------------
Expand Down Expand Up @@ -479,7 +477,12 @@ function adrotate_options() {

$action = (isset($_GET['action'])) ? sanitize_key($_GET['action']) : '';

if(isset($_GET['adrotate-nonce']) AND wp_verify_nonce($_GET['adrotate-nonce'], 'nonce')) {
if(isset($_GET['adrotate-nonce']) AND wp_verify_nonce($_GET['adrotate-nonce'], 'maintenance')) {
if($action == 'check-all-ads') {
adrotate_evaluate_ads();
$status = 405;
}

if($action == 'update-db') {
adrotate_finish_upgrade();
$status = 409;
Expand Down
10 changes: 6 additions & 4 deletions dashboard/settings/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<tr>
<th valign="top"><?php _e("Check adverts", 'adrotate'); ?></th>
<td>
<input type="submit" id="post-role-submit" name="adrotate_evaluate_all_ads" value="<?php _e("Check all adverts for configuration errors", 'adrotate'); ?>" class="button-secondary" onclick="return confirm('<?php _e("You are about to check all adverts for errors.", 'adrotate'); ?>\n\n<?php _e("This might take a few seconds!", 'adrotate'); ?>\n\n<?php _e("OK to continue, CANCEL to stop.", 'adrotate'); ?>')" />
<a class="button" href="<?php echo wp_nonce_url(admin_url('admin.php?page=adrotate-settings&tab=maintenance&action=check-all-ads'), 'maintenance', 'adrotate-nonce'); ?>" onclick="return confirm('<?php _e("You are about to check all adverts for errors.", 'adrotate'); ?>\n\n<?php _e("This might take a few seconds!", 'adrotate'); ?>\n\n<?php _e("OK to continue, CANCEL to stop.", 'adrotate'); ?>')"><?php _e("Check all adverts for configuration errors", 'adrotate'); ?></a>
<br /><br />
<span class="description"><?php _e("Apply all evaluation rules to all adverts to see if any error slipped in. This may take a few seconds.", 'adrotate'); ?></span>
</td>
Expand Down Expand Up @@ -52,7 +52,7 @@
<th width="15%"><?php _e("Unfiltered HTML", 'adrotate'); ?></th>
<td colspan="3">
<?php
if(defined('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML) {
if(defined('DISALLOW_UNFILTERED_HTML') && !DISALLOW_UNFILTERED_HTML) {
echo "<span style=\"color:#009900;\">".__("Allowed", 'adrotate')."</span>";
} else {
echo "<span style=\"color:#CC2900;\">".__("Your website's current setup does not allow for unfiltered code to be used in adverts.", 'adrotate')."</span><br />".__("This is required for javascript adverts to work. To enable this you need to set the DISALLOW_UNFILTERED_HTML definition to 'true' in your wp-config.php file.", 'adrotate')." <a href=\"https://ipstack.com/product\" target=\"_blank\">".__("More info", 'adrotate')."</a>";
Expand All @@ -69,7 +69,7 @@
<tr>
<th valign="top"><?php _e("Background tasks", 'adrotate'); ?></th>
<td colspan="3">
<a class="button" href="<?php echo wp_nonce_url('admin.php?page=adrotate-settings&tab=maintenance&action=reset-tasks', 'nonce', 'adrotate-nonce'); ?>"><?php _e("Reset background tasks", 'adrotate'); ?></a>
<a class="button" href="<?php echo wp_nonce_url(admin_url('admin.php?page=adrotate-settings&tab=maintenance&action=reset-tasks'), 'maintenance', 'adrotate-nonce'); ?>"><?php _e("Reset background tasks", 'adrotate'); ?></a>

<br /><br />
<span class="description"><em><?php _e("If automated tasks such as expiring adverts does not work reliable or one of the above schedules is missing use this button to reset the tasks.", 'adrotate'); ?></em></span>
Expand Down Expand Up @@ -102,15 +102,17 @@
<br /><?php echo __("Previous:", 'adrotate')." ".$adrotate_db_version['previous']; ?>
</td>
</tr>
<?php if($adrotate_db_version['current'] < ADROTATE_DB_VERSION OR $adrotate_version['current'] < ADROTATE_VERSION) { ?>
<tr>
<th valign="top"><?php _e("Manual upgrade", 'adrotate'); ?></th>
<td colspan="3">
<a class="button" href="<?php echo wp_nonce_url('admin.php?page=adrotate-settings&tab=maintenance&action=update-db', 'nonce', 'adrotate-nonce'); ?>"><?php _e("Run updater manually", 'adrotate'); ?></a>
<a class="button" href="<?php echo wp_nonce_url(admin_url('admin.php?page=adrotate-settings&tab=maintenance&action=update-db'), 'maintenance', 'adrotate-nonce'); ?>"><?php _e("Run updater manually", 'adrotate'); ?></a>

<br /><br />
<span class="description"><em><?php _e("If the automatic update for some reason doesn't complete. Or you notice that the above versions are mismatched you can update the database and settings using this button.", 'adrotate'); ?></em></span>
</td>
</tr>
<?php } ?>
</table>

</form>
27 changes: 0 additions & 27 deletions readme.md

This file was deleted.

6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: ads, banner manager, adsense, advert, banners
Requires at least: 4.9
Requires PHP: 7.4
Tested up to: 6.6
Stable tag: 5.13
Stable tag: 5.13.1
License: GPLv3

Advertising made easy. Manage all your ads including Google Ads, Amazon banners and many more from your dashboard.
Expand Down Expand Up @@ -104,6 +104,10 @@ For more detailed instructions check out the [installation steps](https://ajdg.s

For the full changelog check out the [development page](https://ajdg.solutions/support/adrotate-development/?mtm_campaign=adrotate&mtm_kwd=readme).

= AdRotate 5.13.1 =
* [fix] Unfiltered HTML indicator reversed in Maintenance
* [fix] Missing _nonce value for maintenance functions

= AdRotate 5.13 =
* [new] Upload webp banner images through the media manager
* [security] Low level users can no longer access the dashboard
Expand Down

0 comments on commit f0fd67f

Please sign in to comment.