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
@ -632,21 +632,6 @@ JS;
|
|||||||
$statusUpdates = array('modified'=>array());
|
$statusUpdates = array('modified'=>array());
|
||||||
|
|
||||||
if(is_numeric($id) && is_numeric($parentID) && $id != $parentID) {
|
if(is_numeric($id) && is_numeric($parentID) && $id != $parentID) {
|
||||||
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
|
||||||
if($node){
|
|
||||||
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
|
||||||
|
|
||||||
$node->ParentID = $parentID;
|
|
||||||
$node->Status = "Saved (update)";
|
|
||||||
$node->write();
|
|
||||||
|
|
||||||
if(is_numeric($_REQUEST['CurrentlyOpenPageID'])) {
|
|
||||||
$currentPage = DataObject::get_by_id($this->stat('tree_class'), $_REQUEST['CurrentlyOpenPageID']);
|
|
||||||
if($currentPage) {
|
|
||||||
$cleanupJS = $currentPage->cmsCleanup_parentChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
||||||
if($node){
|
if($node){
|
||||||
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
if($node && !$node->canEdit()) return Security::permissionFailure($this);
|
||||||
@ -671,6 +656,7 @@ JS;
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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