From 25b1ebad8bc015b75ac4e8f00afad7cd408f2dc0 Mon Sep 17 00:00:00 2001 From: shish <shish@7f39781d-f577-437e-ae19-be835c7a54ca> Date: Thu, 2 Aug 2007 19:57:40 +0000 Subject: [PATCH] search user rather than poster; everything else refers to 'user' git-svn-id: file:///home/shish/svn/shimmie2/trunk@420 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 4 ++-- ext/user/theme.php | 2 +- themes/danbooru/user.theme.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 2287a03c..f984344f 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -129,9 +129,9 @@ class Database { $val = parse_shorthand_int($matches[3]); $img_search->append(new Querylet("AND (images.$col $cmp $val)")); } - else if(preg_match("/poster=(.*)/i", $term, $matches)) { + else if(preg_match("/(poster|user)=(.*)/i", $term, $matches)) { global $database; - $user = $database->get_user_by_name($matches[1]); + $user = $database->get_user_by_name($matches[2]); if(!is_null($user)) { $user_id = $user->id; } diff --git a/ext/user/theme.php b/ext/user/theme.php index decab2e7..a8631d86 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -121,7 +121,7 @@ class UserPageTheme extends Themelet { $h_comment_rate = sprintf("%3.1f", ($i_comment_count / $i_days_old2)); $u_name = url_escape($duser->name); - $images_link = make_link("post/list", "search=poster%3D$u_name"); + $images_link = make_link("post/list/user=$u_name/1"); return " Join date: $h_join_date ($i_days_old days old) diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php index 45c49867..395a63e4 100644 --- a/themes/danbooru/user.theme.php +++ b/themes/danbooru/user.theme.php @@ -122,7 +122,7 @@ class UserPageTheme extends Themelet { $h_comment_rate = sprintf("%3.1f", ($i_comment_count / $i_days_old2)); $u_name = url_escape($duser->name); - $images_link = make_link("post/list", "search=poster%3D$u_name"); + $images_link = make_link("post/list/user=$u_name/1"); return " Join date: $h_join_date ($i_days_old days old)