We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 54f19da3 authored by Zach Copley's avatar Zach Copley

Make createAnonProfile() static

parent f79f4480
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment