version and small fix

This commit is contained in:
Pau Capó 2017-03-15 16:45:47 +01:00
parent 0fc5b2677a
commit bf32f439e6

View file

@ -3,7 +3,7 @@
* Plugin Name: Gitea Updater * Plugin Name: Gitea Updater
* Plugin URI: http://www.paucapo.com * Plugin URI: http://www.paucapo.com
* Description: Plugins updater * Description: Plugins updater
* Version: 0.2.1 * Version: 0.2.2
* Author: Pau Capó * Author: Pau Capó
* Author URI: http://www.paucapo.com * Author URI: http://www.paucapo.com
* Text Domain: gitea * Text Domain: gitea
@ -92,7 +92,7 @@ class Gitea_Updater {
if ($url != false) { if ($url != false) {
$new_version = $this->get_version($url, 'plugin'); $new_version = $this->get_version($url, 'plugin');
} }
$new_version = $new_version ? $new_version : $local_version; $new_version = isset($new_version) && $new_version ? $new_version : $local_version;
// here we have the remote version from gitea/repo/plugin_file // here we have the remote version from gitea/repo/plugin_file