mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/3.0'
This commit is contained in:
commit
b98e069b6d
@ -203,7 +203,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
function LinkPageAdd() {
|
function LinkPageAdd() {
|
||||||
return singleton("CMSPageAddController")->Link();
|
$link = singleton("CMSPageAddController")->Link();
|
||||||
|
$this->extend('updateLinkPageAdd', $link);
|
||||||
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,6 +88,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
@ -115,6 +116,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($serverErrorPagePath, 'w')) {
|
if($fh = fopen($serverErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
@ -11,9 +11,13 @@
|
|||||||
* Constructor: onmatch
|
* Constructor: onmatch
|
||||||
*/
|
*/
|
||||||
onmatch : function() {
|
onmatch : function() {
|
||||||
this._addActions(); // add elements and actions for editing
|
// Only initialize the field if it contains an editable field.
|
||||||
this.edit(); // toggle
|
// This ensures we don't get bogus previews on readonly fields.
|
||||||
this._autoInputWidth(); // set width of input field
|
if(this.find(':text').length) {
|
||||||
|
this._addActions(); // add elements and actions for editing
|
||||||
|
this.edit(); // toggle
|
||||||
|
this._autoInputWidth(); // set width of input field
|
||||||
|
}
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user