public_html/admin/plugins.php
branchHEAD
changeset 7394 fdb273c78589
parent 7340 2f3460d4a1d3
child 7395 bb675c876cb9
     1.1 --- a/public_html/admin/plugins.php	Sun Sep 27 21:15:19 2009 +0200
     1.2 +++ b/public_html/admin/plugins.php	Mon Sep 28 22:20:30 2009 +0200
     1.3 @@ -1165,17 +1165,23 @@
     1.4  
     1.5  // MAIN
     1.6  $display = '';
     1.7 -if (isset($_POST['pluginenabler']) && SEC_checkToken()) {
     1.8 -    if (isset($_POST['enabledplugins'])) {
     1.9 -        changePluginStatus($_POST['enabledplugins']);
    1.10 -    } else {
    1.11 -        changePluginStatus(array());
    1.12 +if (isset($_POST['pluginenabler'])) { // JavaScript-triggered POST request
    1.13 +    if (isset($_POST['updatethisplugin'])) {
    1.14 +        // translate into a standard update request (see below)
    1.15 +        $_POST['mode'] = $LANG32[34];
    1.16 +        $_POST['pi_name'] = $_POST['updatethisplugin'];
    1.17 +    } elseif (SEC_checkToken()) {
    1.18 +        if (isset($_POST['enabledplugins'])) {
    1.19 +            changePluginStatus($_POST['enabledplugins']);
    1.20 +        } else {
    1.21 +            changePluginStatus(array());
    1.22 +        }
    1.23 +
    1.24 +        // force a refresh so that the information of the plugin that was just
    1.25 +        // enabled / disabled (menu entries, etc.) is displayed properly
    1.26 +        header('Location: ' . $_CONF['site_admin_url'] . '/plugins.php');
    1.27 +        exit;
    1.28      }
    1.29 -
    1.30 -    // force a refresh so that the information of the plugin that was just
    1.31 -    // enabled / disabled (menu entries, etc.) is displayed properly
    1.32 -    header('Location: ' . $_CONF['site_admin_url'] . '/plugins.php');
    1.33 -    exit;
    1.34  }
    1.35  
    1.36  $mode = '';