From cb2408a82c9bc93bef177dc33a8981bc36800839 Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 23 Feb 2007 13:18:34 +0000 Subject: Plugins: - display author and and author url (if present) on plugin admin page - uniformized versions/authors... for all plugins in svn - security fix (html escape name, version, uri, author... to avoid javascript injection which could automatically simulate click on Install) - added confirmation for install/uninstall plugins Web services: - web service explorer now caches method details in order to avoid unnecessary web calls - web service explorer can now send parameters as arrays - web service explorer uses now prototype.js version 1.5 - small improvements - added and use function bad_request (sends http status code 400) git-svn-id: http://piwigo.org/svn/trunk@1852 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/functions_html.inc.php') diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index c0edf6ed0..74934cbf0 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -626,6 +626,23 @@ function page_forbidden($msg, $alternate_url=null) 5 ); } +/** + * exits the current script with 400 code + * @param string msg a message to display + * @param string alternate_url redirect to this url + */ +function bad_request($msg, $alternate_url=null) +{ + set_status_header(400); + if ($alternate_url==null) + $alternate_url = make_index_url(); + redirect_html( $alternate_url, + '
+

Bad request


' +.$msg.'
', + 5 ); +} + /** * exits the current script with 404 code when a page cannot be found * @param string msg a message to display -- cgit v1.2.3