X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=sitemap.php;h=ae40d7a89a9cf21c93c6749a5e1f7faebc0a7cef;hb=485331f99d5dfdfd7f1dca60853dac292f721b55;hp=cf7d3f1991e7f7e63ee4de0abfef7ad9a1e02cd3;hpb=91d0250414d4fe934ee7cd7cfa7332f7be9ef1c1;p=quix0rs-gnu-social.git diff --git a/sitemap.php b/sitemap.php index cf7d3f1991..ae40d7a89a 100644 --- a/sitemap.php +++ b/sitemap.php @@ -206,30 +206,28 @@ function user_map() { function avatar_map() { global $output_paths; - $avatars = DB_DataObject::factory('avatar'); - - $avatars->query('SELECT url, modified FROM avatar'); + $avatars = new Avatar(); + $avatars->whereAdd('original = 1', "OR"); + $avatars->whereAdd('width = ' . AVATAR_MINI_SIZE, 'OR'); + if (!$avatars->find()) { + return 0; + } + $avatar_count = 0; $map_count = 1; while ($avatars->fetch()) { - # We only want the original size and 24px thumbnail version - skip 96px. - if (preg_match('/-96-/', $avatars->url)) { - continue; - } - # Maximum 50,000 URLs per sitemap file. if ($avatar_count == 50000) { $avatar_count = 0; $map_count++; } -w3cdate($avatars->modified); $image = array( 'url' => common_avatar_display_url($avatars), 'lastmod' => common_date_w3dtf($avatars->modified), - 'changefreq' => 'monthly', + 'changefreq' => 'never', 'priority' => '0.2', );