From 2a39783e6cc9c51dbbf499e4a5e2671b3061308f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Wed, 15 Mar 2017 15:43:21 +0100 Subject: [PATCH] bugfix new install and new_version --- gitea-updater.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitea-updater.php b/gitea-updater.php index 8a0497c..c632f00 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.1.1 + * Version: 0.2 * Author: Pau Capó * Author URI: http://www.paucapo.com * Text Domain: gitea @@ -58,6 +58,9 @@ class Gitea_Updater { function plugins_loaded() { load_plugin_textdomain('gitea', FALSE, basename( dirname( __FILE__ ) ) . '/languages/'); + + if (!get_option('gitea_plugins') || !get_option('gitea_plugins')) + $this->get_all(); } function get_all() { @@ -84,8 +87,8 @@ class Gitea_Updater { $url = $this->get_url($host, $repo, '/raw/master/'.$file); if ($url != false) { $new_version = $this->get_version($url, 'plugin'); - $new_version = $new_version ? $new_version : $local_version; } + $new_version = $new_version ? $new_version : $local_version; // here we have the remote version from gitea/repo/plugin_file