mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 08:44:46 +02:00
Additional updates for processwire/processwire-issues#1467
This commit is contained in:
@@ -811,6 +811,7 @@ function wireClassName($className, $withNamespace = false, $verbose = false) {
|
|||||||
$object = null;
|
$object = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$className = (string) $className;
|
||||||
$pos = strrpos($className, $bs);
|
$pos = strrpos($className, $bs);
|
||||||
|
|
||||||
if($withNamespace === true) {
|
if($withNamespace === true) {
|
||||||
|
@@ -246,7 +246,7 @@ class Password extends Wire {
|
|||||||
} else {
|
} else {
|
||||||
// older style, non-blowfish support
|
// older style, non-blowfish support
|
||||||
// split the password in two
|
// split the password in two
|
||||||
$splitPass = str_split($pass, (strlen($pass) / 2) + 1);
|
$splitPass = str_split($pass, (int) (strlen($pass) / 2) + 1);
|
||||||
// generate the hash
|
// generate the hash
|
||||||
$hash = hash($hashType, $salt1 . $splitPass[0] . $salt2 . $splitPass[1], false);
|
$hash = hash($hashType, $salt1 . $splitPass[0] . $salt2 . $splitPass[1], false);
|
||||||
}
|
}
|
||||||
|
@@ -716,7 +716,7 @@ class InputfieldRepeater extends Inputfield implements InputfieldItemList {
|
|||||||
$addLabel = $this->field->get("repeaterAddLabel$language");
|
$addLabel = $this->field->get("repeaterAddLabel$language");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strlen($addLabel)) $addLabel = $this->_('Add New');
|
if(!strlen("$addLabel")) $addLabel = $this->_('Add New');
|
||||||
return $addLabel;
|
return $addLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -860,7 +860,7 @@ class PagePermissions extends WireData implements Module {
|
|||||||
$_ADDABLE = false; // if we really mean it (as in, do not perform secondary checks)
|
$_ADDABLE = false; // if we really mean it (as in, do not perform secondary checks)
|
||||||
$superuser = $user->isSuperuser();
|
$superuser = $user->isSuperuser();
|
||||||
|
|
||||||
if($page->template->noChildren) {
|
if($page->template && $page->template->noChildren) {
|
||||||
$addable = false;
|
$addable = false;
|
||||||
|
|
||||||
} else if($superuser) {
|
} else if($superuser) {
|
||||||
|
@@ -600,6 +600,7 @@ class ListerBookmarks extends Wire {
|
|||||||
$bookmarkID = $bookmark['id'];
|
$bookmarkID = $bookmark['id'];
|
||||||
} else {
|
} else {
|
||||||
$type = self::typePublic;
|
$type = self::typePublic;
|
||||||
|
$bookmarkID = (string) $bookmarkID;
|
||||||
$ownedPrefix = $this->typePrefix(self::typeOwned);
|
$ownedPrefix = $this->typePrefix(self::typeOwned);
|
||||||
if(strpos($bookmarkID, $ownedPrefix) !== false) {
|
if(strpos($bookmarkID, $ownedPrefix) !== false) {
|
||||||
list($userID, $bookmarkID) = explode($ownedPrefix, $bookmarkID);
|
list($userID, $bookmarkID) = explode($ownedPrefix, $bookmarkID);
|
||||||
|
Reference in New Issue
Block a user