mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Merge branch 'master' of https://github.com/slawkens/myaac
This commit is contained in:
commit
d4900eac84
@ -45,11 +45,15 @@ if(isset($_REQUEST['uninstall'])){
|
|||||||
if(!file_exists($filename)) {
|
if(!file_exists($filename)) {
|
||||||
error('Plugin ' . $uninstall . ' does not exist.');
|
error('Plugin ' . $uninstall . ' does not exist.');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if(!isset($plugin_info['uninstall'])) {
|
||||||
|
error("Plugin doesn't have uninstall options defined. Skipping...");
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$string = file_get_contents($filename);
|
$string = file_get_contents($filename);
|
||||||
$plugin_info = json_decode($string, true);
|
$plugin_info = json_decode($string, true);
|
||||||
if($plugin_info == false) {
|
if($plugin_info == false) {
|
||||||
warning('Cannot load plugin info ' . $uninstall . '.json');
|
error('Cannot load plugin info ' . $uninstall . '.json');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$success = true;
|
$success = true;
|
||||||
@ -72,6 +76,7 @@ if(isset($_REQUEST['uninstall'])){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(isset($_FILES["plugin"]["name"]))
|
else if(isset($_FILES["plugin"]["name"]))
|
||||||
{
|
{
|
||||||
$file = $_FILES["plugin"];
|
$file = $_FILES["plugin"];
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
<td>{{ plugin.version }}</td>
|
<td>{{ plugin.version }}</td>
|
||||||
<td>{{ plugin.author }}</td>
|
<td>{{ plugin.author }}</td>
|
||||||
<td>{{ plugin.contact }}</td>
|
<td>{{ plugin.contact }}</td>
|
||||||
<td><a href="?p=plugins&uninstall={{ plugin.file }}" onclick="return confirm('Are you sure?');">Uninstall</a></td>
|
<td>
|
||||||
|
{% if plugin.uninstall %}
|
||||||
|
<a href="?p=plugins&uninstall={{ plugin.file }}" onclick="return confirm('Are you sure?');">Uninstall</a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
Loading…
x
Reference in New Issue
Block a user