hunk ./actions/facebookhome.php 73
-
- # $this->set_flags($flink, $noticesync, $replysync, $friendsync);
+ $flink->set_flags(true, false, false);
hunk ./actions/facebooksettings.php 31
- $this->display();
+ if ($this->arg('save')) {
+ $this->save_settings();
+ } else {
+ $this->show_form();
+ }
hunk ./actions/facebooksettings.php 38
- function display()
- {
+
+ function save_settings() {
+
+ $noticesync = $this->arg('noticesync');
+ $replysync = $this->arg('replysync');
hunk ./actions/facebooksettings.php 45
+ $fbuid = $facebook->require_login();
+
+ $flink = Foreign_link::getByForeignID($fbuid, 2); // 2 == Facebook
+
+ $original = clone($flink);
+ $flink->set_flags($noticesync, $replysync, false);
+ $result = $flink->update($original);
+
+ if ($result) {
+ echo '';
+ }
hunk ./actions/facebooksettings.php 57
+ $this->show_form();
+
+ }
+
+ function show_form() {
+
+ $facebook = get_facebook();
hunk ./actions/facebooksettings.php 66
+ $flink = Foreign_link::getByForeignID($fbuid, 2); // 2 == Facebook
+
+ $this->show_header('Settings');
+
hunk ./actions/facebooksettings.php 71
- .'
Add an Identi.ca box to your profile!
'
+ .'Add an Identi.ca box to my profile
'
hunk ./actions/facebooksettings.php 75
-
hunk ./actions/facebooksettings.php 77
- $this->show_header('Settings');
+ $fbml .= '';
hunk ./actions/facebooksettings.php 107
-
hunk ./actions/twittersettings.php 254
- $this->set_flags($flink, $noticesync, $replysync, $friendsync);
+ $flink->set_flags($noticesync, $replysync, $friendsync);
hunk ./actions/twittersettings.php 326
- $this->set_flags($flink, $noticesync, $replysync, $friendsync);
+ $flink->set_flags($noticesync, $replysync, $friendsync);
hunk ./actions/twittersettings.php 366
- function set_flags(&$flink, $noticesync, $replysync, $friendsync)
- {
- if ($noticesync) {
- $flink->noticesync |= FOREIGN_NOTICE_SEND;
- } else {
- $flink->noticesync &= ~FOREIGN_NOTICE_SEND;
- }
-
- if ($replysync) {
- $flink->noticesync |= FOREIGN_NOTICE_SEND_REPLY;
- } else {
- $flink->noticesync &= ~FOREIGN_NOTICE_SEND_REPLY;
- }
-
- if ($friendsync) {
- $flink->friendsync |= FOREIGN_FRIEND_RECV;
- } else {
- $flink->friendsync &= ~FOREIGN_FRIEND_RECV;
- }
-
- $flink->profilesync = 0;
- }
hunk ./classes/Foreign_link.php 59
+
+ function set_flags($noticesync, $replysync, $friendsync)
+ {
+ if ($noticesync) {
+ $this->noticesync |= FOREIGN_NOTICE_SEND;
+ } else {
+ $this->noticesync &= ~FOREIGN_NOTICE_SEND;
+ }
+
+ if ($replysync) {
+ $this->noticesync |= FOREIGN_NOTICE_SEND_REPLY;
+ } else {
+ $this->noticesync &= ~FOREIGN_NOTICE_SEND_REPLY;
+ }
+
+ if ($friendsync) {
+ $this->friendsync |= FOREIGN_FRIEND_RECV;
+ } else {
+ $this->friendsync &= ~FOREIGN_FRIEND_RECV;
+ }
+
+ $this->profilesync = 0;
+ }
hunk ./lib/facebookaction.php 40
- $style = '';
+ $style = '';
hunk ./lib/facebookaction.php 75
- $html = $this->render_notice($notice);
+ $html = Facebookaction::Aender_notice($notice);
hunk ./lib/facebookaction.php 77
- $fbml = "$content $html";
- $fbml .= "$content $html";
+
+ $fbml = "$style $html";
+ $fbml .= "$style $html";
hunk ./lib/facebookaction.php 81
- $fbml_main = "$content $html";
+ $fbml_main = "$style $html";
hunk ./scripts/update_facebook.php 55
+ $content = $notice->content;
hunk ./scripts/update_facebook.php 57
- update_status($fbuid, $notice);
+ if (($flink->noticesync & FOREIGN_NOTICE_SEND) == FOREIGN_NOTICE_SEND) {
hunk ./scripts/update_facebook.php 59
+ // If it's not a reply, or if the user WANTS to send replies...
+ if (!preg_match('/@[a-zA-Z0-9_]{1,15}\b/u', $content) ||
+ (($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY)) {
+ update_status($fbuid, $content);
+ }
+ }
hunk ./scripts/update_facebook.php 73
-function update_status($fbuid, $notice) {
+function update_status($fbuid, $content) {
hunk ./scripts/update_facebook.php 77
-
- $result = $facebook->api_client->users_setStatus($notice->content, $fbuid, false, true);
-
+ $result = $facebook->api_client->users_setStatus($content, $fbuid, false, true);
hunk ./scripts/update_facebook.php 79
-
hunk ./scripts/update_facebook.php 81
-