Store gravatar image in DB
This commit is contained in:
@@ -83,7 +83,7 @@ class Spot extends Main
|
||||
Project::PROJ_TABLE => array('name', 'codename', 'active_from', 'active_to', 'timezone'),
|
||||
self::POST_TABLE => array(Db::getId(Project::PROJ_TABLE), Db::getId(User::USER_TABLE), 'name', 'content', 'site_time'),
|
||||
Media::MEDIA_TABLE => array(Db::getId(Project::PROJ_TABLE), 'filename', 'type', 'taken_on', 'posted_on', 'rotate', 'comment'),
|
||||
User::USER_TABLE => array('name', 'email', 'language', 'timezone', 'active'),
|
||||
User::USER_TABLE => array('name', 'email', 'gravatar', 'language', 'timezone', 'active'),
|
||||
self::MAP_TABLE => array('codename', 'geo_name', 'min_zoom', 'max_zoom', 'attribution'),
|
||||
self::MAPPING_TABLE => array(Db::getId(self::MAP_TABLE) , Db::getId(Project::PROJ_TABLE))
|
||||
),
|
||||
@@ -120,7 +120,8 @@ class Spot extends Main
|
||||
'geo_name' => "VARCHAR(100)",
|
||||
'min_zoom' => "TINYINT UNSIGNED",
|
||||
'max_zoom' => "TINYINT UNSIGNED",
|
||||
'attribution' => "VARCHAR(100)"
|
||||
'attribution' => "VARCHAR(100)",
|
||||
'gravatar' => "LONGTEXT"
|
||||
),
|
||||
'constraints' => array
|
||||
(
|
||||
@@ -361,7 +362,7 @@ class Spot extends Main
|
||||
private function getPosts()
|
||||
{
|
||||
$asInfo = array(
|
||||
'select' => array(Db::getFullColumnName(self::POST_TABLE, '*'), 'MD5(email) AS email_hash'),
|
||||
'select' => array(Db::getFullColumnName(self::POST_TABLE, '*'), 'gravatar'),
|
||||
'from' => self::POST_TABLE,
|
||||
'join' => array(User::USER_TABLE => Db::getId(User::USER_TABLE)),
|
||||
'constraint'=> array(Db::getId(Project::PROJ_TABLE) => $this->oProject->getProjectId()),
|
||||
|
||||
Reference in New Issue
Block a user