Twitter integration - decided to change Twitter to service ID #1
darcs-hash:20080827021635-7b5ce-9b96743999aa85a505aecd5f25867937f0c34434.gz
This commit is contained in:
parent
3cf6cef9b9
commit
f5c9a6ebcf
|
@ -32,7 +32,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
$fuser = Foreign_user::getForeignUser($user->id, 0);
|
$fuser = Foreign_user::getForeignUser($user->id, 1);
|
||||||
|
|
||||||
$this->form_header(_('Twitter settings'), $msg, $success);
|
$this->form_header(_('Twitter settings'), $msg, $success);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
|
|
||||||
common_element_start('p');
|
common_element_start('p');
|
||||||
|
|
||||||
common_element('span', 'Twitter User', "http://www.twitter.com/$fuser->nickname");
|
common_element('span', 'Twitter User', $fuser->uri);
|
||||||
common_element('span', 'input_instructions',
|
common_element('span', 'input_instructions',
|
||||||
_('Current verified Twitter User'));
|
_('Current verified Twitter User'));
|
||||||
common_hidden('fuser_id', $fuser->id);
|
common_hidden('fuser_id', $fuser->id);
|
||||||
|
@ -94,7 +94,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
function add_twitter_acct() {
|
function add_twitter_acct() {
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$fuser = Foreign_user::getForeignUser($user->id, 0);
|
$fuser = Foreign_user::getForeignUser($user->id, 1);
|
||||||
|
|
||||||
|
|
||||||
$twitter_username = $this->trimmed('twitter_username');
|
$twitter_username = $this->trimmed('twitter_username');
|
||||||
|
@ -127,7 +127,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
$fuser = Foreign_user::save(
|
$fuser = Foreign_user::save(
|
||||||
array(
|
array(
|
||||||
'id' => $twitter_id,
|
'id' => $twitter_id,
|
||||||
'service' => '0', // Twitter
|
'service' => '1', // 1 == Twitter
|
||||||
'uri' => "http://www.twitter.com/$twitter_username",
|
'uri' => "http://www.twitter.com/$twitter_username",
|
||||||
'nickname' => $twitter_username,
|
'nickname' => $twitter_username,
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
|
@ -144,7 +144,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
function remove_twitter_acct() {
|
function remove_twitter_acct() {
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$fuser = Foreign_user::getForeignUser($user->id, 0);
|
$fuser = Foreign_user::getForeignUser($user->id, 1);
|
||||||
|
|
||||||
$fuser_id = $this->arg('fuser_id');
|
$fuser_id = $this->arg('fuser_id');
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class TwittersettingsAction extends SettingsAction {
|
||||||
function save_preferences() {
|
function save_preferences() {
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$fuser = Foreign_user::getForeignUser($user->id, 0);
|
$fuser = Foreign_user::getForeignUser($user->id, 1);
|
||||||
|
|
||||||
$this->show_form(_('Save doesn\'t do anything yet.'));
|
$this->show_form(_('Save doesn\'t do anything yet.'));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into foreign_service
|
insert into foreign_service
|
||||||
(name, description, created)
|
(id, name, description, created)
|
||||||
values
|
values
|
||||||
('Twitter', 'Twitter Micro-blogging service', now());
|
('1','Twitter', 'Twitter Micro-blogging service', now());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user