Skip to content

Commit d65b924

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Fixed the wrong source name and the ja translation [SecurityBundle] disable the init:acl command if ACL is not used [DI] remove useless condition around unset
2 parents 98f827b + 12e6339 commit d65b924

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323
*/
2424
class InitAclCommand extends ContainerAwareCommand
2525
{
26+
/**
27+
* {@inheritdoc}
28+
*/
29+
public function isEnabled()
30+
{
31+
if (!$this->getContainer()->has('security.acl.dbal.connection')) {
32+
return false;
33+
}
34+
35+
return parent::isEnabled();
36+
}
37+
2638
/**
2739
* {@inheritdoc}
2840
*/

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
305305
$service = $this->$method();
306306
} catch (\Exception $e) {
307307
unset($this->loading[$id]);
308-
309-
if (array_key_exists($id, $this->services)) {
310-
unset($this->services[$id]);
311-
}
308+
unset($this->services[$id]);
312309

313310
if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
314311
return;

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,7 @@ public function hasTag($name)
495495
*/
496496
public function clearTag($name)
497497
{
498-
if (isset($this->tags[$name])) {
499-
unset($this->tags[$name]);
500-
}
498+
unset($this->tags[$name]);
501499

502500
return $this;
503501
}

src/Symfony/Component/Form/Resources/translations/validators.ja.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<target>アップロードされたファイルが大きすぎます。小さなファイルで再度アップロードしてください。</target>
1212
</trans-unit>
1313
<trans-unit id="30">
14-
<source>The CSRF token is invalid.</source>
15-
<target>CSRFトークンが無効です。</target>
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRFトークンが無効です、再送信してください。</target>
1616
</trans-unit>
1717
</body>
1818
</file>

0 commit comments

Comments
 (0)