Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit ee6ace8

Browse files
committed
Merge pull request #239 from symfony-cmf/merge-1.2
Merge 1.2
2 parents e69252a + a8a8e31 commit ee6ace8

13 files changed

+203
-24
lines changed

.travis.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,33 @@ sudo: false
1212

1313
cache:
1414
directories:
15-
- $HOME/.composer/cache
15+
- $HOME/.composer/cache/files
1616

1717
env:
18-
- SYMFONY_VERSION=2.7.* SYMFONY_DEPRECATIONS_HELPER=weak
18+
global: SYMFONY_DEPRECATIONS_HELPER=533
1919

2020
matrix:
2121
include:
22+
- php: 5.6
23+
env: DEPS=dev
2224
- php: 5.3
2325
env: SYMFONY_VERSION="^2.3.4" COMPOSER_FLAGS="--prefer-lowest"
2426
- php: 5.6
25-
env: SYMFONY_VERSION=2.3.* SYMFONY_DEPRECATIONS_HELPER=weak
26-
- php: 5.6
27-
env: SYMFONY_VERSION=2.8.*
27+
env: SYMFONY_VERSION=2.3.*
2828
- php: 5.6
29-
env: SYMFONY_VERSION=3.0.*
30-
allow_failures:
31-
- env: SYMFONY_VERSION=2.8.*
32-
- env: SYMFONY_VERSION=3.0.*
29+
env: SYMFONY_VERSION=2.7.*
3330
fast_finish: true
3431

3532
before_install:
36-
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
33+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
34+
- phpenv config-rm xdebug.ini || true
3735
- composer self-update
38-
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
36+
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
37+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
3938

40-
install: composer update $COMPOSER_FLAGS --prefer-dist
39+
install: composer update --prefer-dist $COMPOSER_FLAGS
4140

42-
script: phpunit --coverage-text
41+
script: phpunit
4342

4443
notifications:
4544
irc: "irc.freenode.org#symfony-cmf"

Admin/MenuNodeAdmin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public function buildBreadcrumbs($action, MenuItemInterface $menu = null)
169169
}
170170

171171
$parentAdmin->setSubject($parentDoc);
172+
$parentAdmin->setRequest($this->request);
172173
$parentEditNode = $parentAdmin->buildBreadcrumbs($action, $menu);
173174
if ($parentAdmin->isGranted('EDIT' && $parentAdmin->hasRoute('edit'))) {
174175
$parentEditNode->setUri(

Extension/ContentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function buildOptions(array $options)
6767
$options['uri'] = $this->contentRouter->generate(
6868
$options['content'],
6969
isset($options['routeParameters']) ? $options['routeParameters'] : array(),
70-
isset($options['routeAbsolute']) ? $options['routeAbsolute'] : false
70+
(isset($options['routeAbsolute']) && $options['routeAbsolute']) ? UrlGeneratorInterface::ABSOLUTE_URL : UrlGeneratorInterface::ABSOLUTE_PATH
7171
);
7272
}
7373

Provider/PhpcrMenuProvider.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
use Doctrine\Common\Persistence\ManagerRegistry;
1515
use Doctrine\ODM\PHPCR\DocumentManager;
16-
use Knp\Menu\Loader\LoaderInterface;
1716
use Knp\Menu\Loader\NodeLoader;
17+
use PHPCR\RepositoryException;
1818
use Symfony\Component\HttpFoundation\Request;
1919
use PHPCR\PathNotFoundException;
2020
use PHPCR\Util\PathHelper;
@@ -27,9 +27,9 @@
2727
class PhpcrMenuProvider implements MenuProviderInterface
2828
{
2929
/**
30-
* @var LoaderInterface
30+
* @var NodeLoader
3131
*/
32-
protected $loader = null;
32+
protected $loader;
3333

3434
/**
3535
* @var Request
@@ -217,9 +217,20 @@ protected function find($name, array $options, $throw)
217217
return false;
218218
}
219219

220-
$path = PathHelper::absolutizePath($name, $this->getMenuRoot());
221220
$dm = $this->getObjectManager();
222221
$session = $dm->getPhpcrSession();
222+
223+
try {
224+
$path = PathHelper::absolutizePath($name, $this->getMenuRoot());
225+
PathHelper::assertValidAbsolutePath($path, false, true, $session->getNamespacePrefixes());
226+
} catch (RepositoryException $e) {
227+
if ($throw) {
228+
throw $e;
229+
}
230+
231+
return false;
232+
}
233+
223234
if ($this->getPrefetch() > 0) {
224235
try {
225236
if (

Resources/translations/CmfMenuBundle.cs.xliff

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,26 @@
114114
<source>form.label_weak</source>
115115
<target>Slabé propojení</target>
116116
</trans-unit>
117+
<trans-unit id="show.label_id">
118+
<source>show.label_id</source>
119+
<target>Id</target>
120+
</trans-unit>
121+
<trans-unit id="show.label_name">
122+
<source>show.label_name</source>
123+
<target>Název</target>
124+
</trans-unit>
125+
<trans-unit id="show.label_label">
126+
<source>show.label_label</source>
127+
<target>Označení</target>
128+
</trans-unit>
129+
<trans-unit id="show.label_uri">
130+
<source>show.label_uri</source>
131+
<target>URI</target>
132+
</trans-unit>
133+
<trans-unit id="show.label_content">
134+
<source>show.label_content</source>
135+
<target>Obsah</target>
136+
</trans-unit>
117137
<trans-unit id="help.items_help">
118138
<source>help.items_help</source>
119139
<target>Klepněte na položku, kterou chcete upravit. Klikněte pravým tlačítkem myši pro přidání nových záznamů.</target>

Resources/translations/CmfMenuBundle.de.xliff

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,26 @@
106106
<source>form.label_link_type</source>
107107
<target>Linktyp</target>
108108
</trans-unit>
109+
<trans-unit id="show.label_id">
110+
<source>show.label_id</source>
111+
<target>Id</target>
112+
</trans-unit>
113+
<trans-unit id="show.label_name">
114+
<source>show.label_name</source>
115+
<target>Name</target>
116+
</trans-unit>
117+
<trans-unit id="show.label_label">
118+
<source>show.label_label</source>
119+
<target>Beschriftung</target>
120+
</trans-unit>
121+
<trans-unit id="show.label_uri">
122+
<source>show.label_uri</source>
123+
<target>URI</target>
124+
</trans-unit>
125+
<trans-unit id="show.label_content">
126+
<source>show.label_content</source>
127+
<target>Inhalt</target>
128+
</trans-unit>
109129
<trans-unit id="help.items_help">
110130
<source>help.items_help</source>
111131
<target>Klicken Sie auf ein Element, um es zu bearbeiten. Rechtsklick um Einträge hinzuzufügen.</target>

Resources/translations/CmfMenuBundle.en.xliff

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,28 @@
114114
<source>form.label_weak</source>
115115
<target>Weak association</target>
116116
</trans-unit>
117+
118+
<trans-unit id="show.label_id">
119+
<source>show.label_id</source>
120+
<target>Id</target>
121+
</trans-unit>
122+
<trans-unit id="show.label_name">
123+
<source>show.label_name</source>
124+
<target>Name</target>
125+
</trans-unit>
126+
<trans-unit id="show.label_label">
127+
<source>show.label_label</source>
128+
<target>Label</target>
129+
</trans-unit>
130+
<trans-unit id="show.label_uri">
131+
<source>show.label_uri</source>
132+
<target>URI</target>
133+
</trans-unit>
134+
<trans-unit id="show.label_content">
135+
<source>show.label_content</source>
136+
<target>Content</target>
137+
</trans-unit>
138+
117139
<trans-unit id="help.items_help">
118140
<source>help.items_help</source>
119141
<target>Click on item to edit, right click to create new items.</target>

Resources/translations/CmfMenuBundle.fr.xliff

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,28 @@
114114
<source>form.label_weak</source>
115115
<target>Association faible</target>
116116
</trans-unit>
117+
118+
<trans-unit id="show.label_id">
119+
<source>show.label_id</source>
120+
<target>Id</target>
121+
</trans-unit>
122+
<trans-unit id="show.label_name">
123+
<source>show.label_name</source>
124+
<target>Nom</target>
125+
</trans-unit>
126+
<trans-unit id="show.label_label">
127+
<source>show.label_label</source>
128+
<target>Label</target>
129+
</trans-unit>
130+
<trans-unit id="show.label_uri">
131+
<source>show.label_uri</source>
132+
<target>URI</target>
133+
</trans-unit>
134+
<trans-unit id="show.label_content">
135+
<source>show.label_content</source>
136+
<target>Contenu</target>
137+
</trans-unit>
138+
117139
<trans-unit id="help.items_help">
118140
<source>help.items_help</source>
119141
<target>Cliquez sur un élément pour le modifier, cliquez avec la touche droite pour ajouter des éléments.</target>

Resources/translations/CmfMenuBundle.sk.xliff

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,28 @@
114114
<source>form.label_weak</source>
115115
<target>Slabé prepojenie</target>
116116
</trans-unit>
117+
118+
<trans-unit id="show.label_id">
119+
<source>show.label_id</source>
120+
<target>Id</target>
121+
</trans-unit>
122+
<trans-unit id="show.label_name">
123+
<source>show.label_name</source>
124+
<target>Názov</target>
125+
</trans-unit>
126+
<trans-unit id="show.label_label">
127+
<source>show.label_label</source>
128+
<target>Označenie</target>
129+
</trans-unit>
130+
<trans-unit id="show.label_uri">
131+
<source>show.label_uri</source>
132+
<target>URI</target>
133+
</trans-unit>
134+
<trans-unit id="show.label_content">
135+
<source>show.label_content</source>
136+
<target>Obsah</target>
137+
</trans-unit>
138+
117139
<trans-unit id="help.items_help">
118140
<source>help.items_help</source>
119141
<target>Kliknite na položku, ktorú chcete upraviť. Kliknite pravým tlačidlom myši pre pridanie nových záznamov.</target>

Resources/translations/CmfMenuBundle.sl.xliff

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,26 @@
114114
<source>form.label_weak</source>
115115
<target>Slaba pridružitev</target>
116116
</trans-unit>
117+
<trans-unit id="show.label_id">
118+
<source>show.label_id</source>
119+
<target>Id</target>
120+
</trans-unit>
121+
<trans-unit id="show.label_name">
122+
<source>show.label_name</source>
123+
<target>Ime</target>
124+
</trans-unit>
125+
<trans-unit id="show.label_label">
126+
<source>show.label_label</source>
127+
<target>Oznaka</target>
128+
</trans-unit>
129+
<trans-unit id="show.label_uri">
130+
<source>show.label_uri</source>
131+
<target>URI</target>
132+
</trans-unit>
133+
<trans-unit id="show.label_content">
134+
<source>show.label_content</source>
135+
<target>Vsebina</target>
136+
</trans-unit>
117137
<trans-unit id="help.items_help">
118138
<source>help.items_help</source>
119139
<target>Kliknite na element za urejanje, desni klik za ustvarjanje novih elementov.</target>

0 commit comments

Comments
 (0)