1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/13882] Lazy load the notification avatars.

This moves them further down the waterfall, making the page load
quicker.

PHPBB3-13882
This commit is contained in:
Callum Macrae
2015-05-28 18:05:07 +02:00
parent 44fcdd007f
commit be1d1c7d05
13 changed files with 48 additions and 15 deletions

View File

@@ -104,7 +104,7 @@ class admin_activate_user extends \phpbb\notification\type\base
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->item_id);
return $this->user_loader->get_avatar($this->item_id, false, true);
}
/**

View File

@@ -96,7 +96,7 @@ class group_request extends \phpbb\notification\type\base
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->item_id);
return $this->user_loader->get_avatar($this->item_id, false, true);
}
/**

View File

@@ -100,7 +100,7 @@ class pm extends \phpbb\notification\type\base
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('from_user_id'));
return $this->user_loader->get_avatar($this->get_data('from_user_id'), false, true);
}
/**

View File

@@ -165,7 +165,7 @@ class post extends \phpbb\notification\type\base
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('poster_id'));
return $this->user_loader->get_avatar($this->get_data('poster_id'), false, true);
}
/**

View File

@@ -223,7 +223,7 @@ class report_pm extends \phpbb\notification\type\pm
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('reporter_id'));
return $this->user_loader->get_avatar($this->get_data('reporter_id'), false, true);
}
/**

View File

@@ -130,7 +130,7 @@ class report_pm_closed extends \phpbb\notification\type\pm
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('closer_id'));
return $this->user_loader->get_avatar($this->get_data('closer_id'), false, true);
}
/**

View File

@@ -196,7 +196,7 @@ class report_post extends \phpbb\notification\type\post_in_queue
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('reporter_id'));
return $this->user_loader->get_avatar($this->get_data('reporter_id'), false, true);
}
/**

View File

@@ -137,7 +137,7 @@ class report_post_closed extends \phpbb\notification\type\post
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('closer_id'));
return $this->user_loader->get_avatar($this->get_data('closer_id'), false, true);
}
/**

View File

@@ -119,7 +119,7 @@ class topic extends \phpbb\notification\type\base
*/
public function get_avatar()
{
return $this->user_loader->get_avatar($this->get_data('poster_id'));
return $this->user_loader->get_avatar($this->get_data('poster_id'), false, true);
}
/**