]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - api/plugin.php
Hopefully the finish of the upgrade function
[irc/unrealircd/unrealircd-webpanel.git] / api / plugin.php
index 11a37108816314cedd7ffdf6731e60b90bd3cde8..3896e186532beb96318f107a6f27d2a7e7124ceb 100644 (file)
@@ -5,8 +5,6 @@ if (!isset($_SESSION['id']))
     die("Access denied");
 require_once('common_api.php');
 
-header("Content-type: application/json; charset=utf-8");
-
 if (!current_user_can(PERMISSION_MANAGE_PLUGINS))
     die(json_encode(['error' => "Access denied"]));
 if (empty($_GET))
@@ -95,7 +93,8 @@ function install_plugin($name)
 function get_plugin_install_path_from_name($name)
 {
     global $config;
-    foreach($config['third-party-plugins']['data'] as $p)
+    $list = $config['third-party-plugins']['data']->list;
+    foreach($list as $p)
     {
         if (!strcmp($p->name,$name))
             return $p->download_link;