mirror of
https://github.com/friendica/friendica
synced 2025-04-27 04:30:11 +00:00
Merge remote-tracking branch 'upstream/master'
Conflicts: boot.php database.sql library/fancybox/jquery.fancybox-1.3.4.css mod/search.php update.php
This commit is contained in:
commit
93143702ed
831 changed files with 37929 additions and 30644 deletions
|
@ -174,10 +174,11 @@ function autoname($len) {
|
|||
|
||||
if(! function_exists('xmlify')) {
|
||||
function xmlify($str) {
|
||||
$buffer = '';
|
||||
/* $buffer = '';
|
||||
|
||||
for($x = 0; $x < mb_strlen($str); $x ++) {
|
||||
$char = $str[$x];
|
||||
$len = mb_strlen($str);
|
||||
for($x = 0; $x < $len; $x ++) {
|
||||
$char = mb_substr($str,$x,1);
|
||||
|
||||
switch( $char ) {
|
||||
|
||||
|
@ -205,7 +206,14 @@ function xmlify($str) {
|
|||
$buffer .= $char;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$buffer = mb_ereg_replace("&", "&", $str);
|
||||
$buffer = mb_ereg_replace("'", "'", $buffer);
|
||||
$buffer = mb_ereg_replace("\"", """, $buffer);
|
||||
$buffer = mb_ereg_replace("<", "<", $buffer);
|
||||
$buffer = mb_ereg_replace(">", ">", $buffer);
|
||||
|
||||
$buffer = trim($buffer);
|
||||
return($buffer);
|
||||
}}
|
||||
|
@ -215,8 +223,13 @@ function xmlify($str) {
|
|||
|
||||
if(! function_exists('unxmlify')) {
|
||||
function unxmlify($s) {
|
||||
$ret = str_replace('&','&', $s);
|
||||
$ret = str_replace(array('<','>','"','''),array('<','>','"',"'"),$ret);
|
||||
// $ret = str_replace('&','&', $s);
|
||||
// $ret = str_replace(array('<','>','"','''),array('<','>','"',"'"),$ret);
|
||||
$ret = mb_ereg_replace('&', '&', $s);
|
||||
$ret = mb_ereg_replace(''', "'", $ret);
|
||||
$ret = mb_ereg_replace('"', '"', $ret);
|
||||
$ret = mb_ereg_replace('<', "<", $ret);
|
||||
$ret = mb_ereg_replace('>', ">", $ret);
|
||||
return $ret;
|
||||
}}
|
||||
|
||||
|
@ -1083,7 +1096,18 @@ function prepare_body($item,$attach = false) {
|
|||
$cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches, PREG_SET_ORDER);
|
||||
if($cnt) {
|
||||
foreach($matches as $mtch) {
|
||||
$icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));
|
||||
$filetype = strtolower(substr( $mtch[3], 0, strpos($mtch[3],'/') ));
|
||||
if($filetype) {
|
||||
$filesubtype = strtolower(substr( $mtch[3], strpos($mtch[3],'/') + 1 ));
|
||||
$filesubtype = str_replace('.', '-', $filesubtype);
|
||||
}
|
||||
else {
|
||||
$filetype = 'unkn';
|
||||
$filesubtype = 'unkn';
|
||||
}
|
||||
|
||||
$icon = '<div class="attachtype icon s22 type-' . $filetype . ' subtype-' . $filesubtype . '"></div>';
|
||||
/*$icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));
|
||||
switch($icontype) {
|
||||
case 'video':
|
||||
case 'audio':
|
||||
|
@ -1094,7 +1118,8 @@ function prepare_body($item,$attach = false) {
|
|||
default:
|
||||
$icon = '<div class="attachtype icon s22 type-unkn"></div>';
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
|
||||
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
|
||||
if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue