Formatting (minor)

This commit is contained in:
Miles Lott 2001-07-26 11:02:10 +00:00
parent cd339aa676
commit c80c3bbcd9

View File

@ -24,7 +24,6 @@
/* $Id$ */ /* $Id$ */
/** /**
* Parent class for the phpgwAPI * Parent class for the phpgwAPI
* Parent class. Has a few functions but is more importantly used as a parent class for everything else. * Parent class. Has a few functions but is more importantly used as a parent class for everything else.
@ -81,7 +80,6 @@
* @syntax strip_html($string) * @syntax strip_html($string)
* @example $reg_string = strip_html($urlencode_string); * @example $reg_string = strip_html($urlencode_string);
*/ */
function strip_html($s) function strip_html($s)
{ {
return htmlspecialchars(stripslashes($s)); return htmlspecialchars(stripslashes($s));
@ -100,7 +98,7 @@
* @syntax link($string, $extravars) * @syntax link($string, $extravars)
* @example None yet * @example None yet
*/ */
function link($url = "", $extravars = "") function link($url = '', $extravars = '')
{ {
global $phpgw, $phpgw_info, $usercookie, $kp3, $PHP_SELF; global $phpgw, $phpgw_info, $usercookie, $kp3, $PHP_SELF;
return $this->session->link($url, $extravars); return $this->session->link($url, $extravars);
@ -116,23 +114,27 @@
* @syntax redirect(key as string) * @syntax redirect(key as string)
* @example None yet * @example None yet
*/ */
function redirect($url = "") function redirect($url = '')
{ {
global $HTTP_ENV_VARS; global $HTTP_ENV_VARS;
$iis = @strpos($HTTP_ENV_VARS["SERVER_SOFTWARE"], "IIS", 0); $iis = @strpos($HTTP_ENV_VARS['SERVER_SOFTWARE'], 'IIS', 0);
if ( !$url ) { if ( !$url )
{
$url = $PHP_SELF; $url = $PHP_SELF;
} }
if ( $iis ) { if ( $iis )
{
echo "\n<HTML>\n<HEAD>\n<TITLE>Redirecting to $url</TITLE>"; echo "\n<HTML>\n<HEAD>\n<TITLE>Redirecting to $url</TITLE>";
echo "\n<META HTTP-EQUIV=REFRESH CONTENT=\"0; URL=$url\">"; echo "\n<META HTTP-EQUIV=REFRESH CONTENT=\"0; URL=$url\">";
echo "\n</HEAD><BODY>"; echo "\n</HEAD><BODY>";
echo "<H3>Please continue to <a href=\"$url\">this page</a></H3>"; echo "<H3>Please continue to <a href=\"$url\">this page</a></H3>";
echo "\n</BODY></HTML>"; echo "\n</BODY></HTML>";
exit; exit;
} else { }
else
{
Header("Location: $url"); Header("Location: $url");
print("\n\n"); print("\n\n");
exit; exit;
@ -152,7 +154,7 @@
* @param string the fourth additional param * @param string the fourth additional param
* @see translation->translate() * @see translation->translate()
*/ */
function lang($key, $m1 = "", $m2 = "", $m3 = "", $m4 = "") function lang($key, $m1 = '', $m2 = '', $m3 = '', $m4 = '')
{ {
global $phpgw; global $phpgw;
return $this->translation->translate($key); return $this->translation->translate($key);