PMCORE-3909 PMCORE-3905: Add option to disable session warning in web entry when "Require user login" is selected

This commit is contained in:
Roly Gutierrez
2022-08-11 19:00:12 -04:00
parent 7aeb33e475
commit 9135a175bb
23 changed files with 224 additions and 76 deletions

View File

@@ -75,8 +75,8 @@ class UnixFileSystem extends FileSystem {
// Resolve home directories. We assume /home is where all home
// directories reside, b/c there is no other way to do this with
// PHP AFAIK.
if ($strPathname{0} === "~") {
if ($strPathname{1} === "/") { // like ~/foo => /home/user/foo
if ($strPathname[0] === "~") {
if ($strPathname[1] === "/") { // like ~/foo => /home/user/foo
$strPathname = "/home/" . get_current_user() . substr($strPathname, 1);
} else { // like ~foo => /home/foo
$pos = strpos($strPathname, "/");
@@ -88,7 +88,7 @@ class UnixFileSystem extends FileSystem {
$n = strlen($strPathname);
$prevChar = 0;
for ($i=0; $i < $n; $i++) {
$c = $strPathname{$i};
$c = $strPathname[$i];
if (($prevChar === '/') && ($c === '/')) {
return self::normalizer($strPathname, $n, $i - 1);
}
@@ -109,7 +109,7 @@ class UnixFileSystem extends FileSystem {
return $pathname;
}
$n = (int) $len;
while (($n > 0) && ($pathname{$n-1} === '/')) {
while (($n > 0) && ($pathname[$n-1] === '/')) {
$n--;
}
if ($n === 0) {
@@ -122,7 +122,7 @@ class UnixFileSystem extends FileSystem {
}
$prevChar = 0;
for ($i = $offset; $i < $n; $i++) {
$c = $pathname{$i};
$c = $pathname[$i];
if (($prevChar === '/') && ($c === '/')) {
continue;
}
@@ -140,7 +140,7 @@ class UnixFileSystem extends FileSystem {
if (strlen($pathname === 0)) {
return 0;
}
return (($pathname{0} === '/') ? 1 : 0);
return (($pathname[0] === '/') ? 1 : 0);
}
/**
@@ -154,7 +154,7 @@ class UnixFileSystem extends FileSystem {
return $parent;
}
if ($child{0} === '/') {
if ($child[0] === '/') {
if ($parent === '/') {
return $child;
}
@@ -194,7 +194,7 @@ class UnixFileSystem extends FileSystem {
function getBooleanAttributes(&$f = null) {
//$rv = getBooleanAttributes0($f);
$name = $f->getName();
$hidden = (strlen($name) > 0) && ($name{0} == '.');
$hidden = (strlen($name) > 0) && ($name[0] == '.');
return ($hidden ? $this->BA_HIDDEN : 0);
}