Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas
This commit is contained in:
commit
562519fdad
|
@ -59,7 +59,8 @@ public $defaults = array(
|
||||||
if ( array_key_exists( $fn, $this ) ) {
|
if ( array_key_exists( $fn, $this ) ) {
|
||||||
return $this->{$fn};
|
return $this->{$fn};
|
||||||
} else if ( array_key_exists( $fn, $this->defaults ) ) {
|
} else if ( array_key_exists( $fn, $this->defaults ) ) {
|
||||||
return $this->defaults{$fn};
|
$this->{$fn} = $this->defaults{$fn};
|
||||||
|
return $this->{$fn};
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$backTrace = debug_backtrace();
|
$backTrace = debug_backtrace();
|
||||||
|
@ -71,29 +72,40 @@ public $defaults = array(
|
||||||
|
|
||||||
public function terms( ) {
|
public function terms( ) {
|
||||||
if ( func_num_args( ) ) {
|
if ( func_num_args( ) ) {
|
||||||
$this->{'Query'}['terms'] = func_get_arg(0);
|
$this->Query()['terms'] = func_get_arg(0);
|
||||||
}
|
}
|
||||||
return $this->{'Query'}['terms'];
|
if ( isset( $this->Query()['terms'] ) ) {
|
||||||
|
return $this->Query()['terms'];
|
||||||
|
}
|
||||||
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following three fields are actually stored in the Query
|
// The following three fields are actually stored in the Query
|
||||||
public function sort_field( ) {
|
public function sort_field( ) {
|
||||||
if ( func_num_args( ) ) {
|
if ( func_num_args( ) ) {
|
||||||
$this->{'Query'}['sort_field'] = func_get_arg(0);
|
$this->Query()['sort_field'] = func_get_arg(0);
|
||||||
}
|
}
|
||||||
|
if ( isset( $this->Query()['sort_field'] ) ) {
|
||||||
return $this->{'Query'}['sort_field'];
|
return $this->{'Query'}['sort_field'];
|
||||||
}
|
}
|
||||||
|
return $this->defaults{'sort_field'};
|
||||||
|
}
|
||||||
public function sort_asc( ) {
|
public function sort_asc( ) {
|
||||||
if ( func_num_args( ) ) {
|
if ( func_num_args( ) ) {
|
||||||
$this->{'Query'}['sort_asc'] = func_get_arg(0);
|
$this->{'Query'}['sort_asc'] = func_get_arg(0);
|
||||||
}
|
}
|
||||||
|
if ( isset( $this->Query()['sort_asc'] ) ) {
|
||||||
return $this->{'Query'}['sort_asc'];
|
return $this->{'Query'}['sort_asc'];
|
||||||
}
|
}
|
||||||
|
return $this->defaults{'sort_asc'};
|
||||||
|
}
|
||||||
public function limit( ) {
|
public function limit( ) {
|
||||||
if ( func_num_args( ) ) {
|
if ( func_num_args( ) ) {
|
||||||
$this->{'Query'}['limit'] = func_get_arg(0);
|
$this->{'Query'}['limit'] = func_get_arg(0);
|
||||||
}
|
}
|
||||||
|
if ( isset( $this->Query()['limit'] ) )
|
||||||
return $this->{'Query'}['limit'];
|
return $this->{'Query'}['limit'];
|
||||||
|
return $this->defaults{'limit'};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function find_all() {
|
public static function find_all() {
|
||||||
|
|
Loading…
Reference in New Issue