Permalink
Browse files

Meta.user : slugify fields name to make sure it does not break editio…

…n. Fix #1158
  • Loading branch information...
1 parent 3ecea1d commit 49551f93cf2acba9cfd38da3fa3b647f26d2d7ef @cdujeu cdujeu committed Sep 6, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 core/src/plugins/meta.user/UserMetaManager.php
@@ -33,6 +33,7 @@
use Pydio\Core\PluginFramework\PluginsService;
use Pydio\Access\Meta\Core\AbstractMetaSource;
use Pydio\Access\Metastore\Core\IMetaStoreProvider;
+use Pydio\Core\Utils\Vars\StringHelper;
defined('AJXP_EXEC') or die( 'Access not allowed');
@@ -237,6 +238,8 @@ protected function getMetaDefinition()
$result = array();
foreach ($arrF as $index => $value) {
+ //make sure value does not contain spaces or things like that
+ $value = StringHelper::slugify($value);
if (isSet($arrL[$index])) {
$result[$value] = array("label" => $arrL[$index], "type" => $arrT[$index]);
} else {

0 comments on commit 49551f9

Please sign in to comment.