summaryrefslogtreecommitdiff
path: root/modules/profile/profile.pages.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-05 12:50:28 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-05 12:50:28 +0000
commit0b06c68b988410c49c9f4ffbf8c3160d4e9da2c7 (patch)
treef0dc6e87c58f3e0f7315e2808ab88a2f81ba1c52 /modules/profile/profile.pages.inc
parent4e9d1f7d1c97600113edc7bba3f49b59d0bdcb20 (diff)
downloadbrdo-0b06c68b988410c49c9f4ffbf8c3160d4e9da2c7.tar.gz
brdo-0b06c68b988410c49c9f4ffbf8c3160d4e9da2c7.tar.bz2
- Patch #288039 by sun, ff1, agentrickard, fgm, ultimateboy: improved usability of the aliased URL admin page.
Diffstat (limited to 'modules/profile/profile.pages.inc')
-rw-r--r--modules/profile/profile.pages.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc
index fa8dbef31..9cb761a28 100644
--- a/modules/profile/profile.pages.inc
+++ b/modules/profile/profile.pages.inc
@@ -13,7 +13,7 @@ function profile_browse() {
// Ensure that the path is converted to 3 levels always.
list(, $name, $value) = array_pad(explode('/', $_GET['q'], 3), 3, '');
- $field = db_fetch_object(db_query("SELECT DISTINCT(fid), type, title, page, visibility FROM {profile_fields} WHERE name = '%s'", $name));
+ $field = db_fetch_object(db_query("SELECT DISTINCT(fid), type, title, page, visibility FROM {profile_field} WHERE name = '%s'", $name));
if ($name && $field->fid) {
// Only allow browsing of fields that have a page title set.
@@ -29,7 +29,7 @@ function profile_browse() {
// Compile a list of fields to show.
$fields = array();
- $result = db_query('SELECT name, title, type, weight, page FROM {profile_fields} WHERE fid != %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
+ $result = db_query('SELECT name, title, type, weight, page FROM {profile_field} WHERE fid != %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
$fields[] = $record;
}
@@ -55,7 +55,7 @@ function profile_browse() {
}
// Extract the affected users:
- $result = pager_query("SELECT u.uid, u.access FROM {users} u INNER JOIN {profile_values} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access != 0 AND u.status != 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
+ $result = pager_query("SELECT u.uid, u.access FROM {users} u INNER JOIN {profile_value} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access != 0 AND u.status != 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
$content = '';
while ($account = db_fetch_object($result)) {
@@ -82,7 +82,7 @@ function profile_browse() {
else {
// Compile a list of fields to show.
$fields = array();
- $result = db_query('SELECT name, title, type, weight, page, visibility FROM {profile_fields} WHERE visibility = %d ORDER BY category, weight', PROFILE_PUBLIC_LISTINGS);
+ $result = db_query('SELECT name, title, type, weight, page, visibility FROM {profile_field} WHERE visibility = %d ORDER BY category, weight', PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
$fields[] = $record;
}
@@ -109,8 +109,8 @@ function profile_browse() {
*/
function profile_autocomplete($field, $string) {
$matches = array();
- if (db_result(db_query("SELECT COUNT(*) FROM {profile_fields} WHERE fid = %d AND autocomplete = 1", $field))) {
- $result = db_query_range("SELECT value FROM {profile_values} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", array(
+ if (db_result(db_query("SELECT COUNT(*) FROM {profile_field} WHERE fid = %d AND autocomplete = 1", $field))) {
+ $result = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", array(
':fid' => $field,
':value' => $string .'%',
), 0, 10);