Skip to content

Commit

Permalink
fix RC2
Browse files Browse the repository at this point in the history
 * Info plugin: fix for win32-rcs57 bug.
 * fix regression 7e39c9a
  • Loading branch information
wkpark committed Nov 9, 2022
1 parent 123b858 commit 515ee26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugin/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function _parse_rlog($formatter,$log,$options=array()) {
$tmp = explode(',', $ip);
$lastip = $ip = array_pop($tmp);
}
$user=trim($dummy[1]);
$user = !empty($dummy[1]) ? trim($dummy[1]) : 'Anonymous';
if (($p = strpos($user,' ')) !== false) { // XXX
$user = substr($user, 0, $p);
} else if (substr($user, 0, 9) == 'Anonymous') {
Expand Down
6 changes: 3 additions & 3 deletions wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -6806,11 +6806,11 @@ function _session_start($session_id = null, $id = null) {
if (count($tmp) >= 3)
$domain = $_SERVER['SERVER_NAME'];
}
if (empty($domain)) {
if (!empty($_SERVER['HTTP_HOST']) && ($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {
if (empty($domain) && !empty($_SERVER['HTTP_HOST'])) {
if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {
$domain = substr($_SERVER['HTTP_HOST'], 0, $pos);
} else {
$domain = 'localhost';
$domain = $_SERVER['HTTP_HOST'];
}
}

Expand Down
13 changes: 7 additions & 6 deletions wikilib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1972,11 +1972,12 @@ function setCookie() {
if (count($tmp) >= 3)
$domain = '; Domain='.$_SERVER['SERVER_NAME'];
}
if (empty($domain)) {
if (!empty($_SERVER['HTTP_HOST']) && ($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {

if (empty($domain) && !empty($_SERVER['HTTP_HOST'])) {
if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {
$domain = substr($_SERVER['HTTP_HOST'], 0, $pos);
} else {
$domain = 'localhost';
$domain = $_SERVER['HTTP_HOST'];
}
$domain = '; Domain='.$domain;
}
Expand All @@ -2003,11 +2004,11 @@ function unsetCookie() {
if (count($tmp) >= 3)
$domain = '; Domain='.$_SERVER['SERVER_NAME'];
}
if (empty($domain)) {
if (!empty($_SERVER['HTTP_HOST']) && ($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {
if (empty($domain) && !empty($_SERVER['HTTP_HOST'])) {
if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false) {
$domain = substr($_SERVER['HTTP_HOST'], 0, $pos);
} else {
$domain = 'localhost';
$domain = $_SERVER['HTTP_HOST'];
}
$domain = '; Domain='.$domain;
}
Expand Down

0 comments on commit 515ee26

Please sign in to comment.