Fix latest merge

This commit is contained in:
Nicolas Le Goff
2014-08-11 22:53:13 +02:00
parent 2899f152fb
commit 4fa1f613e4
35 changed files with 378 additions and 275 deletions

View File

@@ -25,8 +25,6 @@ before_script:
- echo 'extension="memcached.so"' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/memcached.ini - echo 'extension="memcached.so"' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/memcached.ini
- echo "extension=zmq.so" > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/zmq.ini - echo "extension=zmq.so" > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/zmq.ini
- yes | pecl install imagick - yes | pecl install imagick
- travis_retry composer self-update
- travis_retry composer install --dev --prefer-source
- wget http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz - wget http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz
- tar xzf sphinx-2.0.6-release.tar.gz - tar xzf sphinx-2.0.6-release.tar.gz
- sh -c "cd sphinx-2.0.6-release && wget http://snowball.tartarus.org/dist/libstemmer_c.tgz && tar xzf libstemmer_c.tgz && ./configure --with-libstemmer --with-iconv --with-mysql --enable-id64 --quiet && make -j --quiet && sudo make install" - sh -c "cd sphinx-2.0.6-release && wget http://snowball.tartarus.org/dist/libstemmer_c.tgz && tar xzf libstemmer_c.tgz && ./configure --with-libstemmer --with-iconv --with-mysql --enable-id64 --quiet && make -j --quiet && sudo make install"
@@ -53,8 +51,10 @@ matrix:
- php: 5.6 - php: 5.6
script: script:
- travis_retry composer install --dev --prefer-source -vvv
- travis_retry grunt install-assets -vvv
- bin/developer assets:compile-less
- bin/developer system:uninstall - bin/developer system:uninstall
- travis_retry bin/developer dependencies:all --prefer-source
- sh -c " if [ '$SETUP_MODE' = 'update' ]; then - sh -c " if [ '$SETUP_MODE' = 'update' ]; then
cp hudson/connexion.inc config/; cp hudson/connexion.inc config/;
cp hudson/_GV.php config/; cp hudson/_GV.php config/;

View File

@@ -43,7 +43,6 @@ module.exports = function(grunt) {
components: { components: {
"jquery.ui": ["npm", {"../../node_modules/.bin/grunt": "build"}], "jquery.ui": ["npm", {"../../node_modules/.bin/grunt": "build"}],
"jquery-mobile": ["npm", {"../../node_modules/.bin/grunt": "dist"}], "jquery-mobile": ["npm", {"../../node_modules/.bin/grunt": "dist"}],
// "tinymce": ["npm", {"../../node_modules/.bin/jake":""}],
"bootstrap": ["npm", {"make": "bootstrap"}], "bootstrap": ["npm", {"make": "bootstrap"}],
"autobahnjs": [{"make":"build"}] "autobahnjs": [{"make":"build"}]
} }

View File

@@ -81,7 +81,7 @@
"vierbergenlars/php-semver" : "~2.1", "vierbergenlars/php-semver" : "~2.1",
"zend/gdata" : "~1.12.1", "zend/gdata" : "~1.12.1",
"doctrine/migrations" : "1.0.x-dev@dev", "doctrine/migrations" : "1.0.x-dev@dev",
willdurand/negotiation" : "~1.3" "willdurand/negotiation" : "~1.3"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit" : "~3.7", "phpunit/phpunit" : "~3.7",

289
composer.lock generated
View File

@@ -4,16 +4,22 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "81820d7853d2c85cbb34fc57910d6963", "hash": "2ddab4a9d0ebb3a7ff949171dd62a1d2",
"packages": [ "packages": [
{ {
"name": "alchemy-fr/tcpdf-clone", "name": "alchemy-fr/tcpdf-clone",
"version": "6.0.039", "version": "6.0.039",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/alchemy-fr/tcpdf-clone", "url": "https://github.com/alchemy-fr/tcpdf-clone.git",
"reference": "2ba0248a7187f1626df6c128750650416267f0e7" "reference": "2ba0248a7187f1626df6c128750650416267f0e7"
}, },
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/alchemy-fr/tcpdf-clone/zipball/2ba0248a7187f1626df6c128750650416267f0e7",
"reference": "2ba0248a7187f1626df6c128750650416267f0e7",
"shasum": ""
},
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
}, },
@@ -60,6 +66,10 @@
"qrcode", "qrcode",
"tcpdf" "tcpdf"
], ],
"support": {
"source": "https://github.com/alchemy-fr/tcpdf-clone/tree/6.0.039",
"issues": "https://github.com/alchemy-fr/tcpdf-clone/issues"
},
"time": "2013-10-13 16:11:17" "time": "2013-10-13 16:11:17"
}, },
{ {
@@ -103,7 +113,7 @@
"homepage": "http://www.lickmychip.com/" "homepage": "http://www.lickmychip.com/"
}, },
{ {
"name": "Nicolas Le Goff", "name": "nlegoff",
"email": "legoff.n@gmail.com" "email": "legoff.n@gmail.com"
}, },
{ {
@@ -291,7 +301,7 @@
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"time": "2014-07-07 14:01:51" "time": "2014-07-07 16:25:07"
}, },
{ {
"name": "alchemy/task-manager", "name": "alchemy/task-manager",
@@ -362,12 +372,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/alchemy-fr/Zippy.git", "url": "https://github.com/alchemy-fr/Zippy.git",
"reference": "8ccc695f66c3b61ffdb3b9e88474602da52401ae" "reference": "d2f5e88f2436b9c1294e8819d951822abe39e9a7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/alchemy-fr/Zippy/zipball/8ccc695f66c3b61ffdb3b9e88474602da52401ae", "url": "https://api.github.com/repos/alchemy-fr/Zippy/zipball/d2f5e88f2436b9c1294e8819d951822abe39e9a7",
"reference": "8ccc695f66c3b61ffdb3b9e88474602da52401ae", "reference": "d2f5e88f2436b9c1294e8819d951822abe39e9a7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -416,19 +426,19 @@
"tar", "tar",
"zip" "zip"
], ],
"time": "2014-02-18 22:09:18" "time": "2014-05-05 13:39:00"
}, },
{ {
"name": "cboden/ratchet", "name": "cboden/ratchet",
"version": "v0.3.0", "version": "v0.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/cboden/Ratchet.git", "url": "https://github.com/ratchetphp/Ratchet.git",
"reference": "d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58" "reference": "d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/cboden/Ratchet/zipball/d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58", "url": "https://api.github.com/repos/ratchetphp/Ratchet/zipball/d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58",
"reference": "d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58", "reference": "d756e0b507a5f3cdbf8c59dbb7baf68574dc7d58",
"shasum": "" "shasum": ""
}, },
@@ -547,16 +557,16 @@
}, },
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
"version": "v1.1.2", "version": "v1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/annotations.git", "url": "https://github.com/doctrine/annotations.git",
"reference": "40db0c96985aab2822edbc4848b3bd2429e02670" "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/40db0c96985aab2822edbc4848b3bd2429e02670", "url": "https://api.github.com/repos/doctrine/annotations/zipball/d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"reference": "40db0c96985aab2822edbc4848b3bd2429e02670", "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -564,12 +574,13 @@
"php": ">=5.3.2" "php": ">=5.3.2"
}, },
"require-dev": { "require-dev": {
"doctrine/cache": "1.*" "doctrine/cache": "1.*",
"phpunit/phpunit": "4.*"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -585,7 +596,8 @@
{ {
"name": "Jonathan Wage", "name": "Jonathan Wage",
"email": "jonwage@gmail.com", "email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/" "homepage": "http://www.jwage.com/",
"role": "Creator"
}, },
{ {
"name": "Guilherme Blanco", "name": "Guilherme Blanco",
@@ -603,7 +615,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -614,7 +626,7 @@
"docblock", "docblock",
"parser" "parser"
], ],
"time": "2013-06-16 21:33:03" "time": "2014-07-06 15:52:21"
}, },
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@@ -678,7 +690,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -745,7 +757,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -760,16 +772,16 @@
}, },
{ {
"name": "doctrine/common", "name": "doctrine/common",
"version": "v2.4.1", "version": "v2.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/common.git", "url": "https://github.com/doctrine/common.git",
"reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7" "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/ceb18cf9b0230f3ea208b6238130fd415abda0a7", "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b",
"reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7", "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -780,6 +792,9 @@
"doctrine/lexer": "1.*", "doctrine/lexer": "1.*",
"php": ">=5.3.2" "php": ">=5.3.2"
}, },
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -799,7 +814,8 @@
{ {
"name": "Jonathan Wage", "name": "Jonathan Wage",
"email": "jonwage@gmail.com", "email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/" "homepage": "http://www.jwage.com/",
"role": "Creator"
}, },
{ {
"name": "Guilherme Blanco", "name": "Guilherme Blanco",
@@ -817,7 +833,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -830,7 +846,7 @@
"persistence", "persistence",
"spl" "spl"
], ],
"time": "2013-09-07 10:20:34" "time": "2014-05-21 19:28:51"
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
@@ -929,7 +945,8 @@
{ {
"name": "Jonathan Wage", "name": "Jonathan Wage",
"email": "jonwage@gmail.com", "email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/" "homepage": "http://www.jwage.com/",
"role": "Creator"
}, },
{ {
"name": "Guilherme Blanco", "name": "Guilherme Blanco",
@@ -947,7 +964,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -1001,7 +1018,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -1019,12 +1036,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/migrations.git", "url": "https://github.com/doctrine/migrations.git",
"reference": "0742fc7167a4deedaabc8639849a3e71082999f1" "reference": "4256449c5e2603a6b6ee5a78c7c4521d4d4430b8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/migrations/zipball/0742fc7167a4deedaabc8639849a3e71082999f1", "url": "https://api.github.com/repos/doctrine/migrations/zipball/4256449c5e2603a6b6ee5a78c7c4521d4d4430b8",
"reference": "0742fc7167a4deedaabc8639849a3e71082999f1", "reference": "4256449c5e2603a6b6ee5a78c7c4521d4d4430b8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1055,7 +1072,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "Jonathan H. Wage", "name": "Jonathan Wage",
"email": "jonwage@gmail.com", "email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/", "homepage": "http://www.jwage.com/",
"role": "Creator" "role": "Creator"
@@ -1071,7 +1088,7 @@
"database", "database",
"migrations" "migrations"
], ],
"time": "2014-01-20 11:29:43" "time": "2014-07-09 07:58:02"
}, },
{ {
"name": "doctrine/orm", "name": "doctrine/orm",
@@ -1211,13 +1228,13 @@
"version": "v1.0.0", "version": "v1.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/igorw/evenement", "url": "https://github.com/igorw/evenement.git",
"reference": "v1.0.0" "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/igorw/evenement/zipball/v1.0.0", "url": "https://api.github.com/repos/igorw/evenement/zipball/fa966683e7df3e5dd5929d984a44abfbd6bafe8d",
"reference": "v1.0.0", "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1244,7 +1261,7 @@
"keywords": [ "keywords": [
"event-dispatcher" "event-dispatcher"
], ],
"time": "2012-05-30 08:01:08" "time": "2012-05-30 15:01:08"
}, },
{ {
"name": "facebook/php-sdk", "name": "facebook/php-sdk",
@@ -1297,12 +1314,12 @@
"version": "v2.3.9", "version": "v2.3.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "url": "https://github.com/Atlantic18/DoctrineExtensions.git",
"reference": "35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54" "reference": "35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54", "url": "https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54",
"reference": "35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54", "reference": "35adcaae1a3f50d0d5b73aa50ed8fd28ee35ce54",
"shasum": "" "shasum": ""
}, },
@@ -1370,7 +1387,7 @@
"tree", "tree",
"uploadable" "uploadable"
], ],
"time": "2013-08-18 07:18:44" "time": "2014-01-12 16:34:06"
}, },
{ {
"name": "goodby/csv", "name": "goodby/csv",
@@ -1722,16 +1739,16 @@
}, },
{ {
"name": "jms/metadata", "name": "jms/metadata",
"version": "1.5.0", "version": "1.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/schmittjoh/metadata.git", "url": "https://github.com/schmittjoh/metadata.git",
"reference": "88ffa28bc987e4c26229fc84a2e541b6ed4e1459" "reference": "22b72455559a25777cfd28c4ffda81ff7639f353"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/schmittjoh/metadata/zipball/88ffa28bc987e4c26229fc84a2e541b6ed4e1459", "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353",
"reference": "88ffa28bc987e4c26229fc84a2e541b6ed4e1459", "reference": "22b72455559a25777cfd28c4ffda81ff7639f353",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1757,9 +1774,9 @@
], ],
"authors": [ "authors": [
{ {
"name": "Johannes M. Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -1770,7 +1787,7 @@
"xml", "xml",
"yaml" "yaml"
], ],
"time": "2013-11-05 23:02:36" "time": "2014-07-12 07:13:19"
}, },
{ {
"name": "jms/parser-lib", "name": "jms/parser-lib",
@@ -1860,9 +1877,9 @@
], ],
"authors": [ "authors": [
{ {
"name": "Johannes M. Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -1931,9 +1948,9 @@
], ],
"authors": [ "authors": [
{ {
"name": "Johannes M. Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -2007,7 +2024,7 @@
}, },
{ {
"name": "Robert Schönthal", "name": "Robert Schönthal",
"email": "seroscho@googlemail.com", "email": "robert.schoenthal@gmail.com",
"homepage": "http://digitalkaoz.net" "homepage": "http://digitalkaoz.net"
} }
], ],
@@ -2099,12 +2116,12 @@
"version": "dev-fix-video-dim", "version": "dev-fix-video-dim",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nlegoff/Mediavorus.git", "url": "https://github.com/nlegoff/MediaVorus.git",
"reference": "f11cd2453d5acbc6ac52421dc4edd760433b1515" "reference": "f11cd2453d5acbc6ac52421dc4edd760433b1515"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nlegoff/Mediavorus/zipball/f11cd2453d5acbc6ac52421dc4edd760433b1515", "url": "https://api.github.com/repos/nlegoff/MediaVorus/zipball/f11cd2453d5acbc6ac52421dc4edd760433b1515",
"reference": "f11cd2453d5acbc6ac52421dc4edd760433b1515", "reference": "f11cd2453d5acbc6ac52421dc4edd760433b1515",
"shasum": "" "shasum": ""
}, },
@@ -2254,7 +2271,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "Stephen Clay", "name": "Steve Clay",
"email": "steve@mrclay.org", "email": "steve@mrclay.org",
"homepage": "http://www.mrclay.org/", "homepage": "http://www.mrclay.org/",
"role": "Developer" "role": "Developer"
@@ -2440,21 +2457,21 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/romainneutron/Imagine-Silex-Service-Provider.git", "url": "https://github.com/romainneutron/Imagine-Silex-Service-Provider.git",
"reference": "0.1.2" "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/0.1.2", "url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/a8a7862ae90419f2b23746cd8436c2310e4eb084",
"reference": "0.1.2", "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"imagine/imagine": "*", "imagine/imagine": "*",
"php": ">=5.3.3", "php": ">=5.3.3",
"silex/silex": ">=1.0,<2.0" "silex/silex": "~1.0"
}, },
"require-dev": { "require-dev": {
"symfony/browser-kit": ">=2.0,<3.0" "symfony/browser-kit": "~2.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2860,9 +2877,9 @@
], ],
"authors": [ "authors": [
{ {
"name": "Johannes M. Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -3011,9 +3028,9 @@
], ],
"authors": [ "authors": [
{ {
"name": "Johannes M. Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
@@ -3114,17 +3131,17 @@
}, },
{ {
"name": "react/event-loop", "name": "react/event-loop",
"version": "v0.3.3", "version": "v0.3.4",
"target-dir": "React/EventLoop", "target-dir": "React/EventLoop",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/event-loop.git", "url": "https://github.com/reactphp/event-loop.git",
"reference": "49208fa3a15c9eae4adf8351ee9caa4064fe550d" "reference": "235cddfa999a392e7d63dc9bef2e042492608d9f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/event-loop/zipball/49208fa3a15c9eae4adf8351ee9caa4064fe550d", "url": "https://api.github.com/repos/reactphp/event-loop/zipball/235cddfa999a392e7d63dc9bef2e042492608d9f",
"reference": "49208fa3a15c9eae4adf8351ee9caa4064fe550d", "reference": "235cddfa999a392e7d63dc9bef2e042492608d9f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3153,21 +3170,21 @@
"keywords": [ "keywords": [
"event-loop" "event-loop"
], ],
"time": "2013-07-08 22:38:22" "time": "2013-07-21 02:23:09"
}, },
{ {
"name": "react/socket", "name": "react/socket",
"version": "v0.3.2", "version": "v0.3.4",
"target-dir": "React/Socket", "target-dir": "React/Socket",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/socket.git", "url": "https://github.com/reactphp/socket.git",
"reference": "9cc32838d25a934ce950d2662cce2ff1b9e9f8aa" "reference": "19bc0c4309243717396022ffb2e59be1cc784327"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/socket/zipball/9cc32838d25a934ce950d2662cce2ff1b9e9f8aa", "url": "https://api.github.com/repos/reactphp/socket/zipball/19bc0c4309243717396022ffb2e59be1cc784327",
"reference": "9cc32838d25a934ce950d2662cce2ff1b9e9f8aa", "reference": "19bc0c4309243717396022ffb2e59be1cc784327",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3195,21 +3212,21 @@
"keywords": [ "keywords": [
"Socket" "Socket"
], ],
"time": "2013-04-26 20:23:10" "time": "2014-02-17 22:32:00"
}, },
{ {
"name": "react/stream", "name": "react/stream",
"version": "v0.3.3", "version": "v0.3.4",
"target-dir": "React/Stream", "target-dir": "React/Stream",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/stream.git", "url": "https://github.com/reactphp/stream.git",
"reference": "b72900ab00513b591fb101faecad38f9c8eab8da" "reference": "feef56628afe3fa861f0da5f92c909e029efceac"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/stream/zipball/b72900ab00513b591fb101faecad38f9c8eab8da", "url": "https://api.github.com/repos/reactphp/stream/zipball/feef56628afe3fa861f0da5f92c909e029efceac",
"reference": "b72900ab00513b591fb101faecad38f9c8eab8da", "reference": "feef56628afe3fa861f0da5f92c909e029efceac",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3240,7 +3257,7 @@
"pipe", "pipe",
"stream" "stream"
], ],
"time": "2013-07-09 00:44:12" "time": "2014-02-16 19:48:52"
}, },
{ {
"name": "react/zmq", "name": "react/zmq",
@@ -3340,7 +3357,8 @@
}, },
{ {
"name": "Ben Ramsey", "name": "Ben Ramsey",
"homepage": "http://benramsey.com" "homepage": "http://benramsey.com",
"role": "Developer"
} }
], ],
"description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
@@ -3358,12 +3376,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/silexphp/Silex.git", "url": "https://github.com/silexphp/Silex.git",
"reference": "33da608a5c87bef962f2b1d19470b5a0bbb6aa83" "reference": "67639888035a3e586bfdb652c15c38f22e870d89"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/silexphp/Silex/zipball/33da608a5c87bef962f2b1d19470b5a0bbb6aa83", "url": "https://api.github.com/repos/silexphp/Silex/zipball/67639888035a3e586bfdb652c15c38f22e870d89",
"reference": "33da608a5c87bef962f2b1d19470b5a0bbb6aa83", "reference": "67639888035a3e586bfdb652c15c38f22e870d89",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3436,7 +3454,7 @@
"keywords": [ "keywords": [
"microframework" "microframework"
], ],
"time": "2014-02-05 06:19:00" "time": "2014-04-15 20:52:04"
}, },
{ {
"name": "silex/web-profiler", "name": "silex/web-profiler",
@@ -3445,12 +3463,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/silexphp/Silex-WebProfiler.git", "url": "https://github.com/silexphp/Silex-WebProfiler.git",
"reference": "2d153ae71c8445cb90535fbdd82b92e39d9f67e0" "reference": "8c62046a16a7b8f229aff9147f842956a1e48a14"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/silexphp/Silex-WebProfiler/zipball/2d153ae71c8445cb90535fbdd82b92e39d9f67e0", "url": "https://api.github.com/repos/silexphp/Silex-WebProfiler/zipball/8c62046a16a7b8f229aff9147f842956a1e48a14",
"reference": "2d153ae71c8445cb90535fbdd82b92e39d9f67e0", "reference": "8c62046a16a7b8f229aff9147f842956a1e48a14",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3476,12 +3494,14 @@
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Fabien Potencier",
"email": "fabien@symfony.com" "email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
} }
], ],
"description": "A WebProfiler for Silex", "description": "A WebProfiler for Silex",
"homepage": "http://silex.sensiolabs.org/", "homepage": "http://silex.sensiolabs.org/",
"time": "2014-01-30 06:11:24" "time": "2014-06-04 21:14:30"
}, },
{ {
"name": "sorien/silex-dbal-profiler", "name": "sorien/silex-dbal-profiler",
@@ -3567,7 +3587,7 @@
}, },
{ {
"name": "Phraseanet Team", "name": "Phraseanet Team",
"email": "support@alchemy.fr", "email": "info@alchemy.fr",
"homepage": "http://www.phraseanet.com/" "homepage": "http://www.phraseanet.com/"
} }
], ],
@@ -3614,7 +3634,9 @@
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Fabien Potencier",
"email": "fabien@symfony.com" "email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
}, },
{ {
"name": "Chris Corbyn" "name": "Chris Corbyn"
@@ -3630,20 +3652,21 @@
}, },
{ {
"name": "symfony/icu", "name": "symfony/icu",
"version": "v1.2.0", "version": "v1.2.2",
"target-dir": "Symfony/Component/Icu", "target-dir": "Symfony/Component/Icu",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Icu.git", "url": "https://github.com/symfony/Icu.git",
"reference": "7299cd3d8d6602103d1ebff5d0a9917b7bc6de72" "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Icu/zipball/7299cd3d8d6602103d1ebff5d0a9917b7bc6de72", "url": "https://api.github.com/repos/symfony/Icu/zipball/d4d85d6055b87f394d941b45ddd3a9173e1e3d2a",
"reference": "7299cd3d8d6602103d1ebff5d0a9917b7bc6de72", "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-intl": "*",
"lib-icu": ">=4.4", "lib-icu": ">=4.4",
"php": ">=5.3.3", "php": ">=5.3.3",
"symfony/intl": "~2.3" "symfony/intl": "~2.3"
@@ -3674,7 +3697,7 @@
"icu", "icu",
"intl" "intl"
], ],
"time": "2013-06-03 18:32:58" "time": "2014-07-25 09:58:17"
}, },
{ {
"name": "symfony/symfony", "name": "symfony/symfony",
@@ -3868,7 +3891,9 @@
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Fabien Potencier",
"email": "fabien@symfony.com" "email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
} }
], ],
"description": "Common additional features for Twig that do not directly belong in core", "description": "Common additional features for Twig that do not directly belong in core",
@@ -3987,7 +4012,7 @@
}, },
{ {
"name": "willdurand/negotiation", "name": "willdurand/negotiation",
"version": "dev-master", "version": "1.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/willdurand/Negotiation.git", "url": "https://github.com/willdurand/Negotiation.git",
@@ -4084,12 +4109,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Behat/Behat.git", "url": "https://github.com/Behat/Behat.git",
"reference": "a12154aae8a09248637fbca8ef3b2ef2ac71f2aa" "reference": "e585f8a90b366a9a719b2998b9f8ab643735eda7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Behat/Behat/zipball/a12154aae8a09248637fbca8ef3b2ef2ac71f2aa", "url": "https://api.github.com/repos/Behat/Behat/zipball/e585f8a90b366a9a719b2998b9f8ab643735eda7",
"reference": "a12154aae8a09248637fbca8ef3b2ef2ac71f2aa", "reference": "e585f8a90b366a9a719b2998b9f8ab643735eda7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4138,7 +4163,7 @@
"Behat", "Behat",
"Symfony2" "Symfony2"
], ],
"time": "2014-02-12 17:03:46" "time": "2014-04-26 16:56:17"
}, },
{ {
"name": "behat/gherkin", "name": "behat/gherkin",
@@ -4146,12 +4171,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Behat/Gherkin.git", "url": "https://github.com/Behat/Gherkin.git",
"reference": "2b33963da5525400573560c173ab5c9c057e1852" "reference": "c32e15d92e1a2ce399a1a1c5be7afd965176e86c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/2b33963da5525400573560c173ab5c9c057e1852", "url": "https://api.github.com/repos/Behat/Gherkin/zipball/c32e15d92e1a2ce399a1a1c5be7afd965176e86c",
"reference": "2b33963da5525400573560c173ab5c9c057e1852", "reference": "c32e15d92e1a2ce399a1a1c5be7afd965176e86c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4199,7 +4224,7 @@
"Symfony2", "Symfony2",
"parser" "parser"
], ],
"time": "2013-10-15 11:22:17" "time": "2014-06-06 00:48:18"
}, },
{ {
"name": "behat/mink", "name": "behat/mink",
@@ -4207,17 +4232,17 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Behat/Mink.git", "url": "https://github.com/Behat/Mink.git",
"reference": "v1.5.0" "reference": "0769e6d9726c140a54dbf827a438c0f9912749fe"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Behat/Mink/zipball/v1.5.0", "url": "https://api.github.com/repos/Behat/Mink/zipball/0769e6d9726c140a54dbf827a438c0f9912749fe",
"reference": "v1.5.0", "reference": "0769e6d9726c140a54dbf827a438c0f9912749fe",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.1", "php": ">=5.3.1",
"symfony/css-selector": ">=2.0,<3.0" "symfony/css-selector": "~2.0"
}, },
"suggest": { "suggest": {
"behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)",
@@ -4422,17 +4447,17 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Behat/MinkSelenium2Driver.git", "url": "https://github.com/Behat/MinkSelenium2Driver.git",
"reference": "v1.1.1" "reference": "bcf1b537de37db6db0822d9e7bd97e600fd7a476"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Behat/MinkSelenium2Driver/zipball/v1.1.1", "url": "https://api.github.com/repos/Behat/MinkSelenium2Driver/zipball/bcf1b537de37db6db0822d9e7bd97e600fd7a476",
"reference": "v1.1.1", "reference": "bcf1b537de37db6db0822d9e7bd97e600fd7a476",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"behat/mink": ">=1.5,<1.6", "behat/mink": "~1.5.0",
"instaclick/php-webdriver": ">=1.0.12.0,<1.1", "instaclick/php-webdriver": "~1.0.12",
"php": ">=5.3.1" "php": ">=5.3.1"
}, },
"type": "mink-driver", "type": "mink-driver",
@@ -4577,7 +4602,7 @@
{ {
"name": "Anthon Pang", "name": "Anthon Pang",
"email": "apang@softwaredevelopment.ca", "email": "apang@softwaredevelopment.ca",
"role": "Fork Maintainer" "role": "developer"
} }
], ],
"description": "PHP WebDriver for Selenium 2", "description": "PHP WebDriver for Selenium 2",
@@ -4592,16 +4617,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "1.2.15", "version": "1.2.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "6ba4ed2895d538a039d5d5866edc4ec0424c7852" "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ba4ed2895d538a039d5d5866edc4ec0424c7852", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ef2bf3a1c47eca07ea95f0d8a902a6340390b34",
"reference": "6ba4ed2895d538a039d5d5866edc4ec0424c7852", "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4649,7 +4674,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2014-02-03 07:44:47" "time": "2014-03-28 10:53:45"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@@ -4786,16 +4811,16 @@
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
"version": "1.2.1", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git", "url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e" "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5220af2a7929aa35cf663d97c89ad3d50cf5fa3e", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
"reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e", "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4832,7 +4857,7 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2013-09-13 04:58:23" "time": "2014-03-03 05:10:30"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
@@ -4996,7 +5021,5 @@
"platform": { "platform": {
"php": ">=5.4" "php": ">=5.4"
}, },
"platform-dev": [ "platform-dev": []
]
} }

View File

@@ -42,15 +42,15 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) {
// handle API content negotiation // handle API content negotiation
$app->before(function(Request $request) use ($app) { $app->before(function(Request $request) use ($app) {
// register custom API format // register custom API format
$request->setFormat(\API_V1_result::FORMAT_JSON_EXTENDED, \API_V1_adapter::$extendedContentTypes['json']); $request->setFormat(Result::FORMAT_JSON_EXTENDED, V1::$extendedContentTypes['json']);
$request->setFormat(\API_V1_result::FORMAT_YAML_EXTENDED, \API_V1_adapter::$extendedContentTypes['yaml']); $request->setFormat(Result::FORMAT_YAML_EXTENDED, V1::$extendedContentTypes['yaml']);
$request->setFormat(\API_V1_result::FORMAT_JSONP_EXTENDED, \API_V1_adapter::$extendedContentTypes['jsonp']); $request->setFormat(Result::FORMAT_JSONP_EXTENDED, V1::$extendedContentTypes['jsonp']);
$request->setFormat(\API_V1_result::FORMAT_JSONP, array('text/javascript', 'application/javascript')); $request->setFormat(Result::FORMAT_JSONP, array('text/javascript', 'application/javascript'));
// handle content negociation // handle content negociation
$priorities = array('application/json', 'application/yaml', 'text/yaml', 'text/javascript', 'application/javascript'); $priorities = array('application/json', 'application/yaml', 'text/yaml', 'text/javascript', 'application/javascript');
foreach (\API_V1_adapter::$extendedContentTypes['json'] as $priorities[]); foreach (V1::$extendedContentTypes['json'] as $priorities[]);
foreach (\API_V1_adapter::$extendedContentTypes['yaml'] as $priorities[]); foreach (V1::$extendedContentTypes['yaml'] as $priorities[]);
$format = $app['format.negociator']->getBest($request->headers->get('accept') ,$priorities); $format = $app['format.negociator']->getBest($request->headers->get('accept') ,$priorities);
// throw unacceptable http error if API can not handle asked format // throw unacceptable http error if API can not handle asked format
@@ -59,29 +59,29 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) {
} }
// set request format according to negotiated content or override format with JSONP if callback parameter is defined // set request format according to negotiated content or override format with JSONP if callback parameter is defined
if (trim($request->get('callback')) !== '') { if (trim($request->get('callback')) !== '') {
$request->setRequestFormat(\API_V1_result::FORMAT_JSONP); $request->setRequestFormat(Result::FORMAT_JSONP);
} else { } else {
$request->setRequestFormat($request->getFormat($format->getValue())); $request->setRequestFormat($request->getFormat($format->getValue()));
} }
// tells whether asked format is extended or not // tells whether asked format is extended or not
$request->attributes->set('_extended', in_array( $request->attributes->set('_extended', in_array(
$request->getRequestFormat(\API_V1_result::FORMAT_JSON), $request->getRequestFormat(Result::FORMAT_JSON),
array( array(
\API_V1_result::FORMAT_JSON_EXTENDED, Result::FORMAT_JSON_EXTENDED,
\API_V1_result::FORMAT_YAML_EXTENDED, Result::FORMAT_YAML_EXTENDED,
\API_V1_result::FORMAT_JSONP_EXTENDED Result::FORMAT_JSONP_EXTENDED
) )
)); ));
}, PhraseaApplication::EARLY_EVENT); }, PhraseaApplication::EARLY_EVENT);
$app->after(function(Request $request, Response $response) use ($app) { $app->after(function(Request $request, Response $response) use ($app) {
if ($request->getRequestFormat(\API_V1_result::FORMAT_JSON) === \API_V1_result::FORMAT_JSONP && !$response->isOk() && !$response->isServerError()) { if ($request->getRequestFormat(Result::FORMAT_JSON) === Result::FORMAT_JSONP && !$response->isOk() && !$response->isServerError()) {
$response->setStatusCode(200); $response->setStatusCode(200);
} }
// set response content type // set response content type
if (!$response->headers->get('Content-Type')) { if (!$response->headers->get('Content-Type')) {
$response->headers->set('Content-Type', $request->getMimeType($request->getRequestFormat(\API_V1_result::FORMAT_JSON))); $response->headers->set('Content-Type', $request->getMimeType($request->getRequestFormat(Result::FORMAT_JSON)));
} }
}); });

View File

@@ -26,6 +26,10 @@ class SchedulerPauseTasks extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$ret = 0; $ret = 0;
$this->container['task-manager.status']->stop(); $this->container['task-manager.status']->stop();

View File

@@ -26,6 +26,10 @@ class SchedulerResumeTasks extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$ret = 0; $ret = 0;
$this->container['task-manager.status']->start(); $this->container['task-manager.status']->start();

View File

@@ -40,6 +40,10 @@ class SchedulerRun extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
declare(ticks=1); declare(ticks=1);
if ($this->container['task-manager.logger.configuration']['enabled']) { if ($this->container['task-manager.logger.configuration']['enabled']) {

View File

@@ -33,6 +33,10 @@ class SchedulerState extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$info = $this->container['task-manager.live-information']->getManager(); $info = $this->container['task-manager.live-information']->getManager();
$error = $info['configuration'] !== $info['actual']; $error = $info['configuration'] !== $info['actual'];
$actual = $error ? "<error>" .$info['actual']. "</error>" : "<info>".$info['actual']."</info>"; $actual = $error ? "<error>" .$info['actual']. "</error>" : "<info>".$info['actual']."</info>";

View File

@@ -43,6 +43,10 @@ class TaskRun extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
declare(ticks=1); declare(ticks=1);
if (null === $task = $this->container['repo.tasks']->find($input->getArgument('task_id'))) { if (null === $task = $this->container['repo.tasks']->find($input->getArgument('task_id'))) {

View File

@@ -29,6 +29,10 @@ class TaskStart extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$task = $this->container['converter.task']->convert($input->getArgument('task_id')); $task = $this->container['converter.task']->convert($input->getArgument('task_id'));
$this->container['manipulator.task']->start($task); $this->container['manipulator.task']->start($task);

View File

@@ -31,6 +31,10 @@ class TaskState extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$task_id = $input->getArgument('task_id'); $task_id = $input->getArgument('task_id');
if (null === $task = $this->container['repo.tasks']->find($task_id)) { if (null === $task = $this->container['repo.tasks']->find($task_id)) {
throw new RuntimeException('Invalid task_id'); throw new RuntimeException('Invalid task_id');

View File

@@ -29,6 +29,10 @@ class TaskStop extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$task = $this->container['converter.task']->convert($input->getArgument('task_id')); $task = $this->container['converter.task']->convert($input->getArgument('task_id'));
$this->container['manipulator.task']->stop($task); $this->container['manipulator.task']->stop($task);

View File

@@ -132,6 +132,10 @@ class TaskManager implements ControllerProviderInterface
public function getLiveInformation(Application $app, Request $request) public function getLiveInformation(Application $app, Request $request)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
if ($request->getRequestFormat() !== "json") { if ($request->getRequestFormat() !== "json") {
$app->abort(406, 'Only JSON format is accepted.'); $app->abort(406, 'Only JSON format is accepted.');
} }
@@ -149,6 +153,10 @@ class TaskManager implements ControllerProviderInterface
public function getScheduler(Application $app, Request $request) public function getScheduler(Application $app, Request $request)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
if ($request->getRequestFormat() !== "json") { if ($request->getRequestFormat() !== "json") {
$app->abort(406, 'Only JSON format is accepted.'); $app->abort(406, 'Only JSON format is accepted.');
} }
@@ -241,6 +249,10 @@ class TaskManager implements ControllerProviderInterface
public function postTaskDelete(Application $app, Request $request, Task $task) public function postTaskDelete(Application $app, Request $request, Task $task)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$app['manipulator.task']->delete($task); $app['manipulator.task']->delete($task);
return $app->redirectPath('admin_tasks_list'); return $app->redirectPath('admin_tasks_list');
@@ -248,6 +260,10 @@ class TaskManager implements ControllerProviderInterface
public function postStartTask(Application $app, Request $request, Task $task) public function postStartTask(Application $app, Request $request, Task $task)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$app['manipulator.task']->start($task); $app['manipulator.task']->start($task);
return $app->redirectPath('admin_tasks_list'); return $app->redirectPath('admin_tasks_list');
@@ -255,6 +271,10 @@ class TaskManager implements ControllerProviderInterface
public function postStopTask(Application $app, Request $request, Task $task) public function postStopTask(Application $app, Request $request, Task $task)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$app['manipulator.task']->stop($task); $app['manipulator.task']->stop($task);
return $app->redirectPath('admin_tasks_list'); return $app->redirectPath('admin_tasks_list');
@@ -269,6 +289,10 @@ class TaskManager implements ControllerProviderInterface
public function postSaveTask(Application $app, Request $request, Task $task) public function postSaveTask(Application $app, Request $request, Task $task)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
if (!$this->doValidateXML($request->request->get('settings'))) { if (!$this->doValidateXML($request->request->get('settings'))) {
return $app->json(['success' => false, 'message' => sprintf('Unable to load XML %s', $request->request->get('xml'))]); return $app->json(['success' => false, 'message' => sprintf('Unable to load XML %s', $request->request->get('xml'))]);
} }
@@ -306,6 +330,10 @@ class TaskManager implements ControllerProviderInterface
public function getTask(Application $app, Request $request, Task $task) public function getTask(Application $app, Request $request, Task $task)
{ {
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
if ('json' === $request->getContentType()) { if ('json' === $request->getContentType()) {
return $app->json(array_replace([ return $app->json(array_replace([
'id' => $task->getId(), 'id' => $task->getId(),

View File

@@ -48,7 +48,7 @@ class Oauth2 implements ControllerProviderInterface
$params = $oauth2Adapter->getAuthorizationRequestParameters($request); $params = $oauth2Adapter->getAuthorizationRequestParameters($request);
$appAuthorized = false; $appAuthorized = false;
$errorMessage = $request->get('error', ''); $error = $request->get('error', '');
if (null === $client = $app['repo.api-applications']->findByClientId($params['client_id'])) { if (null === $client = $app['repo.api-applications']->findByClientId($params['client_id'])) {
throw new NotFoundHttpException(sprintf('Application with client id %s could not be found', $params['client_id'])); throw new NotFoundHttpException(sprintf('Application with client id %s could not be found', $params['client_id']));
@@ -90,7 +90,7 @@ class Oauth2 implements ControllerProviderInterface
$app['authentication']->openAccount($app['repo.users']->find($usrId)); $app['authentication']->openAccount($app['repo.users']->find($usrId));
} else { } else {
$r = new Response($app['twig']->render($template, array('error' => $error, "auth" => $oauth2_adapter))); $r = new Response($app['twig']->render($template, array('error' => $error, "auth" => $oauth2Adapter)));
$r->headers->set('Content-Type', 'text/html'); $r->headers->set('Content-Type', 'text/html');
return $r; return $r;
@@ -114,7 +114,7 @@ class Oauth2 implements ControllerProviderInterface
if (!$appAuthorized && $actionAccept === null) { if (!$appAuthorized && $actionAccept === null) {
$params = [ $params = [
"auth" => $oauth2Adapter, "auth" => $oauth2Adapter,
"errorMessage" => $errorMessage, "error" => $error,
]; ];
$r = new Response($app['twig']->render($template, $params)); $r = new Response($app['twig']->render($template, $params));

View File

@@ -47,6 +47,10 @@ class Result
const FORMAT_YAML = 'yaml'; const FORMAT_YAML = 'yaml';
const FORMAT_JSONP = 'jsonp'; const FORMAT_JSONP = 'jsonp';
const FORMAT_JSON_EXTENDED = 'json+extended';
const FORMAT_YAML_EXTENDED = 'yaml+extended';
const FORMAT_JSONP_EXTENDED = 'jsonp+extended';
const ERROR_BAD_REQUEST = 'Bad Request'; const ERROR_BAD_REQUEST = 'Bad Request';
const ERROR_UNAUTHORIZED = 'Unauthorized'; const ERROR_UNAUTHORIZED = 'Unauthorized';
const ERROR_FORBIDDEN = 'Forbidden'; const ERROR_FORBIDDEN = 'Forbidden';
@@ -54,6 +58,7 @@ class Result
const ERROR_MAINTENANCE = 'Service Temporarily Unavailable'; const ERROR_MAINTENANCE = 'Service Temporarily Unavailable';
const ERROR_METHODNOTALLOWED = 'Method Not Allowed'; const ERROR_METHODNOTALLOWED = 'Method Not Allowed';
const ERROR_INTERNALSERVERERROR = 'Internal Server Error'; const ERROR_INTERNALSERVERERROR = 'Internal Server Error';
const ERROR_UNACCEPTABLE = 'Unacceptable';
public function __construct(Request $request, array $data = null, $code = 200, $errorType = null, $errorMessage = null, $errorDetails = null) public function __construct(Request $request, array $data = null, $code = 200, $errorType = null, $errorMessage = null, $errorDetails = null)
{ {

View File

@@ -51,6 +51,12 @@ class V1 implements ControllerProviderInterface
const OBJECT_TYPE_STORY = 'http://api.phraseanet.com/api/objects/story'; const OBJECT_TYPE_STORY = 'http://api.phraseanet.com/api/objects/story';
const OBJECT_TYPE_STORY_METADATA_BAG = 'http://api.phraseanet.com/api/objects/story-metadata-bag'; const OBJECT_TYPE_STORY_METADATA_BAG = 'http://api.phraseanet.com/api/objects/story-metadata-bag';
public static $extendedContentTypes = array(
'json' => array('application/vnd.phraseanet.record-extended+json'),
'yaml' => array('application/vnd.phraseanet.record-extended+yaml'),
'jsonp' => array('application/vnd.phraseanet.record-extended+jsonp'),
);
public function connect(SilexApplication $app) public function connect(SilexApplication $app)
{ {
$app['controller.api.v1'] = $this; $app['controller.api.v1'] = $this;

View File

@@ -179,19 +179,23 @@ class BasketController implements ControllerProviderInterface
public function removeBasketElement(Application $app, Request $request, BasketEntity $basket, $basket_element_id) public function removeBasketElement(Application $app, Request $request, BasketEntity $basket, $basket_element_id)
{ {
$basketElement = $app['EM']->getRepository('Phraseanet:BasketElement')->find($basket_element_id);
$ord = $basketElement->getOrd();
foreach ($basket->getElements() as $basket_element) { foreach ($basket->getElements() as $basket_element) {
/* @var $basket_element BasketElement */ if ($basket_element->getOrd() > $ord) {
$basket_element->setOrd($basket_element->getOrd() - 1);
}
if ($basket_element->getId() === (int) $basket_element_id) { if ($basket_element->getId() === (int) $basket_element_id) {
$basket->removeElement($basket_element);
$app['EM']->remove($basket_element); $app['EM']->remove($basket_element);
} }
} }
$app['EM']->persist($basket);
$app['EM']->flush(); $app['EM']->flush();
$data = [ $data = ['success' => true, 'message' => $app->trans('Record removed from basket')];
'success' => true
, 'message' => $app->trans('Record removed from basket')
];
if ($request->getRequestFormat() === 'json') { if ($request->getRequestFormat() === 'json') {
return $app->json($data); return $app->json($data);
@@ -350,8 +354,7 @@ class BasketController implements ControllerProviderInterface
foreach ($request->request->get('elements') as $bask_element_id) { foreach ($request->request->get('elements') as $bask_element_id) {
try { try {
$basket_element = $app['repo.basket-elements'] $basket_element = $app['repo.basket-elements']->findUserElement($bask_element_id, $app['authentication']->getUser());
->findUserElement($bask_element_id, $app['authentication']->getUser());
} catch (\Exception $e) { } catch (\Exception $e) {
continue; continue;
} }
@@ -364,10 +367,7 @@ class BasketController implements ControllerProviderInterface
$app['EM']->flush(); $app['EM']->flush();
$data = [ $data = ['success' => true, 'message' => $app->trans('%quantity% records moved', ['%quantity%' => $n])];
'success' => true
, 'message' => $app->trans('%quantity% records moved', ['%quantity%' => $n])
];
if ($request->getRequestFormat() === 'json') { if ($request->getRequestFormat() === 'json') {
return $app->json($data); return $app->json($data);

View File

@@ -90,7 +90,7 @@ class Session implements ControllerProviderInterface
'notifications' => $app['events-manager']->get_notifications() 'notifications' => $app['events-manager']->get_notifications()
]); ]);
$baskets = $app['EM']->getRepository('\Entities\Basket')->findUnreadActiveByUser($app['authentication']->getUser()); $baskets = $app['EM']->getRepository('Phraseanet:Basket')->findUnreadActiveByUser($app['authentication']->getUser());
foreach ($baskets as $basket) { foreach ($baskets as $basket) {
$ret['changed'][] = $basket->getId(); $ret['changed'][] = $basket->getId();

View File

@@ -112,6 +112,7 @@ class RegistryManipulator
'social-tools' => 'none', 'social-tools' => 'none',
'enable-push-authentication' => false, 'enable-push-authentication' => false,
'force-push-authentication' => false, 'force-push-authentication' => false,
'enable-feed-notification' => true
], ],
'ftp' => [ 'ftp' => [
'ftp-enabled' => false, 'ftp-enabled' => false,

View File

@@ -51,6 +51,12 @@ class ActionsFormType extends AbstractType
'label' => 'Enable Forcing authentication to see push content', 'label' => 'Enable Forcing authentication to see push content',
'help_message' => 'Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.', 'help_message' => 'Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.',
]); ]);
$builder->add('force-push-authentication', 'checkbox', [
'label' => 'Disallow the possibility for the end user to disable push authentication',
]);
$builder->add('enable-feed-notification', 'checkbox', [
'label' => 'Enable possibility to notify users when publishing a new feed entry',
]);
} }
public function getName() public function getName()

View File

@@ -307,21 +307,9 @@ class ElasticSearchEngine implements SearchEngineInterface
*/ */
public function excerpt($query, $fields, \record_adapter $record, SearchEngineOptions $options = null) public function excerpt($query, $fields, \record_adapter $record, SearchEngineOptions $options = null)
{ {
$query = 'all' !== strtolower($query) ? $query : ''; //@todo implements
$params = $this->createQueryParams($query, $options ?: new SearchEngineOptions(), $record);
$res = $this->doExecute('search', $params); return array();
$ret = [];
foreach ($fields as $name => $field) {
if (isset($res['hits']['hits'][0]['highlight']['caption.'.$name])) {
$ret[] = $res['hits']['hits'][0]['highlight']['caption.'.$name][0];
} else {
$ret[] = $field['value'];
}
}
return $ret;
} }
/** /**

View File

@@ -27,6 +27,16 @@ class patch_386alpha1a implements patchInterface
return $this->release; return $this->release;
} }
/**
* Returns doctrine migrations needed for the patch.
*
* @return array
*/
public function getDoctrineMigrations()
{
return array();
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@@ -778,7 +778,7 @@ class set_export extends set_abstract
$log["shortXml"] = $app['serializer.caption']->serialize($record_object->get_caption(), CaptionSerializer::SERIALIZE_XML); $log["shortXml"] = $app['serializer.caption']->serialize($record_object->get_caption(), CaptionSerializer::SERIALIZE_XML);
$tmplog[$record_object->get_base_id()][] = $log; $tmplog[$record_object->get_base_id()][] = $log;
if (!$anonymous && $o == 'document' && null !== $app['authentication']->getUser()) { if (!$anonymous && $o == 'document' && null !== $app['authentication']->getUser()) {
$ $app['acl']->get($app['authentication']->getUser())->remove_remaining($record_object->get_base_id()); $app['acl']->get($app['authentication']->getUser())->remove_remaining($record_object->get_base_id());
} }
} }

View File

@@ -2,16 +2,17 @@
"name": "phraseanet", "name": "phraseanet",
"version": "3.9.0", "version": "3.9.0",
"devDependencies": { "devDependencies": {
"bower": "latest", "bower": "~1.3",
"mocha-phantomjs": ">=2.0 <3.0", "mocha-phantomjs": ">=2.0 <3.0",
"recess": ">=1.1.0 <1.1.7", "recess": ">=1.1.0 <1.1.7",
"tmp": "0.0.23",
"uglify-js": "latest", "uglify-js": "latest",
"jake": "latest", "jake": "latest",
"grunt-cli": "latest", "grunt-cli": "latest",
"grunt": "~0.4.1", "grunt": "~0.4.1",
"grunt-shell": "~0.6", "grunt-shell": "~0.6",
"grunt-contrib": "~0.4.0", "grunt-contrib": "~0.4.0",
"grunt-bower-task": "~0.3.0", "grunt-bower-task": "~0.4.0",
"grunt-bower-postinst": "~0.2.0", "grunt-bower-postinst": "~0.2.0",
"grunt-mocha-phantomjs": "~0.3.0" "grunt-mocha-phantomjs": "~0.3.0"
} }

View File

@@ -1,109 +1,98 @@
<div id="admin_setup_registry"> <div class="page-header">
<div class="page-header"> <h1>{{ 'Setup' | trans }}</h1>
<h1>{{ 'Setup' | trans }}</h1> </div>
<form class="form-horizontal" id="GV_form_head">
<div class="control-group">
<label class="control-label">Adresse : </label>
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['conf'].get('servername') }}" />
</div>
</div> </div>
<div class="control-group">
<form class="form-horizontal" id="GV_form_head"> <label class="control-label">Installation : </label>
<div class="control-group"> <div class="controls">
<label class="control-label">Adresse : </label> <input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['root.path'] }}" />
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['conf'].get('servername') }}" />
</div>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">Installation : </label> <div class="control-group">
<div class="controls"> <label class="control-label">Maintenance : </label>
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['root.path'] }}" /> <div class="controls">
</div> <input type="checkbox" readonly="readonly" disabled="disabled"/>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">Maintenance : </label> <div class="control-group">
<div class="controls"> <label class="control-label">Debug : </label>
<input type="checkbox" readonly="readonly" disabled="disabled"/> <div class="controls">
</div> <input type="checkbox" readonly="readonly" disabled="disabled" {{ app['debug'] ? "checked='checked'" : '' }} />
</div> </div>
<div class="control-group"> </div>
<label class="control-label">Debug : </label> </form>
<div class="controls">
<input type="checkbox" readonly="readonly" disabled="disabled" {{ app['debug'] ? "checked='checked'" : '' }} />
</div>
</div>
</form>
<form id="GV_form" class="form-horizontal" method="post" action = "{{ path('setup_submit_globals') }}">
{% for section in GV %}
<fieldset>
<legend> {{ section['section'] }} </legend>
{% for value in section['vars'] %}
{% set readonly = false %}
{% if value['readonly'] is defined and value['readonly'] == true %}
{% set readonly = true %}
{% endif %}
{{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
{% for daform in form %} {{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
<fieldset> {% for daform in form %}
<legend>{{ daform.vars['label'] }}</legend> <fieldset>
{% for formdata in daform %} <legend>{{ daform.vars['label'] }}</legend>
{% for formdata in daform %}
<div class="control-group"> <div class="control-group">
{{ form_label(formdata, null, { 'label_attr': {'class' : 'control-label'} } ) }} {{ form_label(formdata, null, { 'label_attr': {'class' : 'control-label'} } ) }}
<div class="controls"> <div class="controls">
{{ form_widget(formdata, {'attr': {'class': 'input-xxlarge'}}) }} {{ form_widget(formdata, {'attr': {'class': 'input-xxlarge'}}) }}
</div> </div>
<div class="help-message text-info">{{ formdata.vars['help_message'] | raw }}</div> <div>{{ formdata.vars['help_message'] }}</div>
{{ form_rest(formdata) }} {{ form_rest(formdata) }}
</div> </div>
{% endfor %} {% endfor %}
{{ form_rest(daform) }} {{ form_rest(daform) }}
</fieldset> </fieldset>
{% endfor %} {% endfor %}
<div class="well well-large"> <div class="well well-large">
<div style="max-width: 400px;margin: 0 auto 10px;"> <div style="max-width: 400px;margin: 0 auto 10px;">
<input type="submit" class="btn btn-warning btn-block btn-large" value="{{ 'boutton::valider' | trans }}"/> <input type="submit" class="btn btn-warning btn-block btn-large" value="{{ 'boutton::valider' | trans }}"/>
</div>
</div> </div>
{{ form_end(form) }}
</div> </div>
{{ form_end(form) }}
<script type='text/javascript'> <script type='text/javascript'>
{% autoescape false %} {% autoescape false %}
$(document).ready(function() { $(document).ready(function() {
// use html5 fallback validation if browser do not support required attribute // use html5 fallback validation if browser do not support required attribute
var form = $("#GV_form"); var form = $("#GV_form");
var inputs = form.find("input, select, textarea"); var inputs = form.find("input, select, textarea");
// if required not supported, emulate it // if required not supported, emulate it
if (!Modernizr.input.required) { if (!Modernizr.input.required) {
form.bind("submit", function (event) { form.bind("submit", function (event) {
var required = []; var required = [];
// loop through input elements looking for required // loop through input elements looking for required
$.each(inputs, function(k, input){ $.each(inputs, function(k, input){
var input = $(input); var input = $(input);
if (typeof input.attr('required') !== "undefined") { if (typeof input.attr('required') !== "undefined") {
// if the value is empty, add to required array // if the value is empty, add to required array
if (input.val().replace(/^\s+|\s+$/g, '') === '') { if (input.val().replace(/^\s+|\s+$/g, '') === '') {
required.push(input.attr('name')); required.push(input.attr('name'));
}
} }
});
// show popover if required array contains any elements
if (required.length > 0) {
$.each(required, function(k, name) {
var $this = $("input[name="+name+"], select[name="+name+"], textarea[name="+name+"]");
$this.popover({ title: language.attention, content: language.requiredValue, placement:"bottom" })
.blur(function () {
$this.popover('hide');
});
$this.popover("show");
});
// prevent the form from being submitted
event.stopImmediatePropagation();
return false;
} }
}); });
}
}); // show popover if required array contains any elements
if (required.length > 0) {
$.each(required, function(k, name) {
var $this = $("input[name="+name+"], select[name="+name+"], textarea[name="+name+"]");
$this.popover({ title: language.attention, content: language.requiredValue, placement:"bottom" })
.blur(function () {
$this.popover('hide');
});
$this.popover("show");
});
// prevent the form from being submitted
event.stopImmediatePropagation();
return false;
}
});
}
});
{% endautoescape %} {% endautoescape %}
</script> </script>

View File

@@ -35,6 +35,7 @@
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% if app['phraseanet.configuration']['main']['task-manager']['enabled'] %}
<li> <li>
<a method="POST" href="{{ path('admin_tasks_scheduler_start') }}"> <a method="POST" href="{{ path('admin_tasks_scheduler_start') }}">
{{ 'Start' | trans }} {{ 'Start' | trans }}
@@ -45,6 +46,7 @@
{{ 'Stop' | trans }} {{ 'Stop' | trans }}
</a> </a>
</li> </li>
{% endif %}
<li> <li>
<a href="{{ path('admin_tasks_scheduler_log') }}"> <a href="{{ path('admin_tasks_scheduler_log') }}">
{{ 'Logs' | trans }} {{ 'Logs' | trans }}
@@ -70,6 +72,7 @@
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% if app['phraseanet.configuration']['main']['task-manager']['enabled'] %}
<li> <li>
<a href="{{ path('admin_tasks_task_show', {"task" : task["id"] }) }}"> <a href="{{ path('admin_tasks_task_show', {"task" : task["id"] }) }}">
{{ 'Edit' | trans }} {{ 'Edit' | trans }}
@@ -90,6 +93,7 @@
{{ 'Delete' | trans }} {{ 'Delete' | trans }}
</a> </a>
</li> </li>
{% endif %}
<li> <li>
<a href="{{ path('admin_tasks_task_log', {"task" : task["id"] }) }}"> <a href="{{ path('admin_tasks_task_log', {"task" : task["id"] }) }}">
{{ 'Logs' | trans }} {{ 'Logs' | trans }}

View File

@@ -27,7 +27,6 @@
<td style="text-align:right;white-space:nowrap;width:150px;"> <td style="text-align:right;white-space:nowrap;width:150px;">
<button class="deleter btn btn-inverse" data-list-id="{{ list.getId() }}"> <button class="deleter btn btn-inverse" data-list-id="{{ list.getId() }}">
{{ 'Delete' | trans }} {{ 'Delete' | trans }}
<input type="hidden" name="list_id" value="{{ list.getId() }}"/>
</button> </button>
</td> </td>
{% endif %} {% endif %}

View File

@@ -43,7 +43,7 @@
{% set desc = publishing.basket().getDescription() %} {% set desc = publishing.basket().getDescription() %}
{% endif %} {% endif %}
<br /> <br />
{% if app["phraseanet.registry"].get("GV_enable_feed_notification") %} {% if app['conf'].get(['registry', 'actions', 'enable-feed-notification']) %}
<label class="checkbox"> <label class="checkbox">
<input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" style="min-height: 0; height: auto" /> <input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" style="min-height: 0; height: auto" />
<i class="icon icon-envelope"></i>&nbsp;{{ 'Notify users about this publication' | trans }} <i class="icon icon-envelope"></i>&nbsp;{{ 'Notify users about this publication' | trans }}

View File

@@ -3,6 +3,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod; namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Border\Checker\Sha256;
use Alchemy\Phrasea\Border\Manager; use Alchemy\Phrasea\Border\Manager;
use DataURI; use DataURI;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
@@ -93,7 +94,8 @@ class UploadTest extends \PhraseanetAuthenticatedWebTestCase
$record = new \record_adapter(self::$DI['app'], $id[0], $id[1]); $record = new \record_adapter(self::$DI['app'], $id[0], $id[1]);
$this->assertTrue($record->get_thumbnail()->is_physically_present()); $this->assertTrue($record->get_thumbnail()->is_physically_present());
$field = array_pop($record->get_caption()->get_fields(['FileName'])); $fields = $record->get_caption()->get_fields(['FileName']);
$field = array_pop($fields);
$this->assertEquals($field->get_serialized_values(), 'KIKOO.JPG'); $this->assertEquals($field->get_serialized_values(), 'KIKOO.JPG');
} }
} }
@@ -157,6 +159,7 @@ class UploadTest extends \PhraseanetAuthenticatedWebTestCase
) )
] ]
]; ];
self::$DI['app']['border-manager']->registerChecker(new Sha256(self::$DI['app']));
self::$DI['client']->request('POST', '/prod/upload/', $params, $files, ['HTTP_Accept' => 'application/json']); self::$DI['client']->request('POST', '/prod/upload/', $params, $files, ['HTTP_Accept' => 'application/json']);
$response = self::$DI['client']->getResponse(); $response = self::$DI['client']->getResponse();

View File

@@ -240,9 +240,14 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase
$email = $this->generateEmail(); $email = $this->generateEmail();
$user = self::$DI['app']['manipulator.user']->createUser(uniqid('test_'), uniqid('test_'), $email); $user = self::$DI['app']['manipulator.user']->createUser(uniqid('test_'), uniqid('test_'), $email);
$token = self::$DI['app']['manipulator.token']->createResetEmailToken($user, $email); $token = self::$DI['app']['manipulator.token']->createResetEmailToken($user, $email);
$user->setMailLocked(true); $user->setMailLocked(true);
$revokeBases = array();
foreach (self::$DI['app']['phraseanet.appbox']->get_databoxes() as $databox) {
foreach ($databox->get_collections() as $collection) {
$revokeBases[] = $collection->get_base_id();
}
}
self::$DI['app']['acl']->get($user)->revoke_access_from_bases($revokeBases);
$this->deleteRequest(); $this->deleteRequest();
self::$DI['client']->request('GET', '/login/register-confirm/', ['code' => $token->getValue()]); self::$DI['client']->request('GET', '/login/register-confirm/', ['code' => $token->getValue()]);

View File

@@ -30,6 +30,8 @@ main:
options: [] options: []
task-manager: task-manager:
status: started status: started
enabled: started
enabled: true
logger: logger:
max-files: 10 max-files: 10
enabled: true enabled: true

View File

@@ -40,6 +40,7 @@ main:
options: [] options: []
task-manager: task-manager:
status: started status: started
enabled: true
logger: logger:
max-files: 10 max-files: 10
enabled: true enabled: true

View File

@@ -30,6 +30,7 @@ main:
options: [] options: []
task-manager: task-manager:
status: started status: started
enabled: true
logger: logger:
max-files: 10 max-files: 10
enabled: true enabled: true

View File

@@ -41,7 +41,7 @@ class SessionHandlerServiceProviderTest extends \PhraseanetTestCase
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$memcached = $this->getMockBuilder('Memcached') @$memcached = $this->getMockBuilder('Memcached')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();