]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Resolve conflicts after pull from evan
authormikec <mikec@mikenz.geek.nz>
Mon, 21 Jul 2008 13:56:37 +0000 (09:56 -0400)
committermikec <mikec@mikenz.geek.nz>
Mon, 21 Jul 2008 13:56:37 +0000 (09:56 -0400)
darcs-hash:20080721135637-edabd-cca33bc0a0936423b9fd2ffdf9413236123d680e.gz

actions/emailsettings.php
actions/profilesettings.php
classes/User.php
classes/stoica.ini
db/laconica.sql
lib/common.php

index 72bad8519f67c1e785b9e4ff715c51e95041d891..5e2c06bbd3c90c8b3270e76ce57038d1b171fb91 100644 (file)
@@ -87,7 +87,13 @@ class EmailsettingsAction extends SettingsAction {
                common_checkbox('emailnotifysub',
                                _('Send me notices of new subscriptions through email.'),
                                $user->emailnotifysub);
-               
+               common_checkbox('emailpost',
+                                               _('I want to post notices by email.'),
+                                               $user->emailpost);
+               common_checkbox('emailmicroid',
+                               _('Publish a MicroID for my email address.'),
+                               $user->emailmicroid);
+
                common_submit('save', _('Save'));
                
                common_element_end('form');
@@ -128,6 +134,8 @@ class EmailsettingsAction extends SettingsAction {
        function save_preferences() {
 
                $emailnotifysub = $this->boolean('emailnotifysub');
+               $emailmicroid = $this->boolean('emailmicroid');
+               $emailpost = $this->boolean('emailpost');
 
                $user = common_current_user();
 
@@ -138,6 +146,8 @@ class EmailsettingsAction extends SettingsAction {
                $original = clone($user);
 
                $user->emailnotifysub = $emailnotifysub;
+               $user->emailmicroid = $emailmicroid;
+               $user->emailpost = $emailpost;
 
                $result = $user->update($original);
 
index cfa4db0d77a87a520ca1009e17f78007039f31e6..f2fe89826eae19749c83e8287778a892ea4a7f04 100644 (file)
@@ -52,6 +52,18 @@ class ProfilesettingsAction extends SettingsAction {
                common_input('location', _('Location'),
                                         ($this->arg('location')) ? $this->arg('location') : $profile->location,
                                         _('Where you are, like "City, State (or Region), Country"'));
+
+               $language = common_language();
+               common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), TRUE, $language);
+               $timezone = common_timezone();
+               $timezones = array();
+               foreach(DateTimeZone::listIdentifiers() as $k => $v) {
+                       $timezones[$v] = $v;
+               }
+               common_dropdown('timezone', _('Timezone'), $timezones, _('What timezone are you normally in?'), TRUE, $timezone);
+
+               common_checkbox('autosubscribe', _('Automatically subscribe to whoever subscribes to me (best for non-humans)'),
+                                               ($this->arg('autosubscribe')) ? $this->boolean('autosubscribe') : $user->autosubscribe);
                common_submit('submit', _('Save'));
                common_element_end('form');
                common_show_footer();
@@ -64,6 +76,9 @@ class ProfilesettingsAction extends SettingsAction {
                $homepage = $this->trimmed('homepage');
                $bio = $this->trimmed('bio');
                $location = $this->trimmed('location');
+               $autosubscribe = $this->boolean('autosubscribe');
+               $language = $this->trimmed('language');
+               $timezone = $this->trimmed('timezone');
 
                # Some validation
 
index b7feab60230c81247dd0aaa72abb779b89a2ea45..a6c860588b6c027bf0b6582b2426816719eda778 100644 (file)
@@ -32,22 +32,26 @@ class User extends DB_DataObject
     public $__table = 'user';                            // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)  unique_key
-    public $password;                        // varchar(255)  
+    public $password;                        // varchar(255)
     public $email;                           // varchar(255)  unique_key
     public $incomingemail;                   // varchar(255)  unique_key
     public $emailnotifysub;                  // tinyint(1)   default_1
+    public $emailmicroid;                    // tinyint(1)   default_1
+    public $language;                        // varchar(50)
+    public $timezone;                        // varchar(50)
+    public $emailpost;                       // tinyint(1)   default_1
     public $jabber;                          // varchar(255)  unique_key
-    public $jabbernotify;                    // tinyint(1)  
-    public $jabberreplies;                   // tinyint(1)  
+    public $jabbernotify;                    // tinyint(1)
+    public $jabberreplies;                   // tinyint(1)
     public $jabbermicroid;                   // tinyint(1)   default_1
-    public $updatefrompresence;              // tinyint(1)  
+    public $updatefrompresence;              // tinyint(1)
     public $sms;                             // varchar(64)  unique_key
-    public $carrier;                         // int(4)  
-    public $smsnotify;                       // tinyint(1)  
-    public $smsreplies;                      // tinyint(1)  
-    public $smsemail;                        // varchar(255)  
+    public $carrier;                         // int(4)
+    public $smsnotify;                       // tinyint(1)
+    public $smsreplies;                      // tinyint(1)
+    public $smsemail;                        // varchar(255)
     public $uri;                             // varchar(255)  unique_key
-    public $autosubscribe;                   // tinyint(1)  
+    public $autosubscribe;                   // tinyint(1)
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -79,7 +83,7 @@ class User extends DB_DataObject
 
        function updateKeys(&$orig) {
                $parts = array();
-               foreach (array('nickname', 'email', 'jabber', 'sms', 'carrier') as $k) {
+               foreach (array('nickname', 'email', 'jabber', 'incomingemail', 'sms', 'carrier', 'smsemail', 'language', 'timezone') as $k) {
                        if (strcmp($this->$k, $orig->$k) != 0) {
                                $parts[] = $k . ' = ' . $this->_quote($this->$k);
                        }
index 31fb6d1592c48e65d394b3c032c6c8eb23dc8fb9..3042b3aa08e0c9e3bcbe2ad534a165613a24c323 100644 (file)
@@ -172,6 +172,10 @@ password = 2
 email = 2
 incomingemail = 2
 emailnotifysub = 17
+emailmicroid = 17
+language = 2
+timezone = 2
+emailpost = 17
 jabber = 2
 jabbernotify = 17
 jabberreplies = 17
index 79c34e712a0dc7227f17f8140716c911fe8150aa..ae5184778e9ae9cdb14e5c08ccd1ac3ebdf469ee 100644 (file)
@@ -47,6 +47,10 @@ create table user (
     email varchar(255) unique key comment 'email address for password recovery etc.',
     incomingemail varchar(255) unique key comment 'email address for post-by-email',
     emailnotifysub tinyint default 1 comment 'Notify by email of subscriptions',
+    emailmicroid tinyint default 1 comment 'whether to publish email microid',
+    language varchar(50) comment 'preferred language',
+    timezone varchar(50) comment 'timezone',
+    emailpost tinyint default 1 comment 'Post by email',
     jabber varchar(255) unique key comment 'jabber ID for notices',
     jabbernotify tinyint default 0 comment 'whether to send notices to jabber',
     jabberreplies tinyint default 0 comment 'whether to send notices to jabber on replies',
index b4c16660faa09c1eac805d13b8f2e7123dd0b594..dadf64ae370ec53e8ab88c5e33a8356554044a53 100644 (file)
@@ -121,5 +121,7 @@ require_once(INSTALLDIR.'/classes/Confirm_address.php');
 require_once(INSTALLDIR.'/classes/Remember_me.php');
 require_once(INSTALLDIR.'/classes/Queue_item.php');
 require_once(INSTALLDIR.'/classes/Reply.php');
+require_once(INSTALLDIR.'/classes/Notice_tag.php');
+require_once(INSTALLDIR.'/classes/Sms_carrier.php');
 
 require_once('markdown.php');