static function staticAction() { if (am4Request::$method != 'POST') { return; } if (!current_user_can('manage_options')) { return ''; } if (!check_admin_referer('am4MenuPageFormController')) { throw new Exception('Security check!'); } $options = get_magic_quotes_gpc() ? stripslashes_deep(am4Request::get('options')) : am4Request::get('options'); try { am4PluginsManager::initAPI(@$options['path']); } catch (Exception $e) { } }
function validate($options) { try { am4PluginsManager::initAPI($options['path']); } catch (Exception $ex) { return $ex->getMessage(); } return true; }