Skip to content

Commit

Permalink
Merge pull request #2106 from LuckyCyborg/4.0
Browse files Browse the repository at this point in the history
Overall improvements
  • Loading branch information
LuckyCyborg authored Aug 13, 2018
2 parents ac24cc4 + 6968e77 commit 6f278e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Platform/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Define The Application Version
//--------------------------------------------------------------------------

define('VERSION', '4.0.84');
define('VERSION', '4.0.85');

//--------------------------------------------------------------------------
// Set PHP Error Reporting Options
Expand Down
2 changes: 1 addition & 1 deletion modules/Content/Views/Admin/Attachments/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="box box-default">
<div class="box-body">
<button id="addNewUploads" class="btn btn-success btn-sm col-sm-2 pull-right"><?= __d('content', 'Add New'); ?></button>
<button id="addNewUploads" class="btn btn-success col-sm-2 pull-right"><?= __d('content', 'Add New'); ?></button>
<div class="clearfix"></div>

<form action="<?= site_url('admin/media/upload'); ?>" id="fm_dropzone_main" enctype="multipart/form-data" method="POST" style="display: none;">
Expand Down
7 changes: 5 additions & 2 deletions modules/Roles/Controllers/Admin/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,18 @@ protected function validator(array $data, $id = null)
'description' => __d('roles', 'Description'),
);

// Create a Validator instance.
$validator = Validator::make($data, $rules, $messages, $attributes);

// Add the custom Validation Rule commands.
Validator::extend('valid_name', function($attribute, $value, $parameters)
$validator->addExtension('valid_name', function($attribute, $value, $parameters)
{
$pattern = '~^(?:[\p{L}\p{Mn}\p{Pd}\'\x{2019}]+(?:$|\s+)){1,}$~u';

return (preg_match($pattern, $value) === 1);
});

return Validator::make($data, $rules, $messages, $attributes);
return $validator;
}

public function data(Request $request)
Expand Down

0 comments on commit 6f278e0

Please sign in to comment.