From: Michael Vogel Date: Sun, 5 Jan 2014 15:22:42 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aed28a24f158535cff11a60bad45b0b4fd4ef2ce;p=friendica.git Merge remote-tracking branch 'upstream/master' Conflicts: mod/crepair.php --- aed28a24f158535cff11a60bad45b0b4fd4ef2ce diff --cc boot.php index 72eaec8fe5,0355504636..9264d34fc0 --- a/boot.php +++ 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', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --cc include/conversation.php index 31f40aa6f8,31f40aa6f8..5b9a11bde1 --- a/include/conversation.php +++ b/include/conversation.php @@@ -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) { @@@ -648,6 -648,6 +649,7 @@@ $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), @@@ -693,6 -693,6 +695,7 @@@ call_hooks('display_item', $arr); $threads[$threadsid]['id'] = $item['item_id']; ++ $threads[$threadsid]['network'] = $item['item_network']; $threads[$threadsid]['items'] = array($arr['output']); } diff --cc include/ostatus_conversation.php index 65c0d67871,65c0d67871..ad90e3d311 --- a/include/ostatus_conversation.php +++ b/include/ostatus_conversation.php @@@ -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)); diff --cc library/slinky.php index cae1f755ff,cae1f755ff..fc3714c201 --- a/library/slinky.php +++ b/library/slinky.php @@@ -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; @@@ -372,7 -372,7 +372,7 @@@ 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; diff --cc mod/contacts.php index f48978aaec,d19c75ab96..ad50376b70 --- a/mod/contacts.php +++ b/mod/contacts.php @@@ -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 171e88f312,f8336ef0ba..0fdab7eebe --- a/mod/crepair.php +++ b/mod/crepair.php @@@ -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; diff --cc mod/parse_url.php index cb7268c1df,cb7268c1df..cf52011f15 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@@ -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 = "
%s%s
"; ++ $template = "%s%s
"; $arr = array('url' => $url, 'text' => ''); @@@ -328,9 -328,9 +328,9 @@@ if($url && $title && $text) { if($textmode) -- $text = $br . '[quote]' . trim($text) . '[/quote]' . $br; ++ $text = '[quote]' . trim($text) . '[/quote]' . $br; else -- $text = '
' . trim($text) . '

'; ++ $text = '
' . trim($text) . '

'; $title = str_replace(array("\r","\n"),array('',''),$title); @@@ -344,8 -344,8 +344,10 @@@ $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"]; @@@ -377,20 -377,20 +379,24 @@@ if(strlen($text)) { if($textmode) -- $text = $br.'[quote]'.trim($text).'[/quote]'.$br ; ++ $text = '[quote]'.trim($text).'[/quote]'; else -- $text = '
'.trim($text).'

'; ++ $text = '
'.trim($text).'
'; } 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 d74b846d00,d74b846d00..9f47f85d5a --- a/mods/readme.txt +++ b/mods/readme.txt @@@ -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`); diff --cc view/templates/crepair.tpl index 5278e42f08,d53af5dad7..5cc4462b39 --- a/view/templates/crepair.tpl +++ b/view/templates/crepair.tpl @@@ -43,9 -37,11 +37,13 @@@
+ {{if $allow_remote_self eq 1}} +

{{$label_remote_self}}

+ {{include file="field_checkbox.tpl" field=$remote_self}} + {{/if}} +{{include file="field_checkbox.tpl" field=$contact_self}} + diff --cc view/theme/vier/style.css index 03aaf89400,03aaf89400..5561cb65ee --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@@ -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%; */ diff --cc view/theme/vier/templates/threaded_conversation.tpl index dc3e918f61,dc3e918f61..397046a4e3 --- a/view/theme/vier/templates/threaded_conversation.tpl +++ b/view/theme/vier/templates/threaded_conversation.tpl @@@ -7,7 -7,7 +7,7 @@@ {{foreach $threads as $thread}} --
++
{{if $thread.type == tag}} diff --cc view/theme/vier/templates/wall_thread.tpl index d51014a969,d51014a969..0ec3c526b4 --- a/view/theme/vier/templates/wall_thread.tpl +++ b/view/theme/vier/templates/wall_thread.tpl @@@ -32,7 -32,7 +32,7 @@@
--
++