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' );
$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']);
}
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));
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;
}
+ 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;
'$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;
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();
}
--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`);
<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>
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;
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;
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%; */
{{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}}
<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}}"