示例#1
0
 function handle_post($value)
 {
     if (is_array($value)) {
         $value = join(', ', $value);
     }
     return parent::handle_post($value);
 }
 /**
  * Handle a post to the field
  *
  * Accepts and validates a posted value.
  *
  * @param string $value The passed value or array or null if none given
  * @param syntax_plugin_bureaucracy_field[] $fields (reference) form fields (POST handled upto $this field)
  * @param int    $index  index number of field in form
  * @param int    $formid unique identifier of the form which contains this field
  * @return bool Whether the passed value is valid
  */
 public function handle_post($value, &$fields, $index, $formid)
 {
     if (is_array($value)) {
         $value = join(', ', $value);
     }
     return parent::handle_post($value, $fields, $index, $formid);
 }