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:
Ingo Schommer 2009-11-21 03:20:50 +00:00
parent 0df7de0c6b
commit 32d6342aff
3 changed files with 24 additions and 38 deletions

View File

@ -632,21 +632,6 @@ JS;
$statusUpdates = array('modified'=>array());
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);
if($node){
if($node && !$node->canEdit()) return Security::permissionFailure($this);
@ -671,6 +656,7 @@ JS;
)
);
}
}
return Convert::raw2json($statusUpdates);
}
@ -870,7 +856,6 @@ JS;
new FormAction('doAdd', _t('AssetAdmin_left.ss.GO','Go'))
)
);
$form->setValidator(null);
$form->addExtraClass('actionparams');
return $form;

View File

@ -42,8 +42,9 @@ class CMSMainTest extends FunctionalTest {
$response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session());
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());
$responseData = Convert::json2array($response->getBody());
$this->assertTrue(property_exists($responseData['modified'], '1'));
$this->assertTrue(property_exists($responseData['modified'], '2'));
$this->session()->clear('loggedInAs');

View File

@ -10,11 +10,11 @@ class SecurityAdminTest extends FunctionalTest {
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
/* 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());
/* 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());
$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'));
/* 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());
/* Then load the export page */