Skip to content

Commit

Permalink
Fixed issue where permissions created by plugins cannot be saved. Thi…
Browse files Browse the repository at this point in the history
…s is due to the call to getPermissionObject from generatePermissions does not set the correct pluginBundle flag if the permission is created by a plugin.
  • Loading branch information
vln104 authored and vln104 committed Oct 29, 2015
1 parent 2957295 commit 9aa0554
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ public function generatePermissions(array $permissions)
$entity->setName(strtolower($name));

$bit = 0;
$class = $this->getPermissionObject($bundle);
$pluginBundles = $this->getPluginBundles();
$class = $this->getPermissionObject($bundle, true, array_key_exists(ucfirst($bundle) . "Bundle", $pluginBundles));

foreach ($perms as $perm) {
//get the bit for the perm
Expand Down
1 change: 0 additions & 1 deletion app/bundles/FormBundle/Model/FormModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ public function populateValuesWithGetParameters(Form $form, &$formHtml)

switch ($f->getType()) {
case 'text':
case 'email':
if (preg_match('/<input(.*?)id="mauticform_input_'.$formName.'_'.$alias.'"(.*?)value="(.*?)"(.*?)\/>/i', $formHtml, $match)) {
$replace = '<input'.$match[1].'id="mauticform_input_'.$formName.'_'.$alias.'"'.$match[2].'value="'.urldecode($value).'"'.$match[4].'/>';
$formHtml = str_replace($match[0], $replace, $formHtml);
Expand Down

0 comments on commit 9aa0554

Please sign in to comment.