- $m->connect('main/remote?nickname=:nickname', array('action' => 'remotesubscribe'), array('nickname' => '['.NICKNAME_FMT.']+'));
+ $m->connect('main/remote?nickname=:nickname', array('action' => 'remotesubscribe'), array('nickname' => '[A-Za-z0-9_-]+'));
foreach (Router::$bare as $action) {
$m->connect('index.php?action=' . $action, array('action' => $action));
foreach (Router::$bare as $action) {
$m->connect('index.php?action=' . $action, array('action' => $action));
$m->connect('notice/new', array('action' => 'newnotice'));
$m->connect('notice/new?replyto=:replyto',
array('action' => 'newnotice'),
$m->connect('notice/new', array('action' => 'newnotice'));
$m->connect('notice/new?replyto=:replyto',
array('action' => 'newnotice'),
$m->connect('notice/new?replyto=:replyto&inreplyto=:inreplyto',
array('action' => 'newnotice'),
$m->connect('notice/new?replyto=:replyto&inreplyto=:inreplyto',
array('action' => 'newnotice'),
array('inreplyto' => '[0-9]+'));
$m->connect('notice/:notice/file',
array('inreplyto' => '[0-9]+'));
$m->connect('notice/:notice/file',
array('id' => '[0-9]+'));
$m->connect('message/new', array('action' => 'newmessage'));
array('id' => '[0-9]+'));
$m->connect('message/new', array('action' => 'newmessage'));
- $m->connect('message/new?to=:to', array('action' => 'newmessage'), array('to' => '['.NICKNAME_FMT.']+'));
+ $m->connect('message/new?to=:to', array('action' => 'newmessage'), array('to' => '[A-Za-z0-9_-]+'));
$m->connect('message/:message',
array('action' => 'showmessage'),
array('message' => '[0-9]+'));
$m->connect('message/:message',
array('action' => 'showmessage'),
array('message' => '[0-9]+'));
$m->connect('api/statuses/friends_timeline/:id.:format',
array('action' => 'ApiTimelineFriends',
$m->connect('api/statuses/friends_timeline/:id.:format',
array('action' => 'ApiTimelineFriends',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/home_timeline.:format',
array('action' => 'ApiTimelineFriends',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/home_timeline.:format',
array('action' => 'ApiTimelineFriends',
$m->connect('api/statuses/home_timeline/:id.:format',
array('action' => 'ApiTimelineFriends',
$m->connect('api/statuses/home_timeline/:id.:format',
array('action' => 'ApiTimelineFriends',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/user_timeline.:format',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/user_timeline.:format',
$m->connect('api/statuses/user_timeline/:id.:format',
array('action' => 'ApiTimelineUser',
$m->connect('api/statuses/user_timeline/:id.:format',
array('action' => 'ApiTimelineUser',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/mentions.:format',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/mentions.:format',
$m->connect('api/statuses/mentions/:id.:format',
array('action' => 'ApiTimelineMentions',
$m->connect('api/statuses/mentions/:id.:format',
array('action' => 'ApiTimelineMentions',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/replies.:format',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/replies.:format',
$m->connect('api/statuses/replies/:id.:format',
array('action' => 'ApiTimelineMentions',
$m->connect('api/statuses/replies/:id.:format',
array('action' => 'ApiTimelineMentions',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/friends.:format',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/friends.:format',
$m->connect('api/statuses/friends/:id.:format',
array('action' => 'ApiUserFriends',
$m->connect('api/statuses/friends/:id.:format',
array('action' => 'ApiUserFriends',
'format' => '(xml|json)'));
$m->connect('api/statuses/followers.:format',
'format' => '(xml|json)'));
$m->connect('api/statuses/followers.:format',
$m->connect('api/statuses/followers/:id.:format',
array('action' => 'ApiUserFollowers',
$m->connect('api/statuses/followers/:id.:format',
array('action' => 'ApiUserFollowers',
'format' => '(xml|json)'));
$m->connect('api/statuses/show.:format',
'format' => '(xml|json)'));
$m->connect('api/statuses/show.:format',
$m->connect('api/users/show/:id.:format',
array('action' => 'ApiUserShow',
$m->connect('api/users/show/:id.:format',
array('action' => 'ApiUserShow',
$m->connect('api/friendships/create/:id.:format',
array('action' => 'ApiFriendshipsCreate',
$m->connect('api/friendships/create/:id.:format',
array('action' => 'ApiFriendshipsCreate',
'format' => '(xml|json)'));
$m->connect('api/friendships/destroy/:id.:format',
array('action' => 'ApiFriendshipsDestroy',
'format' => '(xml|json)'));
$m->connect('api/friendships/destroy/:id.:format',
array('action' => 'ApiFriendshipsDestroy',
$m->connect('api/favorites/:id.:format',
array('action' => 'ApiTimelineFavorites',
$m->connect('api/favorites/:id.:format',
array('action' => 'ApiTimelineFavorites',
'format' => '(xmljson|rss|atom)'));
$m->connect('api/favorites/create/:id.:format',
array('action' => 'ApiFavoriteCreate',
'format' => '(xmljson|rss|atom)'));
$m->connect('api/favorites/create/:id.:format',
array('action' => 'ApiFavoriteCreate',
'format' => '(xml|json)'));
$m->connect('api/favorites/destroy/:id.:format',
array('action' => 'ApiFavoriteDestroy',
'format' => '(xml|json)'));
$m->connect('api/favorites/destroy/:id.:format',
array('action' => 'ApiFavoriteDestroy',
'format' => '(xml|json)'));
// blocks
$m->connect('api/blocks/create/:id.:format',
array('action' => 'ApiBlockCreate',
'format' => '(xml|json)'));
// blocks
$m->connect('api/blocks/create/:id.:format',
array('action' => 'ApiBlockCreate',
'format' => '(xml|json)'));
$m->connect('api/blocks/destroy/:id.:format',
array('action' => 'ApiBlockDestroy',
'format' => '(xml|json)'));
$m->connect('api/blocks/destroy/:id.:format',
array('action' => 'ApiBlockDestroy',
$m->connect('admin/site', array('action' => 'siteadminpanel'));
$m->connect('admin/design', array('action' => 'designadminpanel'));
$m->connect('admin/site', array('action' => 'siteadminpanel'));
$m->connect('admin/design', array('action' => 'designadminpanel'));
$m->connect('getfile/:filename',
array('action' => 'getfile'),
$m->connect('getfile/:filename',
array('action' => 'getfile'),
'replies', 'inbox', 'outbox', 'microsummary') as $a) {
$m->connect(':nickname/'.$a,
array('action' => $a),
'replies', 'inbox', 'outbox', 'microsummary') as $a) {
$m->connect(':nickname/'.$a,
array('action' => $a),
}
foreach (array('subscriptions', 'subscribers') as $a) {
$m->connect(':nickname/'.$a.'/:tag',
array('action' => $a),
array('tag' => '[a-zA-Z0-9]+',
}
foreach (array('subscriptions', 'subscribers') as $a) {
$m->connect(':nickname/'.$a.'/:tag',
array('action' => $a),
array('tag' => '[a-zA-Z0-9]+',
foreach (array('all', 'replies', 'favorites') as $a) {
$m->connect(':nickname/'.$a.'/rss',
array('action' => $a.'rss'),
foreach (array('all', 'replies', 'favorites') as $a) {
$m->connect(':nickname/'.$a.'/rss',
array('action' => $a.'rss'),
}
$m->connect(':nickname/favorites',
array('action' => 'showfavorites'),
}
$m->connect(':nickname/favorites',
array('action' => 'showfavorites'),
$m->connect(':nickname/avatar/:size',
array('action' => 'avatarbynickname'),
array('size' => '(original|96|48|24)',
$m->connect(':nickname/avatar/:size',
array('action' => 'avatarbynickname'),
array('size' => '(original|96|48|24)',
$m->connect(':nickname/tag/:tag/rss',
array('action' => 'userrss'),
$m->connect(':nickname/tag/:tag/rss',
array('action' => 'userrss'),
array('tag' => '[a-zA-Z0-9]+'));
$m->connect(':nickname/tag/:tag',
array('action' => 'showstream'),
array('tag' => '[a-zA-Z0-9]+'));
$m->connect(':nickname/tag/:tag',
array('action' => 'showstream'),
array('tag' => '[a-zA-Z0-9]+'));
$m->connect(':nickname',
array('action' => 'showstream'),
array('tag' => '[a-zA-Z0-9]+'));
$m->connect(':nickname',
array('action' => 'showstream'),