Browse Source

Fixes

pull/3/head
M@d D3n 5 years ago
parent
commit
e97d460608
  1. 2
      fields/code/tpl/field.tpl
  2. 10
      fields/image_multi/field.php
  3. 22
      fields/image_single/field.php
  4. 2
      functions/func.documents.php

2
fields/code/tpl/field.tpl

@ -5,4 +5,4 @@
{/if}
<textarea id="field_code_{$f_id}" name="feld[{$field_id}]">{$field_value|escape}</textarea>
{include file="$codemirror_editor" conn_id=$f_id textarea_id="field_code_$f_id" ctrls='SaveAjax();' height=300}
{include file="$codemirror_editor" conn_id=$f_id textarea_id="field_code_$f_id" ctrls='AveDocs.documentSaveFunction();' height=300}

10
fields/image_multi/field.php

@ -309,10 +309,12 @@
: '';
}
function getExtension($file)
{
$file = pathinfo($file);
return $file['extension'];
if (! function_exists('getExtension')) {
function getExtension($file)
{
$file = pathinfo($file);
return $file['extension'];
}
}
$valid_formats = array("jpg", "png", "gif", "bmp","jpeg");

22
fields/image_single/field.php

@ -64,21 +64,14 @@
{
$field_value = preg_replace_callback(
'/\[tag:parametr:(\d+)\]/i',
function($data) use($field_param)
function($data) use ($field_param)
{
return $field_param[(int)$data[1]];
},
$tpl
);
$field_value = preg_replace_callback(
'/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/',
create_function(
'$m',
'return watermarks(\'$m[1]\', \'$m[2]\', $m[3]);'
),
$field_value
);
$field_value = preg_replace_callback('/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/', 'watermarks', $field_value);
$field_value = preg_replace_callback('/\[tag:([r|c|f|t|s]\d+x\d+r*):(.+?)]/', 'callback_make_thumbnail', $field_value);
}
@ -108,21 +101,14 @@
{
$field_value = preg_replace_callback(
'/\[tag:parametr:(\d+)\]/i',
function($data) use($field_param)
function($data) use ($field_param)
{
return $field_param[(int)$data[1]];
},
$tpl
);
$field_value = preg_replace_callback(
'/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/',
create_function(
'$m',
'return watermarks(\'$m[1]\', \'$m[2]\', $m[3]);'
),
$field_value
);
$field_value = preg_replace_callback('/\[tag:watermark:(.+?):([a-zA-Z]+):([0-9]+)\]/', 'watermarks', $field_value);
$field_value = preg_replace_callback('/\[tag:([r|c|f|t|s]\d+x\d+r*):(.+?)]/', 'callback_make_thumbnail', $field_value);
}

2
functions/func.documents.php

@ -99,7 +99,7 @@
$get_documents_data[$doc_id] = object2array($get_documents_data[$doc_id]);
$get_documents_data[$doc_id]['doc_title'] = $get_documents_data[$doc_id]['document_title'];
$get_documents_data[$doc_id]['doc_title'] = $get_documents_data[$doc_id]['document_title'] = htmlspecialchars_decode($get_documents_data[$doc_id]['document_title'], ENT_QUOTES);
$get_documents_data[$doc_id]['feld'] = [];
}

Loading…
Cancel
Save