| @@ 279-302 (lines=24) @@ | ||
| 276 | $this->_sortMap($map, $mapIndex); |
|
| 277 | ||
| 278 | $result = array(); |
|
| 279 | foreach($map as $indexedMap) |
|
| 280 | { |
|
| 281 | foreach($indexedMap as $file) |
|
| 282 | { |
|
| 283 | $query = ''; |
|
| 284 | if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName)) |
|
| 285 | { |
|
| 286 | $query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName)); |
|
| 287 | } |
|
| 288 | if($file->query) |
|
| 289 | { |
|
| 290 | if($query) $query .= '&'; |
|
| 291 | $query .= $file->query; |
|
| 292 | } |
|
| 293 | $query = ($query) ? '?' . $query : ''; |
|
| 294 | ||
| 295 | $fullFilePath = $file->filePath . '/' . $file->fileName . $query; |
|
| 296 | $result[] = array( |
|
| 297 | 'file' => $fullFilePath, |
|
| 298 | 'media' => $file->media, |
|
| 299 | 'targetie' => $file->targetIe |
|
| 300 | ); |
|
| 301 | } |
|
| 302 | } |
|
| 303 | ||
| 304 | return $result; |
|
| 305 | } |
|
| @@ 329-351 (lines=23) @@ | ||
| 326 | $this->_sortMap($map, $mapIndex); |
|
| 327 | ||
| 328 | $result = array(); |
|
| 329 | foreach($map as $indexedMap) |
|
| 330 | { |
|
| 331 | foreach($indexedMap as $file) |
|
| 332 | { |
|
| 333 | $query = ''; |
|
| 334 | if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName)) |
|
| 335 | { |
|
| 336 | $query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName)); |
|
| 337 | } |
|
| 338 | if($file->query) |
|
| 339 | { |
|
| 340 | if($query) $query .= '&'; |
|
| 341 | $query .= $file->query; |
|
| 342 | } |
|
| 343 | $query = ($query) ? '?' . $query : ''; |
|
| 344 | ||
| 345 | $fullFilePath = $file->filePath . '/' . $file->fileName . $query; |
|
| 346 | $result[] = array( |
|
| 347 | 'file' => $fullFilePath, |
|
| 348 | 'targetie' => $file->targetIe |
|
| 349 | ); |
|
| 350 | } |
|
| 351 | } |
|
| 352 | ||
| 353 | return $result; |
|
| 354 | } |
|