forked from GNUsocial/gnu-social
use common functions
I used the common function for the avatar URL, in case there's an avatar server. I used the common W3C DTF function. darcs-hash:20080717155212-84dde-15d39c28e6b502767c1deaf838f6a65136baeda9.gz
This commit is contained in:
parent
74b063f20b
commit
91d0250414
13
sitemap.php
13
sitemap.php
@ -99,7 +99,7 @@ function notices_map() {
|
|||||||
|
|
||||||
$notice = array(
|
$notice = array(
|
||||||
'url' => $notices->uri,
|
'url' => $notices->uri,
|
||||||
'lastmod' => w3cdate($notices->modified),
|
'lastmod' => common_date_w3dtf($notices->modified),
|
||||||
'changefreq' => 'daily',
|
'changefreq' => 'daily',
|
||||||
'priority' => '1',
|
'priority' => '1',
|
||||||
);
|
);
|
||||||
@ -227,8 +227,8 @@ function avatar_map() {
|
|||||||
}
|
}
|
||||||
w3cdate($avatars->modified);
|
w3cdate($avatars->modified);
|
||||||
$image = array(
|
$image = array(
|
||||||
'url' => $avatars->url,
|
'url' => common_avatar_display_url($avatars),
|
||||||
'lastmod' => w3cdate($avatars->modified),
|
'lastmod' => common_date_w3dtf($avatars->modified),
|
||||||
'changefreq' => 'monthly',
|
'changefreq' => 'monthly',
|
||||||
'priority' => '0.2',
|
'priority' => '0.2',
|
||||||
);
|
);
|
||||||
@ -345,13 +345,6 @@ function parse_args() {
|
|||||||
return $paths;
|
return $paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Format database timestamps as W3C DTF.
|
|
||||||
function w3cdate ($timestamp) {
|
|
||||||
preg_match('/(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/', $timestamp, $date);
|
|
||||||
|
|
||||||
return date(DATE_W3C, mktime($date[4], $date[5], $date[6], $date[2], $date[3], $date[1]));
|
|
||||||
}
|
|
||||||
|
|
||||||
# Ensure paths end with a "/".
|
# Ensure paths end with a "/".
|
||||||
function trailing_slash($path) {
|
function trailing_slash($path) {
|
||||||
if (preg_match('/\/$/', $path) == 0) {
|
if (preg_match('/\/$/', $path) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user