Merge branch '3.8'

Conflicts:
	.gitignore
	.travis.yml
	Vagrantfile
	lib/Alchemy/Phrasea/Controller/Datafiles.php
	lib/Alchemy/Phrasea/Controller/Setup.php
	lib/Alchemy/Phrasea/Helper/DatabaseHelper.php
	lib/classes/connection/pdo.php
	lib/classes/task/period/subdef.php
	lib/classes/task/period/writemeta.php
	locale/de_DE/LC_MESSAGES/phraseanet.mo
	locale/de_DE/LC_MESSAGES/phraseanet.po
	locale/en_GB/LC_MESSAGES/phraseanet.mo
	locale/en_GB/LC_MESSAGES/phraseanet.po
	locale/fr_FR/LC_MESSAGES/phraseanet.mo
	locale/fr_FR/LC_MESSAGES/phraseanet.po
	locale/nl_NL/LC_MESSAGES/phraseanet.mo
	locale/nl_NL/LC_MESSAGES/phraseanet.po
	locale/phraseanet.pot
	templates/web/setup/step2.html.twig
	vagrant/vms/phraseanet-php54-nginx/puphpet/config.yaml
	vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
	vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/setup
	vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.txt
	vagrant/vms/phraseanet-php54-nginx/puphpet/shell/self-promotion.txt
This commit is contained in:
Nicolas Le Goff
2014-09-09 15:05:13 +02:00
18 changed files with 318 additions and 103 deletions

1
.gitignore vendored
View File

@@ -59,4 +59,3 @@ behat.yml
# Exclude crossdomain.xml file it's generated # Exclude crossdomain.xml file it's generated
/www/crossdomain.xml /www/crossdomain.xml

2
Vagrantfile vendored
View File

@@ -7,7 +7,7 @@ end
root = File.dirname(File.expand_path(__FILE__)) root = File.dirname(File.expand_path(__FILE__))
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
Dir.glob(root+"/resources/vagrant/vms/**/puphpet/config.yaml").each do|f| Dir.glob(root+"/vagrant/vms/**/puphpet/config.yaml").each do|f|
dir = File.dirname(File.expand_path(f+"/..")) dir = File.dirname(File.expand_path(f+"/.."))
base_path = dir base_path = dir
configValues = YAML.load_file(f) configValues = YAML.load_file(f)

View File

@@ -12,7 +12,6 @@
namespace KonsoleKommander; namespace KonsoleKommander;
use Alchemy\Phrasea\Command\Plugin\ListPlugin; use Alchemy\Phrasea\Command\Plugin\ListPlugin;
use Alchemy\Phrasea\Command\Setup\CrossDomainGenerator;
use Alchemy\Phrasea\Command\Setup\H264ConfigurationDumper; use Alchemy\Phrasea\Command\Setup\H264ConfigurationDumper;
use Alchemy\Phrasea\Command\Setup\H264MappingGenerator; use Alchemy\Phrasea\Command\Setup\H264MappingGenerator;
use Alchemy\Phrasea\Command\SearchEngine\IndexFull; use Alchemy\Phrasea\Command\SearchEngine\IndexFull;
@@ -115,7 +114,6 @@ $cli->command(new H264ConfigurationDumper());
$cli->command(new H264MappingGenerator()); $cli->command(new H264MappingGenerator());
$cli->command(new XSendFileConfigurationDumper()); $cli->command(new XSendFileConfigurationDumper());
$cli->command(new XSendFileMappingGenerator()); $cli->command(new XSendFileMappingGenerator());
$cli->command(new CrossDomainGenerator());
if ($cli['phraseanet.SE']->getName() === 'ElasticSearch') { if ($cli['phraseanet.SE']->getName() === 'ElasticSearch') {
$cli->command(new IndexFull('searchengine:index')); $cli->command(new IndexFull('searchengine:index'));

View File

@@ -14,6 +14,7 @@ namespace KonsoleKommander;
use Alchemy\Phrasea\Core\Version; use Alchemy\Phrasea\Core\Version;
use Alchemy\Phrasea\Command\UpgradeDBDatas; use Alchemy\Phrasea\Command\UpgradeDBDatas;
use Alchemy\Phrasea\Command\Setup\Install; use Alchemy\Phrasea\Command\Setup\Install;
use Alchemy\Phrasea\Command\Setup\CrossDomainGenerator;
use Alchemy\Phrasea\Command\Setup\PluginsReset; use Alchemy\Phrasea\Command\Setup\PluginsReset;
use Alchemy\Phrasea\Command\Plugin\ListPlugin; use Alchemy\Phrasea\Command\Plugin\ListPlugin;
use Alchemy\Phrasea\Command\Plugin\AddPlugin; use Alchemy\Phrasea\Command\Plugin\AddPlugin;
@@ -71,5 +72,6 @@ $app->command(new EnablePlugin());
$app->command(new DisablePlugin()); $app->command(new DisablePlugin());
$app->command(new CheckEnvironment('check:system')); $app->command(new CheckEnvironment('check:system'));
$app->command(new Install('system:install')); $app->command(new Install('system:install'));
$app->command(new CrossDomainGenerator());
exit(is_int($app->run()) ? : 1); exit(is_int($app->run()) ? : 1);

View File

@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Utilities\CrossDomainDumper; use Alchemy\Phrasea\Utilities\CrossDomainDumper;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Yaml\Yaml;
class CrossDomainGenerator extends Command class CrossDomainGenerator extends Command
{ {
@@ -30,13 +31,16 @@ class CrossDomainGenerator extends Command
*/ */
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if ($this->container['phraseanet.configuration-tester']->isInstalled()) {
$configuration = $this->container['phraseanet.configuration']['crossdomain']; $configuration = $this->container['phraseanet.configuration']['crossdomain'];
} else {
$default = Yaml::parse($this->container['root.path'].'/lib/conf.d/configuration.yml');
$configuration = $default['crossdomain'];
}
$dumper = new CrossDomainDumper(); $dumper = new CrossDomainDumper();
$xml = $dumper->dump($configuration); $xml = $dumper->dump($configuration);
$output->writeln("Generating crossdomain.xml");
$output->writeln($xml);
$this->container['filesystem']->dumpFile($this->container['root.path'].'/www/crossdomain.xml', $xml); $this->container['filesystem']->dumpFile($this->container['root.path'].'/www/crossdomain.xml', $xml);

View File

@@ -139,20 +139,20 @@ class Setup implements ControllerProviderInterface
$abConn = $dbConn = null; $abConn = $dbConn = null;
$hostname = $request->request->get('ab_hostname'); $database_host = $request->request->get('hostname');
$port = $request->request->get('ab_port'); $database_port = $request->request->get('port');
$user_ab = $request->request->get('ab_user'); $database_user = $request->request->get('user');
$ab_password = $request->request->get('ab_password'); $database_password = $request->request->get('password');
$appbox_name = $request->request->get('ab_name'); $appbox_name = $request->request->get('ab_name');
$databox_name = $request->request->get('db_name'); $databox_name = $request->request->get('db_name');
try { try {
$abConn = $app['dbal.provider']->get([ $abConn = $app['dbal.provider']->get([
'host' => $hostname, 'host' => $database_host,
'port' => $port, 'port' => $database_port,
'user' => $user_ab, 'user' => $database_user,
'password' => $ab_password, 'password' => $database_password,
'dbname' => $appbox_name, 'dbname' => $appbox_name,
]); ]);
$abConn->connect(); $abConn->connect();
@@ -165,10 +165,10 @@ class Setup implements ControllerProviderInterface
try { try {
if ($databox_name) { if ($databox_name) {
$dbConn = $app['dbal.provider']->get([ $dbConn = $app['dbal.provider']->get([
'host' => $hostname, 'host' => $database_host,
'port' => $port, 'port' => $database_port,
'user' => $user_ab, 'user' => $database_user,
'password' => $ab_password, 'password' => $database_password,
'dbname' => $databox_name, 'dbname' => $databox_name,
]); ]);
$dbConn->connect(); $dbConn->connect();

View File

@@ -28,7 +28,8 @@ class DatabaseHelper extends Helper
'host' => $hostname, 'host' => $hostname,
'port' => $port, 'port' => $port,
'user' => $user, 'user' => $user,
'password' => $password 'password' => $password,
'dbname' => $dbname
]); ]);
$conn->connect(); $conn->connect();
$connection_ok = true; $connection_ok = true;

View File

@@ -40,6 +40,7 @@ class WriteMetadataEditor extends AbstractEditor
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<tasksettings> <tasksettings>
<cleardoc>0</cleardoc> <cleardoc>0</cleardoc>
<mwg>0</mwg>
</tasksettings> </tasksettings>
EOF; EOF;
} }
@@ -51,6 +52,7 @@ EOF;
{ {
return [ return [
'cleardoc' => static::FORM_TYPE_BOOLEAN, 'cleardoc' => static::FORM_TYPE_BOOLEAN,
'mwg' => static::FORM_TYPE_BOOLEAN,
]; ];
} }
} }

View File

@@ -63,13 +63,13 @@ class SubdefsJob extends AbstractJob
if (!$this->isStarted()) { if (!$this->isStarted()) {
break; break;
} }
$connbas = $databox->get_connection(); $conn = $databox->get_connection();
$sql = 'SELECT coll_id, record_id $sql = 'SELECT coll_id, record_id
FROM record FROM record
WHERE jeton & ' . JETON_MAKE_SUBDEF . ' > 0 WHERE jeton & ' . JETON_MAKE_SUBDEF . ' > 0
ORDER BY record_id DESC LIMIT 0, 30'; ORDER BY record_id DESC LIMIT 0, 30';
$stmt = $connbas->prepare($sql); $stmt = $conn->prepare($sql);
$stmt->execute(); $stmt->execute();
$rs = $stmt->fetchAll(\PDO::FETCH_ASSOC); $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$stmt->closeCursor(); $stmt->closeCursor();
@@ -91,7 +91,7 @@ class SubdefsJob extends AbstractJob
SET jeton=(jeton & ~' . JETON_MAKE_SUBDEF . '), moddate=NOW() SET jeton=(jeton & ~' . JETON_MAKE_SUBDEF . '), moddate=NOW()
WHERE record_id=:record_id'; WHERE record_id=:record_id';
$stmt = $connbas->prepare($sql); $stmt = $conn->prepare($sql);
$stmt->execute([':record_id' => $row['record_id']]); $stmt->execute([':record_id' => $row['record_id']]);
$stmt->closeCursor(); $stmt->closeCursor();
@@ -100,7 +100,7 @@ class SubdefsJob extends AbstractJob
SET status=(status & ~0x03), SET status=(status & ~0x03),
jeton=(jeton | ' . JETON_WRITE_META_SUBDEF . ') jeton=(jeton | ' . JETON_WRITE_META_SUBDEF . ')
WHERE record_id=:record_id'; WHERE record_id=:record_id';
$stmt = $connbas->prepare($sql); $stmt = $conn->prepare($sql);
$stmt->execute([':record_id' => $row['record_id']]); $stmt->execute([':record_id' => $row['record_id']]);
$stmt->closeCursor(); $stmt->closeCursor();

View File

@@ -17,6 +17,9 @@ use PHPExiftool\Driver\Value;
use PHPExiftool\Driver\Tag; use PHPExiftool\Driver\Tag;
use PHPExiftool\Exception\ExceptionInterface as PHPExiftoolException; use PHPExiftool\Exception\ExceptionInterface as PHPExiftoolException;
use PHPExiftool\Writer; use PHPExiftool\Writer;
use PHPExiftool\Driver\TagFactory;
use PHPExiftool\Writer as ExifWriter;
use PHPExiftool\Exception\TagUnknown;
class WriteMetadataJob extends AbstractJob class WriteMetadataJob extends AbstractJob
{ {
@@ -60,69 +63,65 @@ class WriteMetadataJob extends AbstractJob
$app = $data->getApplication(); $app = $data->getApplication();
$settings = simplexml_load_string($data->getTask()->getSettings()); $settings = simplexml_load_string($data->getTask()->getSettings());
$clearDoc = (Boolean) (string) $settings->cleardoc; $clearDoc = (Boolean) (string) $settings->cleardoc;
$MWG = (Boolean) (string) $settings->mwg;
// move this in service provider configuration // move this in service provider configuration
$app['exiftool.writer']->setModule(Writer::MODULE_MWG, true); // $app['exiftool.writer']->setModule(Writer::MODULE_MWG, true);
foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) { foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) {
$connbas = $databox->get_connection(); $conn = $databox->get_connection();
$subdefgroups = $databox->get_subdef_structure(); $metaSubdefs = [];
$metasubdefs = [];
foreach ($subdefgroups as $type => $subdefs) { foreach ($databox->get_subdef_structure() as $type => $definitions) {
foreach ($subdefs as $sub) { foreach ($definitions as $sub) {
$name = $sub->get_name(); $name = $sub->get_name();
if ($sub->meta_writeable()) { if ($sub->meta_writeable()) {
$metasubdefs[$name . '_' . $type] = true; $metaSubdefs[$name . '_' . $type] = true;
} }
} }
} }
$sql = 'SELECT record_id, coll_id, jeton $sql = 'SELECT record_id, coll_id, jeton FROM record WHERE (jeton & ' . JETON_WRITE_META . ' > 0)';
FROM record WHERE (jeton & ' . JETON_WRITE_META . ' > 0)';
$stmt = $connbas->prepare($sql); $stmt = $conn->prepare($sql);
$stmt->execute(); $stmt->execute();
$rs = $stmt->fetchAll(\PDO::FETCH_ASSOC); $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$stmt->closeCursor(); $stmt->closeCursor();
foreach ($rs as $row) { foreach ($rs as $row) {
$record_id = $row['record_id']; $record_id = $row['record_id'];
$jeton = $row['jeton']; $token = $row['jeton'];
$record = $databox->get_record($record_id); $record = $databox->get_record($record_id);
$type = $record->get_type(); $type = $record->get_type();
$subdefs = $record->get_subdefs();
$tsub = []; $subdefs = [];
foreach ($record->get_subdefs() as $name => $subdef) {
foreach ($subdefs as $name => $subdef) { $write_document = (($token & JETON_WRITE_META_DOC) && $name == 'document');
$write_document = (($jeton & JETON_WRITE_META_DOC) && $name == 'document'); $write_subdef = (($token & JETON_WRITE_META_SUBDEF) && isset($metaSubdefs[$name . '_' . $type]));
$write_subdef = (($jeton & JETON_WRITE_META_SUBDEF) && isset($metasubdefs[$name . '_' . $type]));
if (($write_document || $write_subdef) && $subdef->is_physically_present()) { if (($write_document || $write_subdef) && $subdef->is_physically_present()) {
$tsub[$name] = $subdef->get_pathfile(); $subdefs[$name] = $subdef->get_pathfile();
} }
} }
$metadatas = new Metadata\MetadataBag(); $metadata = new Metadata\MetadataBag();
if ($record->get_uuid()) { if ($record->get_uuid()) {
$metadatas->add( $metadata->add(
new Metadata\Metadata( new Metadata\Metadata(
new Tag\XMPExif\ImageUniqueID(), new Tag\XMPExif\ImageUniqueID(),
new Value\Mono($record->get_uuid()) new Value\Mono($record->get_uuid())
) )
); );
$metadatas->add( $metadata->add(
new Metadata\Metadata( new Metadata\Metadata(
new Tag\ExifIFD\ImageUniqueID(), new Tag\ExifIFD\ImageUniqueID(),
new Value\Mono($record->get_uuid()) new Value\Mono($record->get_uuid())
) )
); );
$metadatas->add( $metadata->add(
new Metadata\Metadata( new Metadata\Metadata(
new Tag\IPTC\UniqueDocumentID(), new Tag\IPTC\UniqueDocumentID(),
new Value\Mono($record->get_uuid()) new Value\Mono($record->get_uuid())
@@ -130,44 +129,76 @@ class WriteMetadataJob extends AbstractJob
); );
} }
foreach ($record->get_caption()->get_fields() as $field) { $caption = $record->get_caption();
$meta = $field->get_databox_field(); foreach($databox->get_meta_structure() as $fieldStructure) {
/* @var $meta \databox_field */
$datas = $field->get_values(); $tagName = $fieldStructure->get_tag()->getTagname();
$fieldName = $fieldStructure->get_name();
if ($meta->is_multi()) { // skip fields with no src
$values = []; if($tagName == '') {
foreach ($datas as $data) { continue;
$values[] = $data->getValue(); }
// check exiftool known tags to skip Phraseanet:tf-*
try {
TagFactory::getFromRDFTagname($tagName);
} catch (TagUnknown $e) {
continue;
}
try {
$field = $caption->get_field($fieldName);
$data = $field->get_values();
if ($fieldStructure->is_multi()) {
$values = array();
foreach ($data as $value) {
$values[] = $value->getValue();
} }
$value = new Value\Multi($values); $value = new Value\Multi($values);
} else { } else {
$data = array_pop($datas); $data = array_pop($data);
$value = new Value\Mono($data->getValue()); $value = $data->getValue();
$value = new Value\Mono($value);
}
} catch(\Exception $e) {
// the field is not set in the record, erase it
if ($fieldStructure->is_multi()) {
$value = new Value\Multi(Array(''));
}
else {
$value = new Value\Mono('');
}
} }
$metadatas->add( $metadata->add(
new Metadata\Metadata($meta->get_tag(), $value) new Metadata\Metadata($fieldStructure->get_tag(), $value)
); );
} }
foreach ($tsub as $name => $file) { $app['exiftool.writer']->reset();
if($MWG) {
$app['exiftool.writer']->setModule(ExifWriter::MODULE_MWG, true);
}
foreach ($subdefs as $name => $file) {
$app['exiftool.writer']->erase($name != 'document' || $clearDoc, true); $app['exiftool.writer']->erase($name != 'document' || $clearDoc, true);
try { try {
$app['exiftool.writer']->write($file, $metadatas); $app['exiftool.writer']->write($file, $metadata);
$this->log('debug', sprintf('meta written for sbasid=%1$d - recordid=%2$d (%3$s)', $databox->get_sbas_id(), $record_id, $name));
$this->log(sprintf('meta written for sbasid=%1$d - recordid=%2$d (%3$s)', $databox->get_sbas_id(), $record_id, $name), self::LOG_INFO);
} catch (PHPExiftoolException $e) { } catch (PHPExiftoolException $e) {
$this->log('error', sprintf('meta was not written for sbasid=%d - recordid=%d (%s) because "%s"', $databox->get_sbas_id(), $record_id, $name, $e->getMessage())); $this->log(sprintf('meta NOT written for sbasid=%1$d - recordid=%2$d (%3$s) because "%s"', $databox->get_sbas_id(), $record_id, $name, $e->getMessage()), self::LOG_ERROR);
} }
} }
$sql = 'UPDATE record SET jeton=jeton & ~' . JETON_WRITE_META . ' $sql = 'UPDATE record SET jeton=jeton & ~' . JETON_WRITE_META . ' WHERE record_id = :record_id';
WHERE record_id = :record_id'; $stmt = $conn->prepare($sql);
$stmt = $connbas->prepare($sql); $stmt->execute([':record_id' => $record_id]);
$stmt->execute([':record_id' => $row['record_id']]);
$stmt->closeCursor(); $stmt->closeCursor();
} }
} }

View File

@@ -439,19 +439,14 @@ class databox extends base
$ret['thesaurus_indexed'] += $row['n']; $ret['thesaurus_indexed'] += $row['n'];
} }
$sql = "SELECT type, jeton, COUNT(record_id) AS n FROM record WHERE jeton & ".JETON_MAKE_SUBDEF." GROUP BY type, jeton"; $sql = "SELECT type, COUNT(record_id) AS n FROM record WHERE jeton & ".JETON_MAKE_SUBDEF." GROUP BY type";
$stmt = $this->get_connection()->prepare($sql); $stmt = $this->get_connection()->prepare($sql);
$stmt->execute(); $stmt->execute();
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC); $rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor(); $stmt->closeCursor();
foreach ($rs as $row) { foreach ($rs as $row) {
if(!array_key_exists($row['type'], $ret['jeton_subdef'])) { $ret['jeton_subdef'][$row['type']] = (int)$row['n'];
$ret['jeton_subdef'][$row['type']] = 0;
}
if((int)$row['jeton'] & JETON_MAKE_SUBDEF) {
$ret['jeton_subdef'][$row['type']] += (int)$row['n'];
}
} }
return $ret; return $ret;

View File

@@ -55,7 +55,7 @@ class nginx::params {
$nx_client_body_temp_path = "${nx_run_dir}/client_body_temp" $nx_client_body_temp_path = "${nx_run_dir}/client_body_temp"
$nx_client_body_buffer_size = '128k' $nx_client_body_buffer_size = '128k'
$nx_client_max_body_size = '10m' $nx_client_max_body_size = '1000m'
$nx_proxy_temp_path = "${nx_run_dir}/proxy_temp" $nx_proxy_temp_path = "${nx_run_dir}/proxy_temp"
$nx_proxy_connect_timeout = '90' $nx_proxy_connect_timeout = '90'
$nx_proxy_send_timeout = '90' $nx_proxy_send_timeout = '90'

View File

@@ -287,6 +287,9 @@
{ {
t += (t==""?"":" ; ") + i + ": " + data.jeton_subdef[i]; t += (t==""?"":" ; ") + i + ": " + data.jeton_subdef[i];
} }
if(t == "") {
t = "0";
}
$("#subdefs_todo").text(t); $("#subdefs_todo").text(t);
} }

View File

@@ -9,6 +9,14 @@
</label> </label>
</div> </div>
</div> </div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input class="formElem" type="checkbox" name="mwg">
{{ 'task::writemeta:Compatibilité MWG' | trans }}
</label>
</div>
</div>
{% endblock %} {% endblock %}
@@ -22,6 +30,7 @@
with(document.forms['graphicForm']) with(document.forms['graphicForm'])
{ {
cleardoc.checked = Number(xml.find("cleardoc").text()) > 0; cleardoc.checked = Number(xml.find("cleardoc").text()) > 0;
mwg.checked = Number(xml.find("mwg").text()) > 0;
} }
} }
} }

View File

@@ -59,15 +59,15 @@
password : {password:"#create_admin input[name=email]"}, password : {password:"#create_admin input[name=email]"},
password_confirm : {equalTo:"#create_admin input[name=password]"}, password_confirm : {equalTo:"#create_admin input[name=password]"},
ab_hostname : {required:true}, hostname : {required:true},
ab_user : {required:true}, user : {required:true},
ab_name : {required:true} ab_name : {required:true}
}, },
messages: { messages: {
email:{ email:{
email : language.validateEmail email : language.validateEmail
}, },
ab_hostname : { hostname : {
required : language.requiredField required : language.requiredField
}, },
password : { password : {
@@ -149,10 +149,10 @@
function test_connection_appbox(callback) function test_connection_appbox(callback)
{ {
var scope = $('.appbox_settings'); var scope = $('.appbox_settings');
var hostname_input = $('input[name="ab_hostname"]:visible', scope); var hostname_input = $('input[name="hostname"]:visible', scope);
var port_input = $('input[name="ab_port"]:visible', scope); var port_input = $('input[name="port"]:visible', scope);
var user_input = $('input[name="ab_user"]', scope); var user_input = $('input[name="user"]', scope);
var password_input = $('input[name="ab_password"]', scope); var password_input = $('input[name="password"]', scope);
var dbname_input = $('input[name="ab_name"]', scope); var dbname_input = $('input[name="ab_name"]', scope);
var user = user_input.val(); var user = user_input.val();
@@ -187,10 +187,10 @@
var appbox_scope = $('.appbox_settings'); var appbox_scope = $('.appbox_settings');
var databox_scope = $('.databox_settings'); var databox_scope = $('.databox_settings');
var hostname_input = $('input[name="ab_hostname"]', appbox_scope); var hostname_input = $('input[name="hostname"]', appbox_scope);
var port_input = $('input[name="ab_port"]', appbox_scope); var port_input = $('input[name="port"]', appbox_scope);
var user_input = $('input[name="ab_user"]', appbox_scope); var user_input = $('input[name="user"]', appbox_scope);
var password_input = $('input[name="ab_password"]', appbox_scope); var password_input = $('input[name="password"]', appbox_scope);
var dbname_input = $('input[name="db_name"]', databox_scope); var dbname_input = $('input[name="db_name"]', databox_scope);
@@ -549,19 +549,19 @@
</tr> </tr>
<tr class="optional_ab_datas"> <tr class="optional_ab_datas">
<td style="width:200px;"><label>{{ 'phraseanet:: adresse' | trans }}</label></td> <td style="width:200px;"><label>{{ 'phraseanet:: adresse' | trans }}</label></td>
<td><input autocomplete="off" type="text" name="ab_hostname" value="localhost" /></td> <td><input autocomplete="off" type="text" name="hostname" value="localhost" /></td>
</tr> </tr>
<tr> <tr>
<td style="width:200px;"><label>{{ 'Database user' | trans }}</label></td> <td style="width:200px;"><label>{{ 'Database user' | trans }}</label></td>
<td><input type="text" name="ab_user" value="" /></td> <td><input type="text" name="user" value="" /></td>
</tr> </tr>
<tr> <tr>
<td style="width:200px;"><label>{{ 'admin::compte-utilisateur mot de passe' | trans }}</label></td> <td style="width:200px;"><label>{{ 'admin::compte-utilisateur mot de passe' | trans }}</label></td>
<td><input type="password" name="ab_password" value="" autocomplete="off" /></td> <td><input type="password" name="password" value="" autocomplete="off" /></td>
</tr> </tr>
<tr class="optional_ab_datas"> <tr class="optional_ab_datas">
<td style="width:200px;"><label>{{ 'phraseanet:: port' | trans }}</label></td> <td style="width:200px;"><label>{{ 'phraseanet:: port' | trans }}</label></td>
<td><input autocomplete="off" type="text" name="ab_port" value="3306" /></td> <td><input autocomplete="off" type="text" name="port" value="3306" /></td>
</tr> </tr>
<tr> <tr>
<td style="width:200px;"><label>{{ 'Database' | trans }}</label></td> <td style="width:200px;"><label>{{ 'Database' | trans }}</label></td>

View File

@@ -147,10 +147,10 @@ class SetupTest extends \PhraseanetWebTestCase
'binary_convert' => '/path/to/convert', 'binary_convert' => '/path/to/convert',
'binary_php' => '/path/to/php', 'binary_php' => '/path/to/php',
'datapath_noweb' => sys_get_temp_dir() . '/datainstall/noweb', 'datapath_noweb' => sys_get_temp_dir() . '/datainstall/noweb',
'ab_hostname' => $host, 'hostname' => $host,
'ab_port' => $port, 'port' => $port,
'ab_user' => $user, 'user' => $user,
'ab_password' => $password, 'password' => $password,
'ab_name' => $abName, 'ab_name' => $abName,
'db_name' => $dbName, 'db_name' => $dbName,
'db_template' => 'en', 'db_template' => 'en',

View File

@@ -0,0 +1,169 @@
main:
servername: 'http://local.phrasea/'
maintenance: false
languages: []
key: ''
database:
host: 'sql-host'
port: 3306
user: 'sql-user'
password: 'sql-password'
dbname: ab_phraseanet
driver: pdo_mysql
charset: UTF8
database-test:
driver: pdo_sqlite
path: '/tmp/db.sqlite'
charset: UTF8
api-timers: false
cache:
type: ArrayCache
options:
options: []
opcodecache:
type: ArrayCache
options: []
search-engine:
type: Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine
options: []
task-manager:
enabled: true
logger:
max-files: 10
enabled: true
level: INFO
trusted-proxies: []
debugger:
allowed-ips: ['192.168.56.1']
binaries:
ghostscript_binary: null
php_binary: null
swf_extract_binary: null
pdf2swf_binary: null
swf_render_binary: null
unoconv_binary: null
ffmpeg_binary: null
ffprobe_binary: null
mp4box_binary: null
pdftotext_binary: null
recess_binary: null
phraseanet_indexer: null
ffmpeg_timeout: 3600
ffprobe_timeout: 60
gs_timeout: 60
mp4box_timeout: 60
swftools_timeout: 60
unoconv_timeout: 60
border-manager:
enabled: true
extension-mapping: { }
checkers:
-
type: Checker\Sha256
enabled: true
-
type: Checker\UUID
enabled: true
-
type: Checker\Colorspace
enabled: false
options:
colorspaces: [cmyk, grayscale, rgb]
-
type: Checker\Dimension
enabled: false
options:
width: 80
height: 160
-
type: Checker\Extension
enabled: false
options:
extensions: [jpg, jpeg, bmp, tif, gif, png, pdf, doc, odt, mpg, mpeg, mov, avi, xls, flv, mp3, mp2]
-
type: Checker\Filename
enabled: false
options:
sensitive: true
-
type: Checker\MediaType
enabled: false
options:
mediatypes: [Audio, Document, Flash, Image, Video]
authentication:
auto-create:
templates: { }
captcha:
enabled: true
trials-before-display: 9
providers:
facebook:
enabled: false
options:
app-id: ''
secret: ''
twitter:
enabled: false
options:
consumer-key: ''
consumer-secret: ''
google-plus:
enabled: false
options:
client-id: ''
client-secret: ''
github:
enabled: false
options:
client-id: ''
client-secret: ''
viadeo:
enabled: false
options:
client-id: ''
client-secret: ''
linkedin:
enabled: false
options:
client-id: ''
client-secret: ''
registration-fields:
-
name: company
required: true
-
name: lastname
required: true
-
name: firstname
required: true
-
name: geonameid
required: true
xsendfile:
enabled: false
type: nginx
mapping: []
h264-pseudo-streaming:
enabled: false
type: nginx
mapping: []
plugins: []
api_cors:
enabled: false
allow_credentials: false
allow_origin: []
allow_headers: []
allow_methods: []
expose_headers: []
max_age: 0
hosts: []
session:
idle: 0
# 1 week
lifetime: 604800
crossdomain:
allow-access-from:
-
domain: '*.cooliris.com'
secure: 'false'

View File

@@ -0,0 +1,2 @@
!.gitignore
!insecure_private_key