mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-26 01:34:09 -04:00
Create url::abs_site() and url::abs_file() to allow us to generate
full URLs with a clean API, and isolate the cruddy party where we have to hardcode the server protocol into a single file.
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title><?= $item->title ?></title>
|
||||
<link><?= url::site("albums/{$item->id}", "http") ?></link>
|
||||
<link><?= url::abs_site("albums/{$item->id}") ?></link>
|
||||
<description><?= $item->description ?></description>
|
||||
<language>en-us</language>
|
||||
<atom:link rel="self" href="<?= url::site("media_rss/feed/{$item->id}") ?>" type="application/rss+xml" />
|
||||
<atom:link rel="self" href="<?= url::abs_site("media_rss/feed/{$item->id}") ?>" type="application/rss+xml" />
|
||||
<? if (isset($prevOffset)): ?>
|
||||
<atom:link rel="previous" href="<?= url::site("media_rss/feed/{$item->id}?offset={$prevOffset}") ?>"
|
||||
<atom:link rel="previous" href="<?= url::abs_site("media_rss/feed/{$item->id}?offset={$prevOffset}") ?>"
|
||||
type="application/rss+xml" />
|
||||
<? endif; ?>
|
||||
<? if (isset($nextOffset)): ?>
|
||||
<atom:link rel="next" href="<?= url::site("media_rss/feed/{$item->id}?offset={$nextOffset}") ?>"
|
||||
<atom:link rel="next" href="<?= url::abs_site("media_rss/feed/{$item->id}?offset={$nextOffset}") ?>"
|
||||
type="application/rss+xml" />
|
||||
<? endif; ?>
|
||||
<?
|
||||
@@ -23,23 +23,23 @@
|
||||
<pubDate><?= $date ?></pubDate>
|
||||
<lastBuildDate><?= $date ?></lastBuildDate>
|
||||
<? foreach ($children as $child): ?>
|
||||
<item>
|
||||
<item>
|
||||
<title><?= $child->title ?></title>
|
||||
<link><?= url::site("photos/$child->id", "http") ?></link>
|
||||
<link><?= url::abs_site("photos/$child->id") ?></link>
|
||||
<guid isPermaLink="false"><?= $child->id ?></guid>
|
||||
<description><?= $child->description ?></description>
|
||||
<media:group>
|
||||
<media:thumbnail url="<?= $child->thumbnail_url(false, "http") ?>"
|
||||
<media:thumbnail url="<?= $child->thumbnail_url(true) ?>"
|
||||
height="<?= $child->thumbnail_height ?>"
|
||||
width="<?= $child->thumbnail_width ?>"
|
||||
/>
|
||||
<media:content url="<?= $child->resize_url(false, "http") ?>"
|
||||
<media:content url="<?= $child->resize_url(true) ?>"
|
||||
type="<?= $child->mime_type ?>"
|
||||
height="<?= $child->resize_height ?>"
|
||||
width="<?= $child->resize_width ?>"
|
||||
isDefault="true"
|
||||
/>
|
||||
<media:content url="<?= $child->url(false, "http") ?>"
|
||||
<media:content url="<?= $child->file_url(true) ?>"
|
||||
type="<?= $child->mime_type ?>"
|
||||
height="<?= $child->height ?>"
|
||||
width="<?= $child->width ?>"
|
||||
|
||||
Reference in New Issue
Block a user