From: Fabian Keil <fk@fabiankeil.de> Date: Thu, 1 Mar 2018 11:13:03 +0000 (+0100) Subject: Remove cgi_show_version() X-Git-Tag: v_3_0_27~75 X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/user-manual/faq/static/documentation.html?a=commitdiff_plain;h=9b1a4d7e6645b3e2987f67fe3d4d22ae617457f7;p=privoxy.git Remove cgi_show_version() It's no longer useful now that we are using git. Eventually the git hash should be added to the version number shown on each page. --- diff --git a/cgi.c b/cgi.c index f752f773..22601760 100644 --- a/cgi.c +++ b/cgi.c @@ -93,10 +93,6 @@ static const struct cgi_dispatcher cgi_dispatchers[] = { "View the current configuration", #endif TRUE }, - { "show-version", - cgi_show_version, - NULL, /* Not considered important enough to include in the menu */ - TRUE }, #ifdef FEATURE_CLIENT_TAGS /* * This is marked as harmless because despite the description diff --git a/cgisimple.c b/cgisimple.c index 2a1ab8fb..79b811f9 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1031,43 +1031,6 @@ jb_err cgi_send_user_manual(struct client_state *csp, } -/********************************************************************* - * - * Function : cgi_show_version - * - * Description : CGI function that returns a a web page describing the - * file versions of Privoxy. - * - * Parameters : - * 1 : csp = Current client state (buffers, headers, etc...) - * 2 : rsp = http_response data structure for output - * 3 : parameters = map of cgi parameters - * - * CGI Parameters : none - * - * Returns : JB_ERR_OK on success - * JB_ERR_MEMORY on out-of-memory error. - * - *********************************************************************/ -jb_err cgi_show_version(struct client_state *csp, - struct http_response *rsp, - const struct map *parameters) -{ - struct map *exports; - - assert(csp); - assert(rsp); - assert(parameters); - - if (NULL == (exports = default_exports(csp, "show-version"))) - { - return JB_ERR_MEMORY; - } - - return template_fill_for_cgi(csp, "show-version", exports, rsp); -} - - /********************************************************************* * * Function : cgi_show_status diff --git a/cgisimple.h b/cgisimple.h index 271a707a..52642a40 100644 --- a/cgisimple.h +++ b/cgisimple.h @@ -61,9 +61,6 @@ extern jb_err cgi_show_status (struct client_state *csp, extern jb_err cgi_show_url_info(struct client_state *csp, struct http_response *rsp, const struct map *parameters); -extern jb_err cgi_show_version (struct client_state *csp, - struct http_response *rsp, - const struct map *parameters); extern jb_err cgi_show_request (struct client_state *csp, struct http_response *rsp, const struct map *parameters); diff --git a/templates/show-version b/templates/show-version deleted file mode 100644 index a083329d..00000000 --- a/templates/show-version +++ /dev/null @@ -1,158 +0,0 @@ -########################################################## -# -# Show-Status-CGI Output template for Privoxy. -# -# USING HTML TEMPLATES: -# --------------------- -# -# Template files are written win plain HTML, with a few -# additions: -# -# - Lines that start with a '#' character like this one -# are ignored -# -# - Each item in the below list of exported symbols will -# be replaced by dynamically generated text, if they -# are enclosed in '@'-characters. E.g. The string @version@ -# will be replaced by the version number of Privoxy. -# -# - One special application of this is to make whole blocks -# of the HTML template disappear if the condition <name> -# is not given. Simply enclose the block between the two -# strings @if-<name>start and if-<name>-end@. The strings -# should be placed in HTML comments (<!-- -->), so the -# html structure won't be messed when the magic happens. -# -# USABLE SYMBOLS IN THIS TEMPLATE: -# -------------------------------- -# -# my-ip-addr: -# The IP-address that the client used to reach this proxy -# my-hostname: -# The hostname associated with my-ip-addr -# admin-address: -# The email address of the proxy administrator, as configured -# in the config file -# default-cgi: -# The URL for the "main menu" builtin CGI of this proxy -# menu: -# List of <li> elements linking to the other available CGIs -# version: -# The version number of the proxy software -# code-status: -# The development status of the proxy software: "alpha", "beta", -# or "stable". -# homepage: -# The URL of the Privoxy project, which maintains this software. -# -# redirect-url: -# The URL to a script that will redirect to the Privoxy -# documentation for a given item -# invocation: -# The command line with whitch Privoxy was invoked -# options: -# The options read from the configfile, linked to their -# explanations, plus warnings if parsing acl or forward -# statements produced errors. -# sourceversions: -# A HTML-formatted list of the individual source file cvs versions -# defines: -# A HTML-formatted list of all conditional #defines used when -# Privoxy was compiled -# -# -# CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS: -# ------------------------------------------------------------------ -# -# unstable: -# This is an alpha or beta release of the proxy software -# have-adminaddr-info: -# An e-mail address for the local Privoxy administrator has -# been specified and is available through the "admin-address" -# symbol -# have-proxy-info: -# A URL for online documentation about this proxy has been -# specified and is available through the "proxy-info-url" -# symbol -# have-help-info: -# If either have-proxy-info is true or have-adminaddr-info is -# true, have-help-info is true. Used to conditionally include -# a grey box for any and all help info. -# sourceversions -# The versions. -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> - -<head> - <title>Privoxy@@my-hostname@: Detailed proxy version information</title> - <meta http-equiv="Content-Style-Type" content="text/css"> - <meta http-equiv="Content-Script-Type" content="text/javascript"> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <meta name="robots" content="noindex,nofollow"> - <link rel="stylesheet" type="text/css" href="@default-cgi@send-stylesheet"> - <link rel="shortcut icon" href="@default-cgi@favicon.ico" type="image/x-icon"> -</head> - -<body> - - <table cellpadding="20" cellspacing="10" border="0" width="100%"> - <tr> - <td class="title"> - -#include mod-title - - </td> - </tr> - -<!-- @if-unstable-start --> -# This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in - <tr> - <td class="warning"> - -#include mod-unstable-warning - - </td> - </tr> -<!-- if-unstable-end@ --> - - <tr> - <td class="box"> - <h2>Source code versions:</h2> - <p><i>(Note: This information is only relevant if you checked out Privoxy from CVS - and compiled it yourself. If you downloaded a binary, .exe, RPM, or a .tgz file, - then when you ask for support just mention the version number <b>@version@</b> - and the type of download you got.)</i> - </p> - <pre>@sourceversions@</pre> - </td> - </tr> - - <tr> - <td class="box"> - <h2>More Privoxy:</h2> - <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul> - </td> - </tr> - -<!-- @if-have-help-info-start --> - <tr> - <td class="info"> - -#include mod-local-help - - </td> - </tr> -<!-- if-have-help-info-end@ --> - - <tr> - <td class="info"> - -#include mod-support-and-service - - </td> - </tr> - - </table> - -</body> -</html>