Skip to content

Commit

Permalink
add $add_session_id parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
haraldpdl committed May 28, 2014
1 parent 057e7f6 commit 7f1ef33
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions catalog/admin/includes/functions/html_output.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

////
// The HTML href link wrapper function
function tep_href_link($page = '', $parameters = '', $connection = 'SSL') {
function tep_href_link($page = '', $parameters = '', $connection = 'SSL', $add_session_id = true) {
global $request_type;

$page = tep_output_string($page);
Expand Down Expand Up @@ -44,16 +44,14 @@ function tep_href_link($page = '', $parameters = '', $connection = 'SSL') {
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (tep_not_null(SID)) {
$_sid = SID;
if ( ($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (tep_not_null($SID)) {
$_sid = $SID;
} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
$_sid = tep_session_name() . '=' . tep_session_id();
}
}
} elseif (tep_not_null(SID)) {
$_sid = SID;
}

if (isset($_sid)) {
Expand Down

0 comments on commit 7f1ef33

Please sign in to comment.