Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @brief Revisions Model
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Content
|
||||
* @since 29 April 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -99,25 +100,14 @@ class _Revisions extends \IPS\Patterns\ActiveRecord
|
||||
$customFields = $fieldsClass::data( 'view' );
|
||||
$conflicts = array();
|
||||
|
||||
require_once \IPS\ROOT_PATH . "/system/3rd_party/Diff/class.Diff.php";
|
||||
|
||||
/* Build up our data set */
|
||||
foreach( $customFields as $id => $field )
|
||||
{
|
||||
$key = 'field_' . $field->id;
|
||||
|
||||
$conflicts[ $key ] = array( 'revision' => $this->get( $key ), 'record' => $record->$key, 'field' => $field, 'diff' => NULL );
|
||||
|
||||
if ( $record->$key AND $this->get( $key ) )
|
||||
if( $justChanged === FALSE OR !\IPS\Login::compareHashes( md5( $record->$key ), md5( $this->get( $key ) ) ) )
|
||||
{
|
||||
if ( md5( $record->$key ) != md5( $this->get( $key ) ) )
|
||||
{
|
||||
$conflicts[ $key ]['diff'] = \Diff::toTable( \Diff::compare( $this->get( $key ), $record->$key ) );
|
||||
}
|
||||
else if ( $justChanged !== FALSE )
|
||||
{
|
||||
unset( $conflicts[ $key ] );
|
||||
}
|
||||
$conflicts[ md5( uniqid() ) ] = array( 'original' => $this->get( $key ), 'current' => $record->$key, 'field' => $field );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user