added todo

This commit is contained in:
Steffen Schröder 2014-05-01 23:32:58 +02:00
parent 8640dc3c05
commit d44f406933
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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
*/

View File

@ -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])) {