[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18522] add some docs to redirect_link and clean up s
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] [18522] add some docs to redirect_link and clean up safe_redirect |
Date: |
Fri, 09 May 2008 02:22:54 +0000 |
Revision: 18522
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18522
Author: skwashd
Date: 2008-05-09 02:22:53 +0000 (Fri, 09 May 2008)
Log Message:
-----------
add some docs to redirect_link and clean up safe_redirect
Modified Paths:
--------------
trunk/phpgwapi/inc/class.phpgw.inc.php
Modified: trunk/phpgwapi/inc/class.phpgw.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.phpgw.inc.php 2008-05-08 22:19:39 UTC (rev
18521)
+++ trunk/phpgwapi/inc/class.phpgw.inc.php 2008-05-09 02:22:53 UTC (rev
18522)
@@ -144,7 +144,14 @@
return $this->session->link($url, $extravars,
$redirect);
}
- function redirect_link($url = '',$extravars=array())
+ /**
+ * Redirect to another URL
+ *
+ * @param string $string The url the link is for
+ * @param string $extravars Extra params to be passed to
the url
+ * @return null
+ */
+ function redirect_link($url = '',$extravars = array())
{
$this->redirect($this->session->link($url, $extravars,
true));
}
@@ -154,15 +161,13 @@
*
* Stop session theft for "GET" based sessions
*
- * @access public
* @param string $url the target url
- * @returns string safe redirect url
- * @author Dave Hall
+ * @return string the processed URL for a safe redirection
*/
public static function safe_redirect($url)
{
- return $GLOBALS['phpgw_info']['server']['webserver_url']
- . '/redirect.php?go=' . urlencode($url);
+ $url = urlencode($url);
+ return
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/redirect.php?go={$url}";
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18522] add some docs to redirect_link and clean up safe_redirect,
Dave Hall <=