public $default;
public $autoincrement;
public $extra;
+ public $extras;
public function __sleep() { return array(
'name',
$size = ($this->size() and is_scalar($this->size())) ? $this->size() : 0;
$tag = ( ($size>$this->textarea_size) or preg_match('/^(text|binary)/i',$this->type) ) ? 'textarea' : 'input';
return '<div class="label '.$this->name.'"><label for="'.$this->name.'">'.htmlspecialchars(prettyText($this->name)).'</label>'
- .($this->extra
+ .($this->extras
? '<span class="extra" id="'.$this->name.'">'.$this->out($value).'</span>'
: '<'.$tag
.' name="'.$this->name.'"'
$value = sprintf('%.'.$m[1].'f',$value);
}
- if ($html_escape and empty($this->extra)) $row[$f] = htmlspecialchars($row[$f]);
+ if ($html_escape and empty($this->extras)) $row[$f] = htmlspecialchars($row[$f]);
return $value;
}
# having, denorm, EMPTY
$extra_where = (string)$this->db()->type('extra_where');
- if ($extra_where == 'having' and $field->extra) {
+ if ($extra_where == 'having' and $field->extras) {
$having[] = $this->extras[$k]->sql_name()."$equal$v";
- } elseif ($extra_where == 'denorm' and $field->extra) {
+ } elseif ($extra_where == 'denorm' and $field->extras) {
$where[] = $this->extras[$k]->sql_name()."$equal$v";
- } elseif ($field->extra) {
+ } elseif ($field->extras) {
$where[] = $this->extras[$k]->sql_name()."$equal$v";
} else {
$where[] = $field->sql_name()."$equal$v";
$v = new Field( ( is_array($v) ? $v : array() ) + array(
'name' => $k,
'type' => 'text',
- 'extra' => $v,
+ 'extras' => $v,
));
$this->fields[$k] = $v;