Changed SpamProtectorManager::update_form to not require fieldname and fieldtitle

This commit is contained in:
Sam Minnee 2009-02-11 03:47:14 +00:00
parent c0954b5ba8
commit a731563cbc

View File

@ -29,19 +29,10 @@ class SpamProtecterManager {
* *** Most of the web service doesn't require this. * *** Most of the web service doesn't require this.
* @return SpamProtecterField * @return SpamProtecterField
*/ */
static function update_form($protecterFieldName, $protecterFieldTitle, $form, $before=null, $callbackObject=null, $fieldsToSpamServiceMapping=null) { static function update_form($form, $before=null, $callbackObject=null, $fieldsToSpamServiceMapping=null) {
$protecter = new self::$spam_protecter();
$protecterField = new self::$spam_protecter($protecterFieldName, $protecterFieldTitle); $protecter->updateForm($form, $before, $callbackObject, $fieldsToSpamServiceMapping);
$protecterField->setCallbackObject($callbackObject); return $protecter;
if ($before && $fields->fieldByName($before)) {
$form->Fields()->insertBefore($protecterField, $before);
}
else {
$form->Fields()->push($protecterField);
}
return $protecterField;
} }
} }
?> ?>