Merge remote-tracking branch 'upstream/master'

Conflicts:
	mod/crepair.php
This commit is contained in:
Michael Vogel 2014-01-05 16:22:42 +01:00
commit aed28a24f1
35 changed files with 9339 additions and 8738 deletions

View file

@ -215,13 +215,14 @@ function contact_photo_menu($contact) {
$status_link = $profile_link . "?url=status";
$photos_link = $profile_link . "?url=photos";
$profile_link = $profile_link . "?url=profile";
$contact_drop_link = $a->get_baseurl() . '/contacts/' . $contact['id'] . '/drop';
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
}
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
$posts_link = $a->get_baseurl() . '/network/0?nets=all&cid=' . $contact['id'];
$contact_drop_link = $a->get_baseurl() . "/contacts/" . $contact['id'] . '/drop?confirm=1';
$menu = Array(
'poke' => array(t("Poke"), $poke_link),

View file

@ -1,6 +1,7 @@
<?php
require_once("include/contact_selectors.php");
require_once("include/features.php");
/**
*
@ -329,6 +330,9 @@ function populate_acl($user = null,$celeb = false) {
'$allowgid' => json_encode($perms['allow_gid']),
'$denycid' => json_encode($perms['deny_cid']),
'$denygid' => json_encode($perms['deny_gid']),
'$features' => array(
"aclautomention"=>(feature_enabled($user,"aclautomention")?"true":"false")
),
));
@ -474,14 +478,15 @@ function acl_lookup(&$a, $out_type = 'json') {
"name" => $g['name'],
"id" => intval($g['id']),
"uids" => array_map("intval", explode(",",$g['uids'])),
"link" => ''
"link" => '',
"forum" => '0'
);
}
}
if ($type=='' || $type=='c'){
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact`
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, forum FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != ''
$sql_extra2
ORDER BY `name` ASC ",
@ -541,6 +546,7 @@ function acl_lookup(&$a, $out_type = 'json') {
"network" => $g['network'],
"link" => $g['url'],
"nick" => ($g['attag']) ? $g['attag'] : $g['nick'],
"forum" => $g['forum']
);
}
}

View file

@ -74,7 +74,7 @@
logger('API_login: ' . print_r($_SERVER,true), LOGGER_DEBUG);
header('WWW-Authenticate: Basic realm="Friendica"');
header('HTTP/1.0 401 Unauthorized');
die((api_error(&$a, 'json', "This api requires login")));
die((api_error($a, 'json', "This api requires login")));
//die('This api requires login');
}
@ -174,7 +174,7 @@
}
header("HTTP/1.1 404 Not Found");
logger('API call not implemented: '.$a->query_string." - ".print_r($_REQUEST,true));
return(api_error(&$a, $type, "not implemented"));
return(api_error($a, $type, "not implemented"));
}

View file

@ -504,6 +504,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$tpl = 'search_item.tpl';
foreach($items as $item) {
if($arr_blocked) {
$blocked = false;
foreach($arr_blocked as $b) {
@ -648,6 +649,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$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 +695,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
call_hooks('display_item', $arr);
$threads[$threadsid]['id'] = $item['item_id'];
$threads[$threadsid]['network'] = $item['item_network'];
$threads[$threadsid]['items'] = array($arr['output']);
}

View file

@ -30,6 +30,7 @@ function get_features() {
t('Post Composition Features'),
array('richtext', t('Richtext Editor'), t('Enable richtext editor')),
array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them')),
array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a fourm page is selected/deselected in ACL window.')),
),
// Network sidebar widgets

View file

@ -617,7 +617,6 @@ function fetch_xrd_links($url) {
if(! function_exists('validate_url')) {
function validate_url(&$url) {
// no naked subdomains (allow localhost for tests)
if(strpos($url,'.') === false && strpos($url,'/localhost/') === false)
return false;

View file

@ -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));