Project

General

Profile

« Previous | Next » 

Revision 1598

Added by Dietmar over 12 years ago

fixed undefined fragment index in initialize.php
add $_SESSION['HTTP_REFERER'] storing active pagelink if page_id != 0

View differences:

initialize.php
27 27
	$sTmpReferer = '';
28 28
	if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') {
29 29
	        $tmp0 = parse_url($_SERVER['HTTP_REFERER']);
30
	        if ($tmp0 !== false) {
31
	                $tmp0['host'] = isset($tmp0['host']) ? $tmp0['host'] : '';
32
	                $tmp0['path'] = isset($tmp0['path']) ? $tmp0['path'] : '';
33
	                $tmp1 = parse_url(WB_URL);
34
	                if ($tmp1 !== false) {
35
	                        $tmp1['host'] = isset($tmp1['host']) ? $tmp1['host'] : '';
36
	                        $tmp1['path'] = isset($tmp1['path']) ? $tmp1['path'] : '';
37
	                        if (strpos($tmp0['host'].'/'.$tmp0['path'], $tmp1['host'].'/'.$tmp1['path'])) {
38
	                                $sTmpReferer = WB_URL.$tmp['path'].$tmp[fragment];
39
	                        }
40
	                }
41
	        }
30
       if ($tmp0 !== false) {
31
                $tmp0['host'] = isset($tmp0['host']) ? $tmp0['host'] : '';
32
                $tmp0['path'] = isset($tmp0['path']) ? $tmp0['path'] : '';
33
                $tmp0['fragment'] = isset($tmp0['fragment']) ? '#'.$tmp0['fragment'] : '';
34
                $tmp1 = parse_url(WB_URL);
35
                if ($tmp1 !== false) {
36
                        $tmp1['host'] = isset($tmp1['host']) ? $tmp1['host'] : '';
37
                        $tmp1['path'] = isset($tmp1['path']) ? $tmp1['path'] : '';
38
                        if (strpos($tmp0['host'].$tmp0['path'], $tmp1['host'].$tmp1['path']) !== false) {
39
                                $sTmpReferer = WB_URL.$tmp0['path'].$tmp0['fragment'];
40
                        }
41
                }
42
        }
42 43
	}
43 44
	$_SERVER['HTTP_REFERER'] = $sTmpReferer;
44 45
	date_default_timezone_set('UTC');
......
157 158

  
158 159
	define('EDITOR_WIDTH', 0);
159 160

  
160
}
161

  
162
?>
161
}

Also available in: Unified diff