Make createAnonProfile() static

This commit is contained in:
Zach Copley 2010-09-29 16:11:32 -07:00
parent f79f44801c
commit 54f19da3ab
1 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ class AnonymousFavePlugin extends Plugin {
$tally = Fave_tally::decrement($notice->id);
}
function createAnonProfile() {
static function createAnonProfile() {
// Get the anon user's IP, and turn it into a nickname
list($proxy, $ip) = common_client_ip();
@ -253,7 +253,7 @@ class AnonymousFavePlugin extends Plugin {
// Do Profile lookup by ID instead of nickname for safety/performance
$profile = Profile::staticGet('id', $id);
} else {
$profile = $this->createAnonProfile();
$profile = AnonymousFavePlugin::createAnonProfile();
// Obfuscate so it's hard to figure out the Profile ID
$_SESSION['anon_token'] = base64_encode($profile->nickname);
}