1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +02:00

Box Plugins: Translates Updates. #9

This commit is contained in:
Awilum
2012-10-02 21:58:41 +03:00
parent fb253c329b
commit ce3771c4d2
8 changed files with 11 additions and 7 deletions

View File

@@ -30,7 +30,7 @@
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('This field should not be empty', 'snippets');
if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets');
if (file_exists($snippets_path.Security::safeName(Request::post('name')).'.snippet.php')) $errors['snippets_exists'] = __('This snippet already exists', 'snippets');
if (count($errors) == 0) {
@@ -69,7 +69,7 @@
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('This field should not be empty', 'snippets');
if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets');
if ((file_exists($snippets_path.Security::safeName(Request::post('name')).'.snippet.php')) and (Security::safeName(Request::post('snippets_old_name')) !== Security::safeName(Request::post('name')))) $errors['snippets_exists'] = __('This snippet already exists', 'snippets');
// Save fields