BUGFIX: fixed using UDF with the workflow module which only publishs a page when its been modified and UDF was always returning false to any changes

This commit is contained in:
Will Rossiter 2010-05-16 03:21:04 +00:00
parent 2c1974eae2
commit 3257590dc8

View File

@ -122,7 +122,7 @@ class UserDefinedForm extends Page {
$field->doDeleteFromStage('Live');
}
}
// publish the draft pages
if($this->Fields()) {
foreach($this->Fields() as $field) {
@ -210,6 +210,18 @@ class UserDefinedForm extends Page {
new CheckboxField("ShowClearButton", _t('UserDefinedForm.SHOWCLEARFORM', 'Show Clear Form Button'), $this->ShowClearButton)
);
}
/**
* Return if this form has been modified on the stage site and not published.
* this is used on the workflow module and for a couple highlighting things
*
* @todo make this a bit smarter - the issue with userforms is that it uses several
* relationships to form fields which has a undefined amount of options so
* for now just say its always modified
*/
public function getIsModifiedOnStage() {
return true;
}
}
/**