Commit 52c9bc82 authored by Mario's avatar Mario
Browse files

do not use translated type and remove some unused code

parent 1b0234cb
Pipeline #370569 passed with stage
in 2 minutes and 11 seconds
......@@ -2983,7 +2983,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
$str_tags .= $newtag;
}
}
$fn_results[] = [
'replaced' => $replaced,
......@@ -3060,7 +3060,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
];
}
}
return $fn_results;
}
......@@ -3098,7 +3098,7 @@ function linkify_tags(&$body, $uid, $in_network = true) {
function getIconFromType($type) {
$iconMap = array(
//Folder
t('Collection') => 'fa-folder-o',
'Collection' => 'fa-folder-o',
'multipart/mixed' => 'fa-folder-o', //dirs in attach use this mime type
//Common file
'application/octet-stream' => 'fa-file-o',
......@@ -3242,7 +3242,7 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
if($oldnick)
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
}
$item['body'] = preg_replace("/(\[zrl=".preg_quote($old,'/')."\/(photo|photos|gallery)\/".$channel['channel_address'].".+\]\[zmg=\d+x\d+\])".preg_quote($old,'/')."\/(.+\[\/zmg\])/", '${1}'.$new.'/${3}', $item['body']);
$item['body'] = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
......@@ -3575,7 +3575,7 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64svg(.*?)\[\/(svg)\]/ism','\red_unescape_codeblock',$body);
// fix any img tags that should be zmg
$body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','\red_zrlify_img_callback',$body);
......
......@@ -106,10 +106,12 @@ $(document).ready(function () {
e.preventDefault();
e.stopPropagation();
});
$(document).on('dragover', function (e) {
e.preventDefault();
e.stopPropagation();
});
$(document).on('dragleave', function (e) {
e.preventDefault();
e.stopPropagation();
......@@ -128,8 +130,6 @@ $(document).ready(function () {
// Check if it's a file
if (e.dataTransfer.files[0]) {
$('#file-directory').val('');
//folder = $('.attach-drop-zone').data('folder');
$('#file-folder').val(folder);
return true;
}
......@@ -160,7 +160,6 @@ $(document).ready(function () {
}
target.addClass('attach-drop-ok');
});
$('.cloud-index').on('dragleave', function (e) {
......@@ -180,7 +179,6 @@ $(document).ready(function () {
let target = $(this);
target.removeClass('attach-drop-ok');
attach_draging = false;
});
......
......@@ -22,12 +22,10 @@
<div id="files-upload-tools" class="section-content-tools-wrapper ">
{{if $quota.limit || $quota.used}}<div class="{{if $quota.warning}}section-content-danger-wrapper{{else}}section-content-info-wrapper{{/if}}">{{if $quota.warning}}<strong>{{$quota.warning}} </strong>{{/if}}{{if $quota.desc}}{{$quota.desc}}<br><br>{{/if}}</div>{{/if}}
<form id="ajax-upload-files" method="post" action="#" enctype="multipart/form-data" class="acl-form" data-form_id="ajax-upload-files" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
<input id="file-directory" type="hidden" name="directory" value="{{$path}}" />
<input id="file-folder"type="hidden" name="folder" value="" />
<!--input id="file-directory" type="hidden" name="directory" value="{{$path}}" /-->
<input id="file-folder"type="hidden" name="folder" value="{{$folder}}" />
<input type="hidden" name="channick" value="{{$channick}}" />
<input type="hidden" name="return_url" value="{{$return_url}}" />
<!--label for="files-upload">{{$upload_header}}</label>
<input class="form-group pull-left" id="files-upload" type="file" name="files[]" multiple -->
{{include file="field_checkbox.tpl" field=$notify}}
<div class="cloud-index attach-drop attach-drop-zone text-center p-4 mb-3" data-folder="{{$folder}}">
<span class="text-muted">You can select files via the upload button or drop them right here or into an existing folder.</span>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment