Skip to content

Commit e464f26

Browse files
authored
Update plugin.filesource.php
1 parent 3291aca commit e464f26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assets/plugins/filesource/plugin.filesource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@
7272
case 'OnPluginFormPrerender':
7373
case 'OnSnipFormPrerender':
7474
global $content, $_lang;
75-
if (preg_match('/\s' . $_lang['duplicated_el_suffix'] . '\s?\d*$/', $content['name'])) {
76-
$content['file_binding'] = '';
77-
}
7875
if(substr(trim($content[$vals]),0,$count) == $include.' MODX_BASE_PATH.\'assets/'.$elm_name.'/')
7976
{
8077
$content['file_binding'] = str_replace(array(';','\''),'',trim(substr(trim($content[$vals]),$count,250)));
@@ -106,6 +103,9 @@
106103
else $content['file_binding'] = '';
107104
$_SESSION['itemname']=$content['name'];
108105
}
106+
if (preg_match('/\s' . $_lang['duplicated_el_suffix'] . '\s?\d*$/', $content['name'])) {
107+
$content['file_binding'] = '';
108+
}
109109
//else $_SESSION['itemname']="New snippet";
110110
break;
111111
case 'OnSnipFormRender':

0 commit comments

Comments
 (0)