From dad0250e5a8d9e9d51509147ba0815da764bfa78 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Sat, 4 Jun 2011 15:55:15 +0200 Subject: [PATCH] #2: trying to implement a semaphore with wp_options... --- wordpress/plugins/owark/owark.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wordpress/plugins/owark/owark.php b/wordpress/plugins/owark/owark.php index 14055b4..b64bbb7 100644 --- a/wordpress/plugins/owark/owark.php +++ b/wordpress/plugins/owark/owark.php @@ -460,6 +460,13 @@ if (!class_exists("Owark")) { * */ public static function schedule($occurrences) { + + $archiving = get_option( 'owark_archiving', false); + if (! $archiving) { + update_option('owark_archiving', true); + } else { + return; + } global $wpdb; $query = "SELECT DISTINCT final_url from {$wpdb->prefix}blc_links @@ -490,6 +497,7 @@ if (!class_exists("Owark")) { } } + delete_option('owark_archiving'); }