@@ 1634-1645 (lines=12) @@ | ||
1631 | * @param bool|string $suffix If not false, the name of an archived file |
|
1632 | * @return string |
|
1633 | */ |
|
1634 | function getArchiveUrl( $suffix = false ) { |
|
1635 | $this->assertRepoDefined(); |
|
1636 | $ext = $this->getExtension(); |
|
1637 | $path = $this->repo->getZoneUrl( 'public', $ext ) . '/archive/' . $this->getHashPath(); |
|
1638 | if ( $suffix === false ) { |
|
1639 | $path = substr( $path, 0, -1 ); |
|
1640 | } else { |
|
1641 | $path .= rawurlencode( $suffix ); |
|
1642 | } |
|
1643 | ||
1644 | return $path; |
|
1645 | } |
|
1646 | ||
1647 | /** |
|
1648 | * Get the URL of the archived file's thumbs, or a particular thumb if $suffix is specified |
|
@@ 1654-1666 (lines=13) @@ | ||
1651 | * @param bool|string $suffix If not false, the name of a thumbnail file |
|
1652 | * @return string |
|
1653 | */ |
|
1654 | function getArchiveThumbUrl( $archiveName, $suffix = false ) { |
|
1655 | $this->assertRepoDefined(); |
|
1656 | $ext = $this->getExtension(); |
|
1657 | $path = $this->repo->getZoneUrl( 'thumb', $ext ) . '/archive/' . |
|
1658 | $this->getHashPath() . rawurlencode( $archiveName ) . "/"; |
|
1659 | if ( $suffix === false ) { |
|
1660 | $path = substr( $path, 0, -1 ); |
|
1661 | } else { |
|
1662 | $path .= rawurlencode( $suffix ); |
|
1663 | } |
|
1664 | ||
1665 | return $path; |
|
1666 | } |
|
1667 | ||
1668 | /** |
|
1669 | * Get the URL of the zone directory, or a particular file if $suffix is specified |
|
@@ 1728-1738 (lines=11) @@ | ||
1725 | * @param bool|string $suffix If not false, the name of a thumbnail file |
|
1726 | * @return string |
|
1727 | */ |
|
1728 | function getArchiveVirtualUrl( $suffix = false ) { |
|
1729 | $this->assertRepoDefined(); |
|
1730 | $path = $this->repo->getVirtualUrl() . '/public/archive/' . $this->getHashPath(); |
|
1731 | if ( $suffix === false ) { |
|
1732 | $path = substr( $path, 0, -1 ); |
|
1733 | } else { |
|
1734 | $path .= rawurlencode( $suffix ); |
|
1735 | } |
|
1736 | ||
1737 | return $path; |
|
1738 | } |
|
1739 | ||
1740 | /** |
|
1741 | * Get the virtual URL for a thumbnail file or directory |