]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.7.x' into 0.8.x
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 12 Mar 2009 15:56:23 +0000 (11:56 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 12 Mar 2009 15:56:23 +0000 (11:56 -0400)
Conflicts:

classes/Notice.php
lib/action.php
lib/router.php
lib/twitter.php

1  2 
README
classes/Notice.php
classes/laconica.ini
db/laconica.sql
lib/action.php
lib/router.php
lib/twitter.php

diff --cc README
Simple merge
index 9b5194a5c8e63dd4a0b32fb2ec773fb7d7d92ae2,3087e39a78cf7be40bff84a453280799597625ad..adeed2796bff0ba1771f76021f6dbf6ef0b20e1e
@@@ -156,20 -162,13 +163,21 @@@ class Notice extends Memcached_DataObje
  
                $notice->query('BEGIN');
  
-         $notice->created = common_sql_now();
-         $notice->content = common_shorten_links($content);
-         $notice->rendered = common_render_content($notice->content, $notice);
-         $notice->source = $source;
-         $notice->uri = $uri;
+               $notice->reply_to = $reply_to;
+               $notice->created = common_sql_now();
+               $notice->content = $final;
+               $notice->rendered = common_render_content($final, $notice);
+               $notice->source = $source;
+               $notice->uri = $uri;
  
 +        if (!empty($reply_to)) {
 +            $reply_notice = Notice::staticGet('id', $reply_to);
 +            if (!empty($reply_notice)) {
 +                $notice->reply_to = $reply_to;
 +                $notice->conversation = $reply_notice->conversation;
 +            }
 +        }
 +
          if (Event::handle('StartNoticeSave', array(&$notice))) {
  
              $id = $notice->insert();
Simple merge
diff --cc db/laconica.sql
Simple merge
diff --cc lib/action.php
Simple merge
diff --cc lib/router.php
Simple merge
diff --cc lib/twitter.php
index 8a54afb9c40730c836a96a1cbaad5fc1578b912a,7abb40151686eb3779d689ba6bff9aa60f88ebed..db2092210bd6520e8a88255616b7cece305671e0
@@@ -224,15 -224,14 +224,14 @@@ function is_twitter_bound($notice, $fli
  
  function broadcast_twitter($notice)
  {
-     global $config;
      $success = true;
  
 -    $flink = Foreign_link::getByUserID($notice->profile_id, 
 +    $flink = Foreign_link::getByUserID($notice->profile_id,
          TWITTER_SERVICE);
 -            
 -    // XXX: Not sure WHERE to check whether a notice should go to 
 +
 +    // XXX: Not sure WHERE to check whether a notice should go to
      // Twitter. Should we even put in the queue if it shouldn't? --Zach
-     if (is_twitter_bound($notice, $flink)) {
+     if (!is_null($flink) && is_twitter_bound($notice, $flink)) {
  
          $fuser = $flink->getForeignUser();
          $twitter_user = $fuser->nickname;
          $options = array(
              CURLOPT_USERPWD        => "$twitter_user:$twitter_password",
              CURLOPT_POST           => true,
 -            CURLOPT_POSTFIELDS     => 
 +            CURLOPT_POSTFIELDS     =>
                  array(
                          'status' => $statustxt,
-                         'source' => $config['integration']['source']
+                         'source' => common_config('integration', 'source')
                       ),
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_FAILONERROR    => true,