mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Fixed merge errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92845 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0df7de0c6b
commit
32d6342aff
@ -637,39 +637,25 @@ JS;
|
|||||||
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
||||||
|
|
||||||
$node->ParentID = $parentID;
|
$node->ParentID = $parentID;
|
||||||
$node->Status = "Saved (update)";
|
|
||||||
$node->write();
|
$node->write();
|
||||||
|
|
||||||
if(is_numeric($_REQUEST['CurrentlyOpenPageID'])) {
|
$statusUpdates['modified'][$node->ID] = array(
|
||||||
$currentPage = DataObject::get_by_id($this->stat('tree_class'), $_REQUEST['CurrentlyOpenPageID']);
|
'TreeTitle'=>$node->TreeTitle
|
||||||
if($currentPage) {
|
);
|
||||||
$cleanupJS = $currentPage->cmsCleanup_parentChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
$this->response->addHeader(
|
||||||
if($node){
|
'X-Status',
|
||||||
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
_t('LeftAndMain.SAVED','saved')
|
||||||
|
);
|
||||||
$node->ParentID = $parentID;
|
}else{
|
||||||
$node->write();
|
$this->response->setStatusCode(
|
||||||
|
500,
|
||||||
$statusUpdates['modified'][$node->ID] = array(
|
_t(
|
||||||
'TreeTitle'=>$node->TreeTitle
|
'LeftAndMain.PLEASESAVE',
|
||||||
);
|
"Please Save Page: This page could not be upated because it hasn't been saved yet."
|
||||||
|
)
|
||||||
$this->response->addHeader(
|
);
|
||||||
'X-Status',
|
}
|
||||||
_t('LeftAndMain.SAVED','saved')
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
$this->response->setStatusCode(
|
|
||||||
500,
|
|
||||||
_t(
|
|
||||||
'LeftAndMain.PLEASESAVE',
|
|
||||||
"Please Save Page: This page could not be upated because it hasn't been saved yet."
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Convert::raw2json($statusUpdates);
|
return Convert::raw2json($statusUpdates);
|
||||||
@ -870,7 +856,6 @@ JS;
|
|||||||
new FormAction('doAdd', _t('AssetAdmin_left.ss.GO','Go'))
|
new FormAction('doAdd', _t('AssetAdmin_left.ss.GO','Go'))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form->setValidator(null);
|
|
||||||
$form->addExtraClass('actionparams');
|
$form->addExtraClass('actionparams');
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
|
@ -42,8 +42,9 @@ class CMSMainTest extends FunctionalTest {
|
|||||||
|
|
||||||
$response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session());
|
$response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session());
|
||||||
|
|
||||||
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
|
$responseData = Convert::json2array($response->getBody());
|
||||||
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());
|
$this->assertTrue(property_exists($responseData['modified'], '1'));
|
||||||
|
$this->assertTrue(property_exists($responseData['modified'], '2'));
|
||||||
|
|
||||||
$this->session()->clear('loggedInAs');
|
$this->session()->clear('loggedInAs');
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ class SecurityAdminTest extends FunctionalTest {
|
|||||||
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
||||||
|
|
||||||
/* First, open the applicable group */
|
/* First, open the applicable group */
|
||||||
$this->get('admin/security/getitem?ID=' . $this->idFromFixture('Group','admin'));
|
$this->get('admin/security/show/' . $this->idFromFixture('Group','admin'));
|
||||||
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Administrators"[^>]*>/',$this->content());
|
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Administrators"[^>]*>/',$this->content());
|
||||||
|
|
||||||
/* Then load the export page */
|
/* Then load the export page */
|
||||||
$this->get('admin/security//EditForm/field/Members/export');
|
$this->get('admin/security/EditForm/field/Members/export');
|
||||||
$lines = preg_split('/\n/', $this->content());
|
$lines = preg_split('/\n/', $this->content());
|
||||||
|
|
||||||
$this->assertEquals(count($lines), 3, "Export with members has one content row");
|
$this->assertEquals(count($lines), 3, "Export with members has one content row");
|
||||||
@ -25,7 +25,7 @@ class SecurityAdminTest extends FunctionalTest {
|
|||||||
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
||||||
|
|
||||||
/* First, open the applicable group */
|
/* First, open the applicable group */
|
||||||
$this->get('admin/security/getitem?ID=' . $this->idFromFixture('Group','empty'));
|
$this->get('admin/security/show/' . $this->idFromFixture('Group','empty'));
|
||||||
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Empty Group"[^>]*>/',$this->content());
|
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Empty Group"[^>]*>/',$this->content());
|
||||||
|
|
||||||
/* Then load the export page */
|
/* Then load the export page */
|
||||||
|
Loading…
Reference in New Issue
Block a user