Add Timezone to user data
This commit is contained in:
53
inc/spot.php
53
inc/spot.php
@@ -80,38 +80,39 @@ 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', 'active')
|
||||
User::USER_TABLE => array('name', 'email', 'language', 'timezone', 'active', 'frequency')
|
||||
),
|
||||
'types' => array
|
||||
(
|
||||
'ref_msg_id' => "INT",
|
||||
'type' => "VARCHAR(20)",
|
||||
'latitude' => "DECIMAL(7,5)",
|
||||
'longitude' => "DECIMAL(8,5)",
|
||||
'iso_time' => "VARCHAR(24)",
|
||||
'site_time' => "TIMESTAMP DEFAULT 0", //DEFAULT 0 removes auto-set to current time
|
||||
'unix_time' => "INT",
|
||||
'content' => "LONGTEXT",
|
||||
'battery_state' => "VARCHAR(10)",
|
||||
'ref_spot_id' => "VARCHAR(10)",
|
||||
'name' => "VARCHAR(100)",
|
||||
'codename' => "VARCHAR(100)",
|
||||
'model' => "VARCHAR(20)",
|
||||
'ref_feed_id' => "VARCHAR(40)",
|
||||
'description' => "VARCHAR(100)",
|
||||
'status' => "VARCHAR(10)",
|
||||
'active' => "BOOLEAN",
|
||||
'active_from' => "TIMESTAMP DEFAULT 0",
|
||||
'active_to' => "TIMESTAMP DEFAULT 0",
|
||||
'timezone' => "VARCHAR(100)",
|
||||
'last_update' => "TIMESTAMP DEFAULT 0",
|
||||
'filename' => "VARCHAR(100) NOT NULL",
|
||||
'taken_on' => "TIMESTAMP DEFAULT 0",
|
||||
'posted_on' => "TIMESTAMP DEFAULT 0",
|
||||
'rotate' => "SMALLINT",
|
||||
'battery_state' => "VARCHAR(10)",
|
||||
'codename' => "VARCHAR(100)",
|
||||
'content' => "LONGTEXT",
|
||||
'comment' => "LONGTEXT",
|
||||
'email' => "VARCHAR(320)",
|
||||
'description' => "VARCHAR(100)",
|
||||
'email' => "VARCHAR(320) NOT NULL",
|
||||
'filename' => "VARCHAR(100) NOT NULL",
|
||||
'frequency' => "VARCHAR(1) NOT NULL",
|
||||
'iso_time' => "VARCHAR(24)",
|
||||
'language' => "VARCHAR(2)",
|
||||
'active' => "BOOLEAN"
|
||||
'last_update' => "TIMESTAMP DEFAULT 0",
|
||||
'latitude' => "DECIMAL(7,5)",
|
||||
'longitude' => "DECIMAL(8,5)",
|
||||
'model' => "VARCHAR(20)",
|
||||
'name' => "VARCHAR(100)",
|
||||
'posted_on' => "TIMESTAMP DEFAULT 0",
|
||||
'ref_feed_id' => "VARCHAR(40)",
|
||||
'ref_msg_id' => "INT",
|
||||
'ref_spot_id' => "VARCHAR(10)",
|
||||
'rotate' => "SMALLINT",
|
||||
'site_time' => "TIMESTAMP DEFAULT 0", //DEFAULT 0 removes auto-set to current time
|
||||
'status' => "VARCHAR(10)",
|
||||
'taken_on' => "TIMESTAMP DEFAULT 0",
|
||||
'timezone' => "CHAR(64)", //see mysql.time_zone_name
|
||||
'type' => "VARCHAR(20)",
|
||||
'unix_time' => "INT"
|
||||
),
|
||||
'constraints' => array
|
||||
(
|
||||
@@ -248,7 +249,7 @@ class Spot extends Main
|
||||
}
|
||||
|
||||
public function subscribe($sEmail) {
|
||||
$asResult = $this->oUser->addUser($sEmail, $this->oLang->getLanguage());
|
||||
$asResult = $this->oUser->addUser($sEmail, $this->oLang->getLanguage(), date_default_timezone_get());
|
||||
$asUserInfo = $this->oUser->getUserInfo();
|
||||
|
||||
//Send Confirmation Email
|
||||
|
||||
Reference in New Issue
Block a user