| @@ 78-93 (lines=16) @@ | ||
| 75 | ||
| 76 | ||
| 77 | // conflict if both the local and the remote object has been changed |
|
| 78 | if ($localObjectModified && $remoteObjectModified) |
|
| 79 | { |
|
| 80 | $this->conflict($mergedIndex, $remoteObject, $localObject, $lastLocalObject); |
|
| 81 | } |
|
| 82 | ||
| 83 | // add the remote object if only it has been modified |
|
| 84 | elseif ($remoteObjectModified) |
|
| 85 | { |
|
| 86 | $mergedIndex->addObject($remoteObject); |
|
| 87 | } |
|
| 88 | ||
| 89 | // add the local object otherwise if only it or none has been modified |
|
| 90 | else |
|
| 91 | { |
|
| 92 | $mergedIndex->addObject($localObject); |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| 96 | foreach ($remoteIndex as $remoteObject) |
|
| @@ 126-135 (lines=10) @@ | ||
| 123 | ||
| 124 | ||
| 125 | // conflict if both the local and the remote object has been changed |
|
| 126 | if ($localObjectModified && $remoteObjectModified) |
|
| 127 | { |
|
| 128 | $this->conflict($mergedIndex, $remoteObject, $localObject, $lastLocalObject); |
|
| 129 | } |
|
| 130 | ||
| 131 | // another client added the remote object |
|
| 132 | elseif (!$lastLocalObject) |
|
| 133 | { |
|
| 134 | $mergedIndex->addObject($remoteObject); |
|
| 135 | } |
|
| 136 | } |
|
| 137 | } |
|
| 138 | ||