diff --git a/gitea-updater.php b/gitea-updater.php index 267f594..d1901a7 100644 --- a/gitea-updater.php +++ b/gitea-updater.php @@ -3,7 +3,7 @@ * Plugin Name: Gitea Updater * Plugin URI: http://www.paucapo.com * Description: Plugins updater - * Version: 0.3.3 + * Version: 0.3.4 * Author: Pau Capó * Author URI: http://www.paucapo.com * Text Domain: gitea @@ -11,12 +11,6 @@ * Gitea URI: wp/gitea-updater */ -/* - # TODO: - ** branches? -*/ - - defined('ABSPATH') or exit; @@ -44,7 +38,7 @@ class Gitea_Updater function __construct() { - $this->site = urlencode(str_replace(array('http://', 'https://'), '', get_site_url())); + $this->site = str_replace(array('http://', 'https://'), '', get_site_url()); add_action('plugins_loaded', array($this, 'plugins_loaded')); @@ -87,12 +81,12 @@ class Gitea_Updater { // disable cache in case of a force-check from admin site if (isset($_GET['force-check'])) { - return true; + $this->cache = 30; } // small hack for multiple checks when asked throw IWP foreach ($_POST as $key => $value) { if (substr($key, 0, 5) == '_IWP_') { - $this->cache = 30; + $this->cache = 300; } } $last_update = get_option('gitea_' . $type . '_updated');