We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9e592baa authored by Evan Prodromou's avatar Evan Prodromou

move USERS_PER_MAP to plugin

parent d65a6575
...@@ -47,6 +47,8 @@ if (!defined('STATUSNET')) { ...@@ -47,6 +47,8 @@ if (!defined('STATUSNET')) {
class SitemapPlugin extends Plugin class SitemapPlugin extends Plugin
{ {
const USERS_PER_MAP = 25000;
/** /**
* Load related modules when needed * Load related modules when needed
* *
...@@ -85,6 +87,7 @@ class SitemapPlugin extends Plugin ...@@ -85,6 +87,7 @@ class SitemapPlugin extends Plugin
{ {
$m->connect('sitemapindex.xml', $m->connect('sitemapindex.xml',
array('action' => 'sitemapindex')); array('action' => 'sitemapindex'));
$m->connect('/sitemaps/notice/:year/:month/:day/:index.xml', $m->connect('/sitemaps/notice/:year/:month/:day/:index.xml',
array('action' => 'noticesitemap'), array('action' => 'noticesitemap'),
array('year' => '[0-9]{4}', array('year' => '[0-9]{4}',
......
...@@ -43,8 +43,6 @@ if (!defined('STATUSNET')) { ...@@ -43,8 +43,6 @@ if (!defined('STATUSNET')) {
class UsersitemapAction extends SitemapAction class UsersitemapAction extends SitemapAction
{ {
const USERS_PER_MAP = 25000;
var $user = null; var $user = null;
function prepare($args) function prepare($args)
...@@ -55,8 +53,8 @@ class UsersitemapAction extends SitemapAction ...@@ -55,8 +53,8 @@ class UsersitemapAction extends SitemapAction
$i += 0; $i += 0;
$offset = ($i-1) * self::USERS_PER_MAP; $offset = ($i-1) * SitemapPlugin::USERS_PER_MAP;
$limit = self::USERS_PER_MAP; $limit = SitemapPlugin::USERS_PER_MAP;
$this->user = new User(); $this->user = new User();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment