0001-make-versioning-code-compatible-with-older-F-Spot-da.patch
| b/phpfspot.class.php | ||
|---|---|---|
| 530 | 530 |
/* if an alternative version has been requested */ |
| 531 | 531 |
if($version_idx > 0) {
|
| 532 | 532 |
|
| 533 |
/* check for alternative versions */ |
|
| 534 |
if($version = $this->db->db_fetchSingleRow("
|
|
| 535 |
SELECT |
|
| 536 |
version_id, name, uri |
|
| 533 |
$query = "SELECT "; |
|
| 534 |
|
|
| 535 |
/* if F-Spot database revision is before 9, we need |
|
| 536 |
to concat the uri from directory_path & name. |
|
| 537 |
*/ |
|
| 538 |
$query.= $this->dbver < 9 ? |
|
| 539 |
"version_id, name, directory_path " : "version_id, name, uri "; |
|
| 540 |
|
|
| 541 |
$query.= " |
|
| 537 | 542 |
FROM |
| 538 | 543 |
photo_versions |
| 539 | 544 |
WHERE |
| 540 | 545 |
photo_id LIKE '". $idx ."' |
| 541 | 546 |
AND |
| 542 |
version_id LIKE '". $version_idx ."' |
|
| 543 |
")) {
|
|
| 547 |
version_id LIKE '". $version_idx ."'"; |
|
| 548 |
|
|
| 549 |
/* check for alternative versions */ |
|
| 550 |
if($version = $this->db->db_fetchSingleRow($query)) {
|
|
| 544 | 551 |
|
| 545 | 552 |
$row['name'] = $version['name']; |
| 546 |
$row['uri'] = $version['uri']; |
|
| 547 | 553 |
|
| 554 |
/* if F-Spot database revision is before 9, we need |
|
| 555 |
to concat the uri from directory_path & name. |
|
| 556 |
*/ |
|
| 557 |
$row['uri'] = $this->dbver < 9 ? |
|
| 558 |
$version['directory_path'] ."/". $version['name'] : $version['uri']; |
|
| 548 | 559 |
} |
| 549 | 560 |
} |
| 550 | 561 |
|
| 551 |
- |
|