Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -334,11 +334,26 @@ abstract class _ActiveRecord
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !array_key_exists( $key, $this->_data ) or $this->_data[ $key ] != $value )
|
||||
{
|
||||
$this->changed[ $key ] = $value;
|
||||
}
|
||||
|
||||
$this->_data[ $key ] = $value;
|
||||
$this->changed[ $key ] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is value in data store?
|
||||
*
|
||||
* @param mixed $key Key
|
||||
* @return bool
|
||||
*/
|
||||
public function __isset( $key )
|
||||
{
|
||||
return isset( $this->_data[ $key ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief By default cloning will create a new ActiveRecord record, but if you truly want an object copy you can set this to TRUE first and a direct copy will be returned
|
||||
*/
|
||||
@@ -380,12 +395,15 @@ abstract class _ActiveRecord
|
||||
}
|
||||
|
||||
foreach ( array_keys( static::$bitOptions ) as $k )
|
||||
{
|
||||
{
|
||||
if ( $this->$k instanceof Bitwise )
|
||||
{
|
||||
foreach( $this->$k->values as $field => $value )
|
||||
{
|
||||
$data[ $field ] = intval( $value );
|
||||
{
|
||||
if ( isset( $data[ $field ] ) or $this->$k->originalValues[ $field ] != intval( $value ) )
|
||||
{
|
||||
$data[ $field ] = intval( $value );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user