From 125f05563b5c7bd5b74b1afbea3c0b663795bff5 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 12 Jan 2009 05:25:07 +0000 Subject: trac750 Add prefix string option in Facebook app for notice sync --- actions/facebooksettings.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actions/facebooksettings.php') diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php index 862dc0732..ab04ad82b 100644 --- a/actions/facebooksettings.php +++ b/actions/facebooksettings.php @@ -39,6 +39,7 @@ class FacebooksettingsAction extends FacebookAction $noticesync = $this->arg('noticesync'); $replysync = $this->arg('replysync'); + $prefix = $this->trimmed('prefix'); $facebook = get_facebook(); $fbuid = $facebook->require_login(); @@ -49,6 +50,8 @@ class FacebooksettingsAction extends FacebookAction $flink->set_flags($noticesync, $replysync, false); $result = $flink->update($original); + $facebook->api_client->data_setUserPreference(1, substr($prefix, 0, 128)); + if ($result) { $this->show_form('Sync preferences saved.', true); } else { @@ -91,6 +94,14 @@ class FacebooksettingsAction extends FacebookAction common_checkbox('replysync', _('Send local "@" replies to Facebook.'), ($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) : true); + // function common_input($id, $label, $value=null,$instructions=null) + + $prefix = $facebook->api_client->data_getUserPreference(1); + + + common_input('prefix', _('Prefix'), + ($prefix) ? $prefix : null, + _('A string to prefix notices with.')); common_submit('save', _('Save')); common_element_end('form'); -- cgit v1.2.3-54-g00ecf