@@ -50,7 +50,9 @@ |
||
| 50 | 50 | $file = array_pop($parts); |
| 51 | 51 | $dir = ''; |
| 52 | 52 | foreach ($parts as $part) { |
| 53 | - if (!is_dir($dir .= "$part/")) mkdir($dir); |
|
| 53 | + if (!is_dir($dir .= "$part/")) { |
|
| 54 | + mkdir($dir); |
|
| 55 | + } |
|
| 54 | 56 | } |
| 55 | 57 | if( is_file($destination) ){ |
| 56 | 58 | rename($destination, $destination . '.bak'); |
@@ -251,10 +251,11 @@ discard block |
||
| 251 | 251 | 'available' => $available |
| 252 | 252 | ]; |
| 253 | 253 | |
| 254 | - foreach($from as $xKey => $xs) |
|
| 255 | - foreach($xs as $yKey => $pair) |
|
| 254 | + foreach($from as $xKey => $xs) { |
|
| 255 | + foreach($xs as $yKey => $pair) |
|
| 256 | 256 | if( $yKey === $entityY->getId() ) { |
| 257 | 257 | $r[$who][$xKey] = $pair[0]; |
| 258 | + } |
|
| 258 | 259 | unset($r['available'][$xKey]); |
| 259 | 260 | } |
| 260 | 261 | |
@@ -268,10 +269,11 @@ discard block |
||
| 268 | 269 | 'available' => $available |
| 269 | 270 | ]; |
| 270 | 271 | |
| 271 | - foreach($from as $xKey => $xs) |
|
| 272 | - foreach($xs as $yKey => $pair) |
|
| 272 | + foreach($from as $xKey => $xs) { |
|
| 273 | + foreach($xs as $yKey => $pair) |
|
| 273 | 274 | if ($xKey === $entityX->getId()) { |
| 274 | 275 | $r[$who][$yKey] = $pair[1]; |
| 276 | + } |
|
| 275 | 277 | unset($r['available'][$yKey]); |
| 276 | 278 | } |
| 277 | 279 | |