/** * Show main plugin screen: installed and uninstalled plugins, upload form * * @param string $message (optional) message to display * @param string $token an optional csrf token * @return string HTML for the plugin screen * */ function plugin_main($message = '', $token = '') { global $LANG32; $retval = ''; $retval .= COM_siteHeader('menu', $LANG32[5]); if (!empty($message)) { $retval .= COM_showMessageText($message); } else { $retval .= COM_showMessageFromParameter(); } if (empty($token)) { $token = SEC_createToken(); } $retval .= listplugins($token); if (SEC_hasRights('plugin.install')) { $retval .= show_newplugins($token); } // Show the upload form or an error message $retval .= plugin_show_uploadform($token); $retval .= COM_siteFooter(); return $retval; }
/** * Show main plugin screen: installed and uninstalled plugins, upload form * * @param string $message (optional) message to display * @return string HTML for the plugin screen * */ function plugin_main($message = '') { global $LANG32; $retval = ''; $retval .= COM_siteHeader('menu', $LANG32[5]); if (!empty($message)) { $retval .= COM_showMessageText($message); } else { $retval .= COM_showMessageFromParameter(); } $token = SEC_createToken(); $retval .= listplugins($token); if (SEC_hasRights('plugin.install')) { $retval .= show_newplugins($token); } // If the web server will allow the user to upload a plugin if (plugin_upload_enabled() && SEC_hasRights('plugin.install,plugin.upload')) { $retval .= plugin_show_uploadform($token); } $retval .= COM_siteFooter(); return $retval; }