Merge https://github.com/friendica/friendica into pull
This commit is contained in:
commit
449b44fe4c
681 changed files with 3503 additions and 149 deletions
|
@ -34,9 +34,11 @@ function attach_init(&$a) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Use quotes around the filename to prevent a "multiple Content-Disposition"
|
||||
// error in Chrome for filenames with commas in them
|
||||
header('Content-type: ' . $r[0]['filetype']);
|
||||
header('Content-disposition: attachment; filename=' . $r[0]['filename']);
|
||||
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
|
||||
echo $r[0]['data'];
|
||||
killme();
|
||||
// NOTREACHED
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ function visible_lf($s) {
|
|||
|
||||
function babel_content(&$a) {
|
||||
|
||||
$o .= '<h3>Babel Diagnostic</h3>';
|
||||
$o .= '<h1>Babel Diagnostic</h1>';
|
||||
|
||||
$o .= '<form action="babel" method="post">';
|
||||
$o .= t('Source (bbcode) text:') . EOL . '<textarea name="text" >' . htmlspecialchars($_REQUEST['text']) .'</textarea>' . EOL;
|
||||
|
@ -28,31 +28,35 @@ function babel_content(&$a) {
|
|||
if(x($_REQUEST,'text')) {
|
||||
|
||||
$text = trim($_REQUEST['text']);
|
||||
$o .= t("Source input: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("Source input: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($text) . EOL. EOL;
|
||||
|
||||
$html = bbcode($text);
|
||||
$o .= t("bb2html: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2html (raw HTML): ") . "</h2>" . EOL. EOL;
|
||||
$o .= htmlspecialchars($html). EOL. EOL;
|
||||
|
||||
//$html = bbcode($text);
|
||||
$o .= "<h2>" . t("bb2html: ") . "</h2>" . EOL. EOL;
|
||||
$o .= $html. EOL. EOL;
|
||||
|
||||
$bbcode = html2bbcode($html);
|
||||
$o .= t("bb2html2bb: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2html2bb: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($bbcode) . EOL. EOL;
|
||||
|
||||
$diaspora = bb2diaspora($text);
|
||||
$o .= t("bb2md: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2md: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($diaspora) . EOL. EOL;
|
||||
|
||||
$html = Markdown($diaspora);
|
||||
$o .= t("bb2md2html: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2md2html: ") . "</h2>" . EOL. EOL;
|
||||
$o .= $html. EOL. EOL;
|
||||
|
||||
$bbcode = diaspora2bb($diaspora);
|
||||
$o .= t("bb2dia2bb: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2dia2bb: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($bbcode) . EOL. EOL;
|
||||
|
||||
$bbcode = html2bbcode($html);
|
||||
$o .= t("bb2md2html2bb: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("bb2md2html2bb: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($bbcode) . EOL. EOL;
|
||||
|
||||
|
||||
|
@ -62,12 +66,12 @@ function babel_content(&$a) {
|
|||
if(x($_REQUEST,'d2bbtext')) {
|
||||
|
||||
$d2bbtext = trim($_REQUEST['d2bbtext']);
|
||||
$o .= t("Source input (Diaspora format): ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("Source input (Diaspora format): ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($d2bbtext) . EOL. EOL;
|
||||
|
||||
|
||||
$bb = diaspora2bb($d2bbtext);
|
||||
$o .= t("diaspora2bb: ") . EOL. EOL;
|
||||
$o .= "<h2>" . t("diaspora2bb: ") . "</h2>" . EOL. EOL;
|
||||
$o .= visible_lf($bb) . EOL. EOL;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
function display_init(&$a) {
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
notice( t('Public access denied.') . EOL);
|
||||
killme();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -17,6 +15,11 @@ function display_init(&$a) {
|
|||
|
||||
function display_content(&$a, $update = 0) {
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
notice( t('Public access denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
require_once("include/bbcode.php");
|
||||
require_once('include/security.php');
|
||||
require_once('include/conversation.php');
|
||||
|
|
|
@ -220,16 +220,15 @@ function group_content(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
$context['$groupeditor'] = $groupeditor;
|
||||
$context['$desc'] = t('Click on a contact to add or remove.');
|
||||
|
||||
if($change) {
|
||||
$context['$groupeditor'] = $groupeditor;
|
||||
$tpl = get_markup_template('groupeditor.tpl');
|
||||
echo replace_macros($tpl, $context);
|
||||
killme();
|
||||
}
|
||||
|
||||
$context['$groupedit_info'] = $groupeditor;
|
||||
return replace_macros($tpl, $context);
|
||||
|
||||
}
|
||||
|
|
|
@ -516,7 +516,7 @@ function message_content(&$a) {
|
|||
'$to' => t('To:'),
|
||||
'$showinputs' => '',
|
||||
'$subject' => t('Subject:'),
|
||||
'$subjtxt' => template_escape($message['title']),
|
||||
'$subjtxt' => $subjtxt_e,
|
||||
'$readonly' => ' readonly="readonly" style="background: #BBBBBB;" ',
|
||||
'$yourmessage' => t('Your message:'),
|
||||
'$text' => '',
|
||||
|
|
|
@ -236,8 +236,6 @@ function parse_url_content(&$a) {
|
|||
$str_tags = '';
|
||||
|
||||
$textmode = false;
|
||||
if(local_user() && intval(get_pconfig(local_user(),'system','plaintext')))
|
||||
$textmode = true;
|
||||
|
||||
if(local_user() && (! feature_enabled(local_user(),'richtext')))
|
||||
$textmode = true;
|
||||
|
|
|
@ -6,8 +6,6 @@ function profiles_init(&$a) {
|
|||
nav_set_selected('profiles');
|
||||
|
||||
if(! local_user()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
killme();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -565,6 +563,11 @@ function profile_activity($changed, $value) {
|
|||
|
||||
function profiles_content(&$a) {
|
||||
|
||||
if(! local_user()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
if(($a->argc > 1) && (intval($a->argv[1]))) {
|
||||
|
|
|
@ -160,7 +160,12 @@ function wall_upload_post(&$a) {
|
|||
|
||||
//if we get the signal then return the image url info in BBCODE, otherwise this outputs the info and bails (for the ajax image uploader on wall post)
|
||||
if ($_REQUEST['hush']!='yeah') {
|
||||
echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
||||
if(local_user() && (! feature_enabled(local_user(),'richtext') || x($_REQUEST['nomce'])) ) {
|
||||
echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
||||
}
|
||||
else {
|
||||
echo '<br /><br /><a href="' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '" ><img src="' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."\" alt=\"$basename\" /></a><br /><br />";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$m = '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue