]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Sun, 5 Jan 2014 15:22:42 +0000 (16:22 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 5 Jan 2014 15:22:42 +0000 (16:22 +0100)
Conflicts:
mod/crepair.php

13 files changed:
1  2 
boot.php
include/api.php
include/conversation.php
include/ostatus_conversation.php
library/slinky.php
mod/contacts.php
mod/crepair.php
mod/parse_url.php
mods/readme.txt
view/templates/crepair.tpl
view/theme/vier/style.css
view/theme/vier/templates/threaded_conversation.tpl
view/theme/vier/templates/wall_thread.tpl

diff --cc boot.php
index 72eaec8fe58db17bb87739926067901bb4e65202,035550463656819b29506e83bc7efed00d939156..9264d34fc0df93b3e9c3121964a1d99459513aea
+++ b/boot.php
@@@ -12,9 -12,9 +12,9 @@@ require_once('library/Mobile_Detect/Mob
  require_once('include/features.php');
  
  define ( 'FRIENDICA_PLATFORM',     'Friendica');
- define ( 'FRIENDICA_VERSION',      '3.2.1745' );
+ define ( 'FRIENDICA_VERSION',      '3.2.1747' );
  define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
 -define ( 'DB_UPDATE_VERSION',      1167      );
 +define ( 'DB_UPDATE_VERSION',      1169      );
  define ( 'EOL',                    "<br />\r\n"     );
  define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
  
diff --cc include/api.php
Simple merge
index 31f40aa6f8ca20767b47f90e94194719e091a8f5,31f40aa6f8ca20767b47f90e94194719e091a8f5..5b9a11bde11c273acecd88e495111c24bcc7a06e
@@@ -504,6 -504,6 +504,7 @@@ function conversation(&$a, $items, $mod
                        $tpl = 'search_item.tpl';
  
                        foreach($items as $item) {
++
                                if($arr_blocked) {
                                        $blocked = false;
                                        foreach($arr_blocked as $b) {
                                $tmp_item = array(
                                        'template' => $tpl,
                                        'id' => (($preview) ? 'P0' : $item['item_id']),
++                                      'network' => $item['item_network'],
                                        'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
                                        'profile_url' => $profile_link,
                                        'item_photo_menu' => item_photo_menu($item),
                                call_hooks('display_item', $arr);
  
                                $threads[$threadsid]['id'] = $item['item_id'];
++                              $threads[$threadsid]['network'] = $item['item_network'];
                                $threads[$threadsid]['items'] = array($arr['output']);
  
                        }
index 65c0d67871bc8a988ccd6dcc27fdade0dfc4a0c7,65c0d67871bc8a988ccd6dcc27fdade0dfc4a0c7..ad90e3d3118c664861a753abb95a79465138717e
@@@ -44,6 -44,6 +44,11 @@@ function check_conversations() 
  function complete_conversation($itemid, $conversation_url, $only_add_conversation = false) {
        global $a;
  
++      if ($a->last_ostatus_conversation_url == $conversation_url)
++              return;
++
++      $a->last_ostatus_conversation_url = $conversation_url;
++
        //logger('complete_conversation: completing conversation url '.$conversation_url.' for id '.$itemid);
  
        $messages = q("SELECT `uid`, `parent`, `created` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid));
index cae1f755ff0fa56c75c98f77cf95a11ba2814403,cae1f755ff0fa56c75c98f77cf95a11ba2814403..fc3714c2019598395844317a8ed7ff8324ab6e0c
@@@ -341,7 -341,7 +341,7 @@@ abstract class Slinky_Service 
                curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );                  // Don't stress about SSL validity
                curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );                  // Return the response, don't output it
                curl_setopt( $ch, CURLOPT_TIMEOUT, SLINKY_TIMEOUT );    // Limit how long we'll wait for a response
--              curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );                  // Allow following of redirections
++              //curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );                        // Allow following of redirections
                $r  = curl_exec( $ch );
                if ( curl_errno( $ch ) ) {
                        return false;
                curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );                  // Don't stress about SSL validity
                curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );                  // Return the response, don't output it
                curl_setopt( $ch, CURLOPT_TIMEOUT, SLINKY_TIMEOUT );    // Limit how long we'll wait for a response
--              curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );                  // Allow following of redirections
++              //curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );                        // Allow following of redirections
                $r  = curl_exec( $ch );
                if ( curl_errno( $ch ) ) {
                        return false;
index f48978aaecadd11c953f2b2f3a6ec5c98f996d18,d19c75ab9694dffe99ccdde4143c3399bf1d1f15..ad50376b704441f268571bcdd7e25530854aec8b
@@@ -67,8 -67,53 +67,53 @@@ function contacts_init(&$a) 
  
  }
  
+ function contacts_batch_actions(&$a){
+       $contacts_id = $_POST['contact_batch'];
+       if (!is_array($contacts_id)) return;
+       
+       $orig_records = q("SELECT * FROM `contact` WHERE `id` IN (%s) AND `uid` = %d AND `self` = 0",
+               implode(",", $contacts_id),
+               intval(local_user())
+       );
+       
+       $count_actions=0;
+       foreach($orig_records as $orig_record) {
+               $contact_id = $orig_record['id'];
+               if (x($_POST, 'contacts_batch_update')) {
+                       _contact_update($contact_id);
+                       $count_actions++;
+               }
+               if (x($_POST, 'contacts_batch_block')) {
+                       $r  = _contact_block($contact_id, $orig_record);
+                       if ($r) $count_actions++;
+               }
+               if (x($_POST, 'contacts_batch_ignore')) {
+                       $r = _contact_ignore($contact_id, $orig_record);
+                       if ($r) $count_actions++;
+               }
+               if (x($_POST, 'contacts_batch_archive')) {
+                       $r = _contact_archive($contact_id, $orig_record);
+                       if ($r) $count_actions++;
+               }
+               if (x($_POST, 'contacts_batch_drop')) {
+                       _contact_drop($contact_id, $orig_record);
+                       $count_actions++;
+               }
+       }
+       if ($count_actions>0) {
+               info ( sprintf( tt("%d contact edited.", "%d contacts edited", $count_actions), $count_actions) );
+       }
+       
+       if(x($_SESSION,'return_url'))
+               goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']);
+       else
+               goaway($a->get_baseurl(true) . '/contacts');
+ }
  function contacts_post(&$a) {
 -      
 +
        if(! local_user())
                return;
  
diff --cc mod/crepair.php
index 171e88f3120f3a510b30a22764609e271d298ccb,f8336ef0bacfc33e067932e116d9516d537024d3..0fdab7eebe1cd7cacde8e66a115ab11142d59ab0
@@@ -166,10 -168,8 +168,10 @@@ function crepair_content(&$a) 
                '$notify'       => $contact['notify'],
                '$poll'         => $contact['poll'],
                '$contact_attag'  => $contact['attag'],
 +              '$contact_self' => array('remote_self', t('Mirror all posts to the wall?'), $contact['remote_self'], 
 +                                      t('Shall all posts from this contact posted like your own posts?')),
                '$lbl_submit'   => t('Submit')
-       ));
+           ));
  
        return $o;
  
index cb7268c1df83acd0e14bb9db4e0b1617346e2bc4,cb7268c1df83acd0e14bb9db4e0b1617346e2bc4..cf52011f158eb373bfec7741e44b4977bff7cdcc
@@@ -311,9 -311,9 +311,9 @@@ function parse_url_content(&$a) 
        logger('parse_url: ' . $url);
  
        if($textmode)
--              $template = $br . '[bookmark=%s]%s[/bookmark]%s' . $br;
++              $template = '[bookmark=%s]%s[/bookmark]%s' . $br;
        else
--              $template = "<br /><a class=\"bookmark\" href=\"%s\" >%s</a>%s<br />";
++              $template = "<a class=\"bookmark\" href=\"%s\" >%s</a>%s<br />";
  
        $arr = array('url' => $url, 'text' => '');
  
        if($url && $title && $text) {
  
                if($textmode)
--                      $text = $br . '[quote]' . trim($text) . '[/quote]' . $br;
++                      $text = '[quote]' . trim($text) . '[/quote]' . $br;
                else
--                      $text = '<br /><blockquote>' . trim($text) . '</blockquote><br />';
++                      $text = '<blockquote>' . trim($text) . '</blockquote><br />';
  
                $title = str_replace(array("\r","\n"),array('',''),$title);
  
  
        $siteinfo = parseurl_getsiteinfo($url);
  
++      $sitedata = "";
++
        if($siteinfo["title"] == "") {
--              echo sprintf($template,$url,$url,'') . $str_tags;
++              $sitedata .= sprintf($template,$url,$url,'') . $str_tags;
                killme();
        } else {
                $text = $siteinfo["text"];
  
        if(strlen($text)) {
                if($textmode)
--                      $text = $br.'[quote]'.trim($text).'[/quote]'.$br ;
++                      $text = '[quote]'.trim($text).'[/quote]';
                else
--                      $text = '<br /><blockquote>'.trim($text).'</blockquote><br />';
++                      $text = '<blockquote>'.trim($text).'</blockquote>';
        }
  
        if($image) {
                $text = $br.$br.$image.$text;
        }
++
        $title = str_replace(array("\r","\n"),array('',''),$title);
  
        $result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags;
  
        logger('parse_url: returns: ' . $result);
  
--      echo trim($result);
++      $sitedata .=  trim($result);
++
++      echo "[class=type-link]".$sitedata."[/class]";
++
        killme();
  }
diff --cc mods/readme.txt
index d74b846d00005733a5da998b4095db2a4e4a7f55,d74b846d00005733a5da998b4095db2a4e4a7f55..9f47f85d5a21742ca139e62ecef92a6cbdda9ef2
@@@ -1,6 -1,6 +1,18 @@@
--Site speed can be improved when the following indexes are set. They cannot be set through the update script because on large sites they will block the site for several minutes.
++Site speed can be improved when the following indexes are set. They 
++cannot be set through the update script because on large sites they will 
++block the site for several minutes.
  
  CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`);
  CREATE INDEX `uid_created` ON `item` (`uid`, `created`);
  CREATE INDEX `uid_unseen` ON `item` (`uid`, `unseen`);
  CREATE INDEX `resource-id` ON `item` (`resource-id`);
++CREATE INDEX `uri_received` ON item(`uri`, `received`);
++CREATE INDEX `received_uri` ON item(`received`, `uri`);
++CREATE INDEX `contact-id_created` ON item(`contact-id`, created);
++CREATE INDEX `uid_network_received` ON item(`uid`, `network`, `received`);
++CREATE INDEX `uid_parent` ON item(`uid`, `parent`);
++CREATE INDEX `uid_received` ON item(`uid`, `received`);
++CREATE INDEX `uid_network_commented` ON item(`uid`, `network`, `commented`);
++CREATE INDEX `uid_commented` ON item(`uid`, `commented`);
++CREATE INDEX `uid_title` ON item(uid, `title`);
++CREATE INDEX `created_contact-id` ON item(`created`, `contact-id`);
index 5278e42f089b0455a9d646815c8df0062c2b7ff0,d53af5dad783d4a81b42bd21c6e4a19fbb36a679..5cc4462b390e341b83125a377100aac51ec2d314
  <label id="crepair-photo-label" class="crepair-label" for="crepair-photo">{{$label_photo}}</label>
  <input type="text" id="crepair-photo" class="crepair-input" name="photo" value="" />
  <div class="clear"></div>
+ {{if $allow_remote_self eq 1}}
+ <h4>{{$label_remote_self}}</h4>
+ {{include file="field_checkbox.tpl" field=$remote_self}}
+ {{/if}}
  
 +{{include file="field_checkbox.tpl" field=$contact_self}}
 +
  <input type="submit" name="submit" value="{{$lbl_submit}}" />
  
  </form>
index 03aaf89400439cf98b34781735cfc68723e00e6c,03aaf89400439cf98b34781735cfc68723e00e6c..5561cb65ee9f89ca09e3568630eb478c129962d4
@@@ -291,7 -291,7 +291,9 @@@ blockquote.shared_content 
  body {
    font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
--  background-color: #ffffff;
++  /* background-color: #ffffff; */
++  background-color: #FAFAFA;
++  /* background-color: rgb(252, 252, 252); */
    color: #2d2d2d;
    margin: 0px 0px 0px 0px;
    display: table;
@@@ -1087,7 -1087,7 +1089,9 @@@ section 
    width: 766px;
    max-width: 766px;
    padding: 10px 10px 10px 10px;
--  background-color: white;
++  /* background-color: white; */
++  /* background-color: rgb(252, 252, 252); */
++  background-color: #FAFAFA;
    border-bottom: 1px solid lightgray;
    border-right: 1px solid lightgray;
    border-left: 1px solid lightgray;
@@@ -1410,6 -1410,6 +1414,31 @@@ border-bottom: 1px solid #D2D2D2
        padding-right: 12px; */
  }
  
++.twit {
++  background-color: #FFFAFA;
++}
++.pump {
++  background-color: #FAFFFA;
++}
++.face {
++  background-color: #FAFAFF;
++}
++.feed {
++  background-color: #FFFFFA;
++}
++.dspr {
++  background-color: #FFFAFF;
++}
++.dfrn {
++  background-color: #FAFFFF;
++}
++.stat {
++  background-color: #FAFAFA;
++}
++.mail {
++  background-color: #FFFFF9;
++}
++
  #profile-jot-form #profile-jot-text {
    height: 2.0em;
    /* width: 99%; */
index dc3e918f610e0fe099a79add9dc5fd030075fea8,dc3e918f610e0fe099a79add9dc5fd030075fea8..397046a4e37ac07c3a065787fff8880fc24949d8
@@@ -7,7 -7,7 +7,7 @@@
  
  {{foreach $threads as $thread}}
  
--<div id="tread-wrapper-{{$thread.id}}" class="tread-wrapper {{if $thread.threaded}}threaded{{/if}}  {{$thread.toplevel}}">
++<div id="tread-wrapper-{{$thread.id}}" class="tread-wrapper {{if $thread.threaded}}threaded{{/if}}  {{$thread.toplevel}} {{$thread.network}}">
         
         
                {{if $thread.type == tag}}
index d51014a9694766bf0e8aac4d11d8d67be7a2291c,d51014a9694766bf0e8aac4d11d8d67be7a2291c..0ec3c526b4f23b89f806932fef9f9237dcb94d7f
@@@ -32,7 -32,7 +32,7 @@@
        <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
  </div>
  
--<div class="wall-item-container {{$item.indent}} {{$item.shiny}} " id="item-{{$item.id}}">
++<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}}" id="item-{{$item.id}}">
        <div class="wall-item-item">
                <div class="wall-item-info">
                        <div class="contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}"