forked from GNUsocial/gnu-social
use an array of profiles rather than a looping cursor for profile lists
This commit is contained in:
@@ -98,7 +98,7 @@ class Profile extends Managed_DataObject
|
||||
return $this->_user;
|
||||
}
|
||||
|
||||
protected $_avatars = array();
|
||||
protected $_avatars;
|
||||
|
||||
function getAvatar($width, $height=null)
|
||||
{
|
||||
@@ -106,6 +106,10 @@ class Profile extends Managed_DataObject
|
||||
$height = $width;
|
||||
}
|
||||
|
||||
if (!isset($this->_avatars)) {
|
||||
$this->_avatars = array();
|
||||
}
|
||||
|
||||
if (array_key_exists($width, $this->_avatars)) {
|
||||
return $this->_avatars[$width];
|
||||
}
|
||||
|
Reference in New Issue
Block a user