mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 05:39:10 +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
|
* @uses SimpleXMLElement
|
||||||
*/
|
*/
|
||||||
protected static function recursiveXMLToArray($xml) {
|
protected static function recursiveXMLToArray($xml) {
|
||||||
if(get_class($xml) == 'SimpleXMLElement') {
|
if(is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
|
||||||
$attributes = $xml->attributes();
|
$attributes = $xml->attributes();
|
||||||
foreach($attributes as $k => $v) {
|
foreach($attributes as $k => $v) {
|
||||||
if($v) $a[$k] = (string) $v;
|
if($v) $a[$k] = (string) $v;
|
||||||
|
@ -202,7 +202,7 @@ class RequestHandler extends ViewableData {
|
|||||||
// check if specific action is set
|
// check if specific action is set
|
||||||
if(isset($allowedActions[$actionOrAll])) {
|
if(isset($allowedActions[$actionOrAll])) {
|
||||||
$test = $allowedActions[$actionOrAll];
|
$test = $allowedActions[$actionOrAll];
|
||||||
if($test === true) {
|
if($test === true || $test === 1 || $test === '1') {
|
||||||
// Case 1: TRUE should always allow access
|
// Case 1: TRUE should always allow access
|
||||||
return true;
|
return true;
|
||||||
} elseif(substr($test, 0, 2) == '->') {
|
} elseif(substr($test, 0, 2) == '->') {
|
||||||
|
@ -176,12 +176,14 @@ class Hierarchy extends DataObjectDecorator {
|
|||||||
*/
|
*/
|
||||||
protected function markingFinished() {
|
protected function markingFinished() {
|
||||||
// Mark childless nodes as expanded.
|
// Mark childless nodes as expanded.
|
||||||
|
if($this->markedNodes) {
|
||||||
foreach($this->markedNodes as $id => $node) {
|
foreach($this->markedNodes as $id => $node) {
|
||||||
if(!$node->isExpanded() && !$node->numChildren()) {
|
if(!$node->isExpanded() && !$node->numChildren()) {
|
||||||
$node->markExpanded();
|
$node->markExpanded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return CSS classes of 'unexpanded', 'closed', both, or neither, depending on
|
* Return CSS classes of 'unexpanded', 'closed', both, or neither, depending on
|
||||||
|
@ -651,7 +651,8 @@ JS;
|
|||||||
$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
||||||
|
|
||||||
$closeLink = sprintf(
|
$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')
|
_t('ComplexTableField.CLOSEPOPUP', 'Close Popup')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user