Merge branch 'develop' of github.com:annando/friendica into 1410-remote-self

This commit is contained in:
Michael Vogel 2014-10-27 11:45:39 +01:00
commit b1cdaefcb2
14 changed files with 6219 additions and 6120 deletions

View file

@ -502,7 +502,8 @@ function contacts_content(&$a) {
'$archived' => (($contact['archive']) ? t('Currently archived') : ''),
'$hidden' => array('hidden', t('Hide this contact from others'), ($contact['hidden'] == 1), t('Replies/likes to your public posts <strong>may</strong> still be visible')),
'$notify' => array('notify', t('Notification for new posts'), ($contact['notify_new_posts'] == 1), t('Send a notification of every new post of this contact')),
'$fetch_further_information' => array('fetch_further_information', t('Fetch further information for feeds'), ($contact['fetch_further_information'] == 1), t('Fetch further information for feeds')),
'$fetch_further_information' => array('fetch_further_information', t('Fetch further information for feeds'), $contact['fetch_further_information'], t('Fetch further information for feeds'),
array('0'=>t('Disabled'), '1'=>t('Fetch information'), '2'=>t('Fetch information and keywords'))),
'$photo' => $contact['photo'],
'$name' => $contact['name'],
'$dir_icon' => $dir_icon,
@ -684,10 +685,10 @@ function contacts_content(&$a) {
);
}
}
$tpl = get_markup_template("contacts-template.tpl");
$o .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),

View file

@ -648,12 +648,8 @@ function dfrn_request_content(&$a) {
if(! local_user()) {
info( t("Please login to confirm introduction.") . EOL );
/* setup the return URL to come back to this page if they use openid */
$stripped = str_replace('q=','',$a->query_string);
$_SESSION['return_url'] = trim($stripped,'/');
$_SESSION['return_url'] = $a->query_string;
return login();
}

View file

@ -137,6 +137,7 @@ function item_post(&$a) {
$profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
$post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0);
$app = ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : '');
$extid = ((x($_REQUEST,'extid')) ? strip_tags($_REQUEST['extid']) : '');
$allow_moderated = false;
@ -200,7 +201,7 @@ function item_post(&$a) {
$verb = $orig_post['verb'];
$objecttype = $orig_post['object-type'];
$emailcc = $orig_post['emailcc'];
$app = $orig_post['app'];
$app = $orig_post['app'];
$categories = $orig_post['file'];
$title = notags(trim($_REQUEST['title']));
$body = escape_tags(trim($_REQUEST['body']));
@ -208,6 +209,7 @@ function item_post(&$a) {
$pubmail_enable = $orig_post['pubmail'];
$network = $orig_post['network'];
$guid = $orig_post['guid'];
$extid = $orig_post['extid'];
} else {
@ -652,6 +654,7 @@ function item_post(&$a) {
$datarray['commented'] = datetime_convert();
$datarray['received'] = datetime_convert();
$datarray['changed'] = datetime_convert();
$datarray['extid'] = $extid;
$datarray['guid'] = $guid;
$datarray['uri'] = $uri;
$datarray['title'] = $title;
@ -749,11 +752,12 @@ function item_post(&$a) {
$post_id = 0;
$r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`, `network`, `contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
$r = q("INSERT INTO `item` (`guid`, `extid`, `uid`,`type`,`wall`,`gravity`, `network`, `contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`,
`tag`, `inform`, `verb`, `object-type`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark`,`origin`, `moderated`, `file` )
VALUES( '%s', %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d, '%s' )",
VALUES( '%s', '%s', %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d, '%s' )",
dbesc($datarray['guid']),
dbesc($datarray['extid']),
intval($datarray['uid']),
dbesc($datarray['type']),
intval($datarray['wall']),

View file

@ -16,9 +16,10 @@ function network_init(&$a) {
}
}
// convert query string to array and remove first element (which is friendica args)
// convert query string to array. remove friendica args
$query_array = array();
parse_str($a->query_string, $query_array);
$query_string = str_replace($a->cmd."?", "", $a->query_string);
parse_str($query_string, $query_array);
array_shift($query_array);
// fetch last used network view and redirect if needed
@ -297,11 +298,11 @@ function network_content(&$a, $update = 0) {
if(! local_user()) {
$_SESSION['return_url'] = $a->query_string;
return login(false);
return login(false);
}
// TODO:is this really necessary? $a is already available to hooks
$arr = array('query' => $a->query_string);
call_hooks('network_content_init', $arr);

View file

@ -333,6 +333,8 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
logger("parseurl_getsiteinfo: Siteinfo for ".$url." ".print_r($siteinfo, true), LOGGER_DEBUG);
call_hooks('getsiteinfo', $siteinfo);
return($siteinfo);
}
@ -410,6 +412,13 @@ function parse_url_content(&$a) {
$siteinfo = parseurl_getsiteinfo($url);
// if ($textmode) {
// require_once("include/items.php");
//
// echo add_page_info_data($siteinfo);
// killme();
// }
$url= $siteinfo["url"];
$sitedata = "";