mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81997 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
faed7b0c14
commit
82a68dd3bd
@ -186,7 +186,7 @@ class Convert extends Object {
|
||||
* @uses SimpleXMLElement
|
||||
*/
|
||||
protected static function recursiveXMLToArray($xml) {
|
||||
if(get_class($xml) == 'SimpleXMLElement') {
|
||||
if(is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
|
||||
$attributes = $xml->attributes();
|
||||
foreach($attributes as $k => $v) {
|
||||
if($v) $a[$k] = (string) $v;
|
||||
|
@ -202,7 +202,7 @@ class RequestHandler extends ViewableData {
|
||||
// check if specific action is set
|
||||
if(isset($allowedActions[$actionOrAll])) {
|
||||
$test = $allowedActions[$actionOrAll];
|
||||
if($test === true) {
|
||||
if($test === true || $test === 1 || $test === '1') {
|
||||
// Case 1: TRUE should always allow access
|
||||
return true;
|
||||
} elseif(substr($test, 0, 2) == '->') {
|
||||
|
@ -176,9 +176,11 @@ class Hierarchy extends DataObjectDecorator {
|
||||
*/
|
||||
protected function markingFinished() {
|
||||
// Mark childless nodes as expanded.
|
||||
foreach($this->markedNodes as $id => $node) {
|
||||
if(!$node->isExpanded() && !$node->numChildren()) {
|
||||
$node->markExpanded();
|
||||
if($this->markedNodes) {
|
||||
foreach($this->markedNodes as $id => $node) {
|
||||
if(!$node->isExpanded() && !$node->numChildren()) {
|
||||
$node->markExpanded();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -651,7 +651,8 @@ JS;
|
||||
$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
||||
|
||||
$closeLink = sprintf(
|
||||
'<small><a href="' . $referrer . '" onclick="javascript:window.top.GB_hide(); return false;">(%s)</a></small>',
|
||||
'<small><a href="%s" onclick="javascript:window.top.GB_hide(); return false;">(%s)</a></small>',
|
||||
$referrer,
|
||||
_t('ComplexTableField.CLOSEPOPUP', 'Close Popup')
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user