Changeset 286 for tags/2.0.2
- Timestamp:
- Oct 21, 2007 1:01:28 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/2.0.2/lib/App.inc.php
r157 r286 668 668 // Get the first delimiter that is needed in the url. 669 669 $delim = strpos($url, '?') !== false ? ini_get('arg_separator.output') : '?'; 670 670 671 // Separate any #anchor component. 672 preg_match('/^([^#]+)#([^#]+)$/i', $url, $anchor_match); 673 if (isset($anchor_match[2])) { 674 $url = $anchor_match[1]; 675 $anchor = '#' . $anchor_match[2]; 676 } else { 677 $anchor = ''; 678 } 671 679 672 680 $q = ''; … … 674 682 // Join the global _carry_queries and local one_time_carry_queries. 675 683 $query_args = urlEncodeArray(array_merge($_this->_carry_queries, $one_time_carry_queries)); 676 foreach ($query_args as $key =>$val) {684 foreach ($query_args as $key => $val) { 677 685 // Check value is set and value does not already exist in the url. 678 686 if (!preg_match('/[?&]' . preg_quote($key) . '=/', $url)) { … … 711 719 && !preg_match('/[?&]' . preg_quote(session_name()) . '=/', $url) 712 720 ) { 713 $url .= $q . $delim . session_name() . '=' . session_id(); 714 return $url; 715 } else { 716 $url .= $q; 717 return $url; 718 } 721 $q .= $delim . session_name() . '=' . session_id(); 722 } 723 724 return $url . $q . $anchor; 719 725 } 720 726
Note: See TracChangeset
for help on using the changeset viewer.