|
Revision 45, 474 bytes
(checked in by sven, 3 years ago)
|
dos2unix to clean line endings, set svn property eol-style native, some whitespace homogenisation
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
global $profile_id; |
|---|
| 4 |
$profile_id = (int) $profile_id; |
|---|
| 5 |
|
|---|
| 6 |
global $name_cache; |
|---|
| 7 |
|
|---|
| 8 |
if (!isset($name_cache[$profile_id]) || (time() - $name_cache[$profile_id]->created > 60)) { |
|---|
| 9 |
|
|---|
| 10 |
$result = db_query("select name from users where ident = '$profile_id'"); |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
$name_cache[$profile_id]->created = time(); |
|---|
| 14 |
$name_cache[$profile_id]->data = stripslashes($result[0]->name); |
|---|
| 15 |
|
|---|
| 16 |
} |
|---|
| 17 |
$run_result = $name_cache[$profile_id]->data; |
|---|
| 18 |
|
|---|
| 19 |
?> |
|---|