[lilina-svn] [lilina] r582 committed - REQUEST_URI doesn't include the host, baseurl does. Compensate via a r...

lilina at googlecode.com lilina at googlecode.com
Mon Feb 15 20:08:45 EST 2010


Revision: 582
Author: ryan at getlilina.org
Date: Mon Feb 15 01:08:20 2010
Log: REQUEST_URI doesn't include the host, baseurl does. Compensate via a  
regex. Fixes issue #91
http://code.google.com/p/lilina/source/detail?r=582

Modified:
  /trunk/lilina/inc/core/auth-functions.php

=======================================
--- /trunk/lilina/inc/core/auth-functions.php	Thu Jan 14 03:25:35 2010
+++ /trunk/lilina/inc/core/auth-functions.php	Mon Feb 15 01:08:20 2010
@@ -72,7 +72,8 @@
  	}

  	if(!defined('LILINA_LOGIN')) {
-		$current = str_replace(get_option('baseurl'), '',  
$_SERVER['REQUEST_URI']);
+		preg_match_all('#(.*?)/(admin/.*)#i', $_SERVER['REQUEST_URI'], $current);
+		$current = $current[2][0];
  		header('HTTP/1.1 302 Found');
  		header('Location: ' .  
get_option('baseurl') . 'admin/login.php?return=' . $current);
  		header('Connection: close');



More information about the lilina-svn mailing list