added todo
This commit is contained in:
parent
8640dc3c05
commit
d44f406933
@ -380,7 +380,7 @@ class PluginManager {
|
||||
* @param mixed $pluginClass
|
||||
* @return string
|
||||
*/
|
||||
private static function getPluginClass($pluginClass) {
|
||||
public static function getPluginClass($pluginClass) {
|
||||
if (is_object($pluginClass)) {
|
||||
$pluginClass = get_class($pluginClass);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ use ManiaControl\Players\Player;
|
||||
/**
|
||||
* Configurator for enabling and disabling Plugins
|
||||
*
|
||||
* @author steeffeen
|
||||
* @author ManiaControl Team
|
||||
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@ use ManiaControl\Players\PlayerManager;
|
||||
use ManiaControl\Plugins\Plugin;
|
||||
use ManiaControl\Plugins\PluginInstallMenu;
|
||||
use ManiaControl\Plugins\PluginMenu;
|
||||
use ManiaControl\Plugins\PluginManager;
|
||||
|
||||
/**
|
||||
* Manager checking for ManiaControl Core and Plugin Updates
|
||||
@ -430,15 +431,14 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
||||
* @return mixed
|
||||
*/
|
||||
public function checkPluginUpdate($pluginClass) {
|
||||
if (is_object($pluginClass)) {
|
||||
$pluginClass = get_class($pluginClass);
|
||||
}
|
||||
$pluginClass = PluginManager::getPluginClass($pluginClass);
|
||||
/**
|
||||
*
|
||||
* @var Plugin $pluginClass
|
||||
*/
|
||||
$pluginId = $pluginClass::getId();
|
||||
$url = ManiaControl::URL_WEBSERVICE . 'plugins?id=' . $pluginId;
|
||||
// TODO: asynchronous loading
|
||||
$dataJson = FileUtil::loadFile($url);
|
||||
$pluginVersions = json_decode($dataJson);
|
||||
if (!$pluginVersions || !isset($pluginVersions[0])) {
|
||||
|
Loading…
Reference in New Issue
Block a user