mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix latest merge
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -55,7 +55,7 @@ composer.phar
|
||||
behat.yml
|
||||
|
||||
# Exclude vagrant configuration file
|
||||
.vagrant
|
||||
/.vagrant
|
||||
|
||||
# Exclude crossdomain.xml file it's generated
|
||||
/www/crossdomain.xml
|
||||
|
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@@ -7,7 +7,7 @@ end
|
||||
root = File.dirname(File.expand_path(__FILE__))
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
Dir.glob(root+"/vagrant/vms/**/puphpet/config.yaml").each do|f|
|
||||
Dir.glob(root+"/resources/vagrant/vms/**/puphpet/config.yaml").each do|f|
|
||||
dir = File.dirname(File.expand_path(f+"/.."))
|
||||
base_path = dir
|
||||
configValues = YAML.load_file(f)
|
||||
@@ -26,7 +26,7 @@ Vagrant.configure("2") do |config|
|
||||
end
|
||||
|
||||
if data['vm']['network']['private_network'].to_s != ''
|
||||
node.vm.network "private_network", ip: "#{data['vm']['network']['private_network']}"
|
||||
node.vm.network :private_network, ip: "#{data['vm']['network']['private_network']}"
|
||||
end
|
||||
|
||||
data['vm']['network']['forwarded_port'].each do |i, port|
|
||||
|
@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Plugin\ListPlugin;
|
||||
use Alchemy\Phrasea\Command\Setup\H264ConfigurationDumper;
|
||||
use Alchemy\Phrasea\Command\Setup\H264MappingGenerator;
|
||||
use Alchemy\Phrasea\Command\Setup\StaticConfigurationDumper;
|
||||
use Alchemy\Phrasea\Command\Setup\StaticMappingGenerator;
|
||||
use Alchemy\Phrasea\Command\SearchEngine\IndexFull;
|
||||
use Alchemy\Phrasea\Command\WebsocketServer;
|
||||
use Alchemy\Phrasea\Core\Version;
|
||||
@@ -32,6 +31,7 @@ use Alchemy\Phrasea\Command\Plugin\RemovePlugin;
|
||||
use Alchemy\Phrasea\Command\CheckConfig;
|
||||
use Alchemy\Phrasea\Command\Setup\XSendFileMappingGenerator;
|
||||
use Alchemy\Phrasea\Command\Setup\XSendFileConfigurationDumper;
|
||||
use Alchemy\Phrasea\Command\Setup\StaticMappingGenerator;
|
||||
use Alchemy\Phrasea\Command\Task\SchedulerResumeTasks;
|
||||
use Alchemy\Phrasea\Command\Task\SchedulerState;
|
||||
use Alchemy\Phrasea\Command\Task\SchedulerPauseTasks;
|
||||
@@ -120,12 +120,6 @@ $cli->command(new XSendFileMappingGenerator());
|
||||
$cli->command(new StaticConfigurationDumper());
|
||||
$cli->command(new StaticMappingGenerator());
|
||||
|
||||
if ($cli['phraseanet.SE']->getName() === 'ElasticSearch') {
|
||||
$cli->command(new IndexFull('searchengine:index'));
|
||||
}
|
||||
|
||||
$cli->command(new WebsocketServer('ws-server:run'));
|
||||
|
||||
$cli->loadPlugins();
|
||||
|
||||
exit(is_int($cli->run()) ? : 1);
|
||||
|
657
composer.lock
generated
657
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -939,7 +939,7 @@ class Application extends SilexApplication
|
||||
// if ($app->getEnvironment() !== Application::ENV_PROD) {
|
||||
// return $this['cache.dev.path'];
|
||||
// }
|
||||
$path = $this['root.path'].'/cache';
|
||||
$path = $app['root.path'].'/cache';
|
||||
if ($app['phraseanet.configuration']->isSetup()) {
|
||||
$path = $app['conf']->get(['main', 'storage', 'cache'], $path);
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ class IniReset extends Command
|
||||
}
|
||||
|
||||
// get data paths
|
||||
$dataPath = $this->container['phraseanet.registry']->get('GV_base_datapath_noweb', $this->container['root.path'].'/datas');
|
||||
$dataPath = $this->container['conf']->get(['main', 'storage', 'subdefs'], $this->container['root.path'].'/datas');
|
||||
|
||||
$schema = $this->container['EM']->getConnection()->getSchemaManager();
|
||||
$output->writeln('Creating database "'.$dbs['ab'].'"...<info>OK</info>');
|
||||
@@ -122,12 +122,28 @@ class IniReset extends Command
|
||||
|
||||
// inject v3.1 fixtures
|
||||
if ($input->getOption('run-patches')) {
|
||||
$this->container['filesystem']->copy($this->container['root.path'].'/hudson/connexion.inc', $this->container['root.path'].'/config/connexion.inc');
|
||||
$this->container['filesystem']->copy($this->container['root.path'].'/hudson/_GV.php', $this->container['root.path'].'/config/_GV.php');
|
||||
$content = file_get_contents($this->container['root.path'].'/resources/hudson/connexion.inc');
|
||||
|
||||
$content = file_get_contents($this->container['root.path'] . '/hudson/fixtures.sql');
|
||||
$content = str_replace('{{dbname}}', $conf['main']['database']['dbname'], $content);
|
||||
$content = str_replace('{{hostname}}', $conf['main']['database']['host'], $content);
|
||||
$content = str_replace('{{port}}', $conf['main']['database']['port'], $content);
|
||||
$content = str_replace('{{user}}', $conf['main']['database']['user'], $content);
|
||||
$content = str_replace('{{password}}', $conf['main']['database']['password'], $content);
|
||||
|
||||
$tmpFile = tempnam(sys_get_temp_dir(), 'connexion.inc-v3.1-');
|
||||
$this->container['filesystem']->dumpFile($tmpFile, $content);
|
||||
|
||||
$this->container['filesystem']->copy($tmpFile, $this->container['root.path'].'/config/connexion.inc');
|
||||
$this->container['filesystem']->copy($this->container['root.path'].'/resources/hudson/_GV.php', $this->container['root.path'].'/config/_GV.php');
|
||||
|
||||
$content = file_get_contents($this->container['root.path'] . '/resources/hudson/fixtures.sql');
|
||||
$content = str_replace('{{APPLICATION_BOX}}', $dbs['ab'], $content);
|
||||
$content = str_replace('{{DATA_BOX}}', $dbName, $content);
|
||||
$content = str_replace('{{DB_HOST}}', $conf['main']['database']['host'], $content);
|
||||
$content = str_replace('{{DB_PORT}}', $conf['main']['database']['port'], $content);
|
||||
$content = str_replace('{{DB_USER}}', $conf['main']['database']['user'], $content);
|
||||
$content = str_replace('{{DB_PASSWORD}}', $conf['main']['database']['password'], $content);
|
||||
$content = str_replace('{{DATA_BOX}}', $dbName, $content);
|
||||
$content = str_replace('{{USER_EMAIL}}', $input->getOption('email'), $content);
|
||||
$content = str_replace('{{USER_PASSWORD}}', hash('sha256', $input->getOption('password')), $content);
|
||||
|
||||
@@ -191,7 +207,7 @@ class IniReset extends Command
|
||||
));
|
||||
$command->run($input, $output);
|
||||
|
||||
$this->container['phraseanet.registry']->set('GV_base_datapath_noweb', $dataPath, \registry::TYPE_STRING);
|
||||
$this->container['conf']->set(['main', 'storage', 'subdefs'], $dataPath);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -379,8 +379,9 @@ class RegenerateSqliteDb extends Command
|
||||
private function generateCollection(\Pimple $DI)
|
||||
{
|
||||
$coll = $collection_no_acces = $collection_no_acces_by_status = $db = null;
|
||||
$databoxes = $this->container['phraseanet.appbox']->get_databoxes();
|
||||
|
||||
foreach ($this->container['phraseanet.appbox']->get_databoxes() as $databox) {
|
||||
foreach ($databoxes as $databox) {
|
||||
foreach ($databox->get_collections() as $collection) {
|
||||
if ($collection_no_acces instanceof \collection && !$collection_no_acces_by_status) {
|
||||
$collection_no_acces_by_status = $collection;
|
||||
@@ -403,13 +404,13 @@ class RegenerateSqliteDb extends Command
|
||||
$DI['coll'] = $coll;
|
||||
|
||||
if (!$collection_no_acces instanceof collection) {
|
||||
$collection_no_acces = \collection::create($this->container, $databox, $this->container['phraseanet.appbox'], 'BIBOO', $DI['user']);
|
||||
$collection_no_acces = \collection::create($this->container, $databox, $this->container['phraseanet.appbox'], 'COLL_TEST_NO_ACCESS', $DI['user']);
|
||||
}
|
||||
|
||||
$DI['coll_no_access'] = $collection_no_acces;
|
||||
|
||||
if (!$collection_no_acces_by_status instanceof collection) {
|
||||
$collection_no_acces_by_status = \collection::create($this->container, $databox, $this->container['phraseanet.appbox'], 'BIBOONOACCESBYSTATUS', $DI['user']);
|
||||
$collection_no_acces_by_status = \collection::create($this->container, $databox, $this->container['phraseanet.appbox'], 'COLL_TEST_NO_ACCESS_BY_STATUS', $DI['user']);
|
||||
}
|
||||
|
||||
$DI['coll_no_status'] = $collection_no_acces_by_status;
|
||||
|
File diff suppressed because one or more lines are too long
@@ -36,24 +36,8 @@ class Export implements ControllerProviderInterface
|
||||
|
||||
$app['firewall']->addMandatoryAuthentication($controllers);
|
||||
|
||||
$controllers->before(function (Request $request) use ($app) {
|
||||
$app['firewall']->requireNotGuest();
|
||||
});
|
||||
|
||||
/**
|
||||
* Display multi export
|
||||
*
|
||||
* name : export_multi_export
|
||||
*
|
||||
* description : Display multi export
|
||||
*
|
||||
* method : POST
|
||||
*
|
||||
* parameters : none
|
||||
*
|
||||
* return : HTML Response
|
||||
*/
|
||||
$controllers->post('/multi-export/', $this->call('displayMultiExport'))
|
||||
$controllers->post('/multi-export/', 'controller.prod.export:displayMultiExport')
|
||||
->bind('export_multi_export');
|
||||
|
||||
$controllers->post('/mail/', 'controller.prod.export:exportMail')
|
||||
|
@@ -11,57 +11,40 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Helper;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\User;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class Prod extends Helper
|
||||
{
|
||||
|
||||
public function get_search_datas()
|
||||
{
|
||||
$search_datas = [
|
||||
'bases' => [],
|
||||
'dates' => [],
|
||||
'fields' => []
|
||||
];
|
||||
$searchData = array('bases' => array(), 'dates' => array(), 'fields' => array(), 'sort' => array(),);
|
||||
|
||||
$bases = $fields = $dates = [];
|
||||
$bases = $fields = $dates = $sort = array();
|
||||
|
||||
if (! $this->app['authentication']->getUser() instanceof User) {
|
||||
return $search_datas;
|
||||
if (!$this->app['authentication']->getUser() instanceof \User_Adapter) {
|
||||
return $searchData;
|
||||
}
|
||||
|
||||
$searchSet = json_decode($this->app['settings']->getUserSetting($this->app['authentication']->getUser(), 'search'), true);
|
||||
$saveSettings = $this->app['settings']->getUserSetting($this->app['authentication']->getUser(), 'advanced_search_reload');
|
||||
|
||||
foreach ($this->app['acl']->get($this->app['authentication']->getUser())->get_granted_sbas() as $databox) {
|
||||
$sbas_id = $databox->get_sbas_id();
|
||||
$sbasId = $databox->get_sbas_id();
|
||||
|
||||
$bases[$sbas_id] = [
|
||||
'thesaurus' => (trim($databox->get_thesaurus()) != ""),
|
||||
'cterms' => false,
|
||||
'collections' => [],
|
||||
'sbas_id' => $sbas_id
|
||||
];
|
||||
$bases[$sbasId] = array('thesaurus' => (trim($databox->get_thesaurus()) !== ""), 'cterms' => false, 'collections' => array(), 'sbas_id' => $sbasId);
|
||||
|
||||
foreach ($this->app['acl']->get($this->app['authentication']->getUser())->get_granted_base([], [$databox->get_sbas_id()]) as $coll) {
|
||||
$selected = $saveSettings ? ((isset($searchSet['bases']) && isset($searchSet['bases'][$sbas_id])) ? (in_array($coll->get_base_id(), $searchSet['bases'][$sbas_id])) : true) : true;
|
||||
$bases[$sbas_id]['collections'][] =
|
||||
[
|
||||
'selected' => $selected,
|
||||
'base_id' => $coll->get_base_id()
|
||||
];
|
||||
$selected = $saveSettings ? ((isset($searchSet['bases']) && isset($searchSet['bases'][$sbasId])) ? (in_array($coll->get_base_id(), $searchSet['bases'][$sbasId])) : true) : true;
|
||||
$bases[$sbasId]['collections'][] = array('selected' => $selected, 'base_id' => $coll->get_base_id());
|
||||
}
|
||||
|
||||
foreach ($databox->get_meta_structure() as $fieldMeta) {
|
||||
if (!$fieldMeta->is_indexable()) {
|
||||
continue;
|
||||
$id = $meta->get_id();
|
||||
$name = $meta->get_name();
|
||||
if ($meta->get_type() == 'date') {
|
||||
if (isset($dates[$id]))
|
||||
$dates[$id]['sbas'][] = $sbas_id;
|
||||
else
|
||||
$dates[$id] = ['sbas' => [$sbas_id], 'fieldname' => $name];
|
||||
}
|
||||
$id = $fieldMeta->get_id();
|
||||
$name = $fieldMeta->get_name();
|
||||
@@ -88,19 +71,14 @@ class Prod extends Helper
|
||||
if (isset($fields[$name])) {
|
||||
$fields[$name]['sbas'][] = $sbasId;
|
||||
} else {
|
||||
$fields[$name] = [
|
||||
'sbas' => [$sbas_id]
|
||||
, 'fieldname' => $name
|
||||
, 'type' => $meta->get_type()
|
||||
, 'id' => $id
|
||||
];
|
||||
$fields[$name] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$bases[$sbasId]['thesaurus']) {
|
||||
continue;
|
||||
}
|
||||
if ( ! $this->app['acl']->get($this->app['authentication']->getUser())->has_right_on_sbas($sbas_id, 'bas_modif_th')) {
|
||||
if (!$this->app['acl']->get($this->app['authentication']->getUser())->has_right_on_sbas($sbasId, 'bas_modif_th')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -119,6 +97,6 @@ class Prod extends Helper
|
||||
|
||||
public function getRandom()
|
||||
{
|
||||
return $this->app['random.low']->generateString(16);
|
||||
return md5(time() . mt_rand(100000, 999999));
|
||||
}
|
||||
}
|
@@ -27,19 +27,17 @@ class SymLinker
|
||||
protected $encoder;
|
||||
protected $fs;
|
||||
protected $symlinkDir;
|
||||
protected $registry;
|
||||
|
||||
public static function create(Application $app)
|
||||
{
|
||||
return new SymLinker(
|
||||
$app['phraseanet.thumb-symlinker-encoder'],
|
||||
$app['filesystem'],
|
||||
$app['phraseanet.registry'],
|
||||
isset($app['phraseanet.configuration']['static-file']['symlink-directory']) ? $app['phraseanet.configuration']['static-file']['symlink-directory'] : $app['root.path'] . '/tmp/symlinks'
|
||||
);
|
||||
}
|
||||
|
||||
public function __construct(SymLinkerEncoder $encoder, Filesystem $fs, \registryInterface $registry, $symlinkDir)
|
||||
public function __construct(SymLinkerEncoder $encoder, Filesystem $fs, $symlinkDir)
|
||||
{
|
||||
$this->encoder = $encoder;
|
||||
$this->fs = $fs;
|
||||
|
@@ -33,10 +33,9 @@ class Installer
|
||||
{
|
||||
$this->rollbackInstall($abConn, $dbConn);
|
||||
|
||||
$this->createConfigFile($abConn, $serverName, $binaryData);
|
||||
$this->createConfigFile($abConn, $serverName, $binaryData, $dataPath);
|
||||
try {
|
||||
$this->createAB();
|
||||
$this->populateRegistryData($serverName, $dataPath, $binaryData);
|
||||
$user = $this->createUser($email, $password);
|
||||
$this->createDefaultUsers();
|
||||
if (null !== $dbConn) {
|
||||
@@ -57,22 +56,6 @@ class Installer
|
||||
$this->phraseaIndexer = $path;
|
||||
}
|
||||
|
||||
private function populateRegistryData($serverName, $dataPath)
|
||||
{
|
||||
if (null === $dataPath = realpath($dataPath)) {
|
||||
throw new \InvalidArgumentException(sprintf('Path %s does not exist.', $dataPath));
|
||||
}
|
||||
|
||||
$this->app['conf']->set(['main', 'storage', 'subdefs'], $dataPath);
|
||||
$this->app['conf']->set(['main', 'storage', 'cache'], realpath(__DIR__ . '/../../../../cache'));
|
||||
$this->app['conf']->set(['main', 'storage', 'log'], realpath(__DIR__ . '/../../../../logs'));
|
||||
$this->app['conf']->set(['main', 'storage', 'download'], realpath(__DIR__ . '/../../../../tmp/download'));
|
||||
$this->app['conf']->set(['main', 'storage', 'lazaret'], realpath(__DIR__ . '/../../../../tmp/lazaret'));
|
||||
$this->app['conf']->set(['main', 'storage', 'caption'], realpath(__DIR__ . '/../../../../tmp/caption'));
|
||||
$this->app['conf']->set('servername', $serverName);
|
||||
$this->app['conf']->set('registry', $this->app['registry.manipulator']->getRegistryData());
|
||||
}
|
||||
|
||||
private function createDB(Connection $dbConn = null, $template)
|
||||
{
|
||||
$template = new \SplFileInfo(__DIR__ . '/../../../conf.d/data_templates/' . $template . '-simple.xml');
|
||||
@@ -177,7 +160,7 @@ class Installer
|
||||
$this->app['phraseanet.appbox']->insert_datas($this->app);
|
||||
}
|
||||
|
||||
private function createConfigFile(Connection $abConn, $serverName, $binaryData)
|
||||
private function createConfigFile(Connection $abConn, $serverName, $binaryData, $dataPath)
|
||||
{
|
||||
$config = $this->app['configuration.store']->initialize()->getConfig();
|
||||
|
||||
@@ -195,6 +178,20 @@ class Installer
|
||||
$config['servername'] = $serverName;
|
||||
$config['main']['key'] = $this->app['random.medium']->generateString(16);
|
||||
|
||||
if (null === $dataPath = realpath($dataPath)) {
|
||||
throw new \InvalidArgumentException(sprintf('Path %s does not exist.', $dataPath));
|
||||
}
|
||||
|
||||
$config['main']['storage']['subdefs'] = $dataPath;
|
||||
|
||||
$config['main']['storage']['cache'] = realpath(__DIR__ . '/../../../../cache');
|
||||
$config['main']['storage']['log'] = realpath(__DIR__ . '/../../../../logs');
|
||||
$config['main']['storage']['download'] = realpath(__DIR__ . '/../../../../tmp/download');
|
||||
$config['main']['storage']['lazaret'] = realpath(__DIR__ . '/../../../../tmp/lazaret');
|
||||
$config['main']['storage']['caption'] = realpath(__DIR__ . '/../../../../tmp/caption');
|
||||
|
||||
$config['registry'] = $this->app['registry.manipulator']->getRegistryData();
|
||||
|
||||
$this->app['configuration.store']->setConfig($config);
|
||||
}
|
||||
}
|
||||
|
@@ -496,7 +496,7 @@ class Migration31 implements MigrationInterface
|
||||
|
||||
$stmt->execute([
|
||||
':key' => 'GV_sit',
|
||||
':value' => GV_sit,
|
||||
':value' => constant("GV_sit"),
|
||||
':type' => 'string',
|
||||
]);
|
||||
|
||||
@@ -505,7 +505,6 @@ class Migration31 implements MigrationInterface
|
||||
rename(__DIR__ . '/../../../../../../config/_GV.php', __DIR__ . '/../../../../../../config/_GV.php.old');
|
||||
$servername = defined('GV_ServerName') ? constant('GV_ServerName') : '';
|
||||
file_put_contents(__DIR__ . '/../../../../../../config/config.inc', "<?php\n\$servername = \"" . str_replace('"', '\"', $servername) . "\";\n");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -240,17 +240,19 @@ class RecordMoverJob extends AbstractJob
|
||||
}
|
||||
|
||||
// set status ?
|
||||
$x = $sxtask->to->status['mask'];
|
||||
$x = trim($sxtask->to->status['mask']);
|
||||
$x = preg_replace('/[^0-1]/', 'x', $x);
|
||||
|
||||
$mx = str_replace(' ', '0', ltrim(str_replace(array('0', 'x'), array(' ', ' '), $x)));
|
||||
$ma = str_replace(' ', '0', ltrim(str_replace(array('x', '0'), array(' ', '1'), $x)));
|
||||
if ($mx && $ma) {
|
||||
$tws[] = '((status ^ ' . $connbas->quote('0b'.$mx) . ') & ' . $connbas->quote('0b'.$ma) . ')!=0';
|
||||
$tws[] = '((status ^ 0b' . $mx . ') & 0b' . $ma . ')!=0';
|
||||
}
|
||||
elseif ($mx) {
|
||||
$tws[] = '(status ^ ' . $connbas->quote('0b'.$mx) . ')!=0';
|
||||
$tws[] = '(status ^ 0b' . $mx . ')!=0';
|
||||
}
|
||||
elseif ($ma) {
|
||||
$tws[] = '(status & ' . $connbas->quote('0b'.$ma) . ')!=0';
|
||||
$tws[] = '(status & 0b' . $ma . ')!=0';
|
||||
}
|
||||
|
||||
// compute the 'where' clause
|
||||
@@ -432,15 +434,17 @@ class RecordMoverJob extends AbstractJob
|
||||
}
|
||||
|
||||
// criteria <status mask="XXXXX" />
|
||||
$x = $sxtask->from->status['mask'];
|
||||
$x = trim($sxtask->from->status['mask']);
|
||||
$x = preg_replace('/[^0-1]/', 'x', $x);
|
||||
|
||||
$mx = str_replace(' ', '0', ltrim(str_replace(array('0', 'x'), array(' ', ' '), $x)));
|
||||
$ma = str_replace(' ', '0', ltrim(str_replace(array('x', '0'), array(' ', '1'), $x)));
|
||||
if ($mx && $ma) {
|
||||
$tw[] = '((status ^ ' . $connbas->quote('0b'.$mx) . ') & ' . $connbas->quote('0b'.$ma) . ')=0';
|
||||
$tw[] = '((status ^ 0b'. $mx . ') & 0b'. $ma . ')=0';
|
||||
} elseif ($mx) {
|
||||
$tw[] = '(status ^ ' . $connbas->quote('0b'.$mx) . ')=0';
|
||||
$tw[] = '(status ^ 0b' . $mx . ')=0';
|
||||
} elseif ($ma) {
|
||||
$tw[] = '(status & ' . $connbas->quote('0b'.$ma) . ")=0";
|
||||
$tw[] = '(status & 0b' . $ma . ")=0";
|
||||
}
|
||||
|
||||
return array($tw, $join);
|
||||
|
@@ -583,20 +583,16 @@ class databox extends base
|
||||
$stmt->execute();
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
if ($row)
|
||||
if ($row) {
|
||||
$ord = $row['ord'] + 1;
|
||||
}
|
||||
|
||||
$params[':ord'] = $ord;
|
||||
|
||||
$sql = 'INSERT INTO sbas (sbas_id, ord, host, port, dbname, sqlengine, user, pwd)
|
||||
VALUES (null, :ord, :host, :port, :dbname, "MYSQL", :user, :password)';
|
||||
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute([
|
||||
':ord' => $ord
|
||||
, ':host' => $host
|
||||
, ':port' => $port
|
||||
, ':dbname' => $dbname
|
||||
, ':user' => $user
|
||||
, ':password' => $password
|
||||
]);
|
||||
$stmt->execute($params);
|
||||
$stmt->closeCursor();
|
||||
$sbas_id = (int) $app['phraseanet.appbox']->get_connection()->lastInsertId();
|
||||
|
||||
|
@@ -765,7 +765,6 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
||||
. "/" . $this->record->get_record_id() . "/"
|
||||
. $this->get_name() . "/");
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -45,6 +45,16 @@ class patch_386alpha3a implements patchInterface
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns doctrine migrations needed for the patch.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDoctrineMigrations()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$hostname = '127.0.0.1';
|
||||
$port = '3306';
|
||||
$user = 'root';
|
||||
$password = '';
|
||||
$dbname = 'ab_test';
|
||||
$hostname = '{{hostname}}';
|
||||
$port = '{{port}}';
|
||||
$user = '{{user}}';
|
||||
$password = '{{password}}';
|
||||
$dbname = '{{dbname}}';
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"directory" : "tmp-assets",
|
||||
"directory": "www/assets",
|
||||
"interactive": false
|
||||
}
|
||||
|
@@ -60,7 +60,6 @@ server:
|
||||
- imagemagick
|
||||
- libevent-dev
|
||||
- ufraw
|
||||
- ffmpeg
|
||||
- ghostscript
|
||||
- xpdf
|
||||
- unoconv
|
||||
@@ -86,6 +85,38 @@ server:
|
||||
- libgif-dev
|
||||
- libjpeg62-dev
|
||||
- cachefilesd
|
||||
- autoconf
|
||||
- automake
|
||||
- build-essential
|
||||
- libass-dev
|
||||
- libfreetype6-dev
|
||||
- libgpac-dev
|
||||
- libsdl1.2-dev
|
||||
- libtheora-dev
|
||||
- libtool
|
||||
- libva-dev
|
||||
- libvdpau-dev
|
||||
- libvorbis-dev
|
||||
- libx11-dev
|
||||
- libxext-dev
|
||||
- libx264-dev
|
||||
- libxfixes-dev
|
||||
- libgsm1-dev
|
||||
- pkg-config
|
||||
- texi2html
|
||||
- zlib1g-dev
|
||||
- yasm
|
||||
- unzip
|
||||
- libopus-dev
|
||||
- libvpx-dev
|
||||
- libvorbis-dev
|
||||
- libmp3lame-dev
|
||||
- libxvidcore-dev
|
||||
- libfaad-dev
|
||||
- libopencore-amrnb-dev
|
||||
- libopencore-amrwb-dev
|
||||
- libxvidcore-dev
|
||||
- libdc1394-22-dev
|
||||
dot_files:
|
||||
-
|
||||
bash_aliases: null
|
||||
|
0
resources/vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
vendored
Normal file → Executable file
0
resources/vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
vendored
Normal file → Executable file
@@ -16,6 +16,51 @@ sudo sh -c 'echo "nl_NL.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo locale-gen en_US en_US.UTF-8 en_GB en_GB.UTF-8 fr_FR fr_FR.UTF-8 de_DE de_DE.UTF-8 nl_NL nl_NL.UTF-8
|
||||
sudo dpkg-reconfigure -f noninteractive locales
|
||||
|
||||
#ffmpeg
|
||||
sudo sh -c 'echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list'
|
||||
sudo sh -c 'echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list'
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install --force-yes -y deb-multimedia-keyring
|
||||
sudo apt-get update
|
||||
sudo apt-get install --force-yes -y libfaac-dev
|
||||
|
||||
cd /tmp
|
||||
wget –quiet https://www.ffmpeg.org/releases/ffmpeg-1.2.8.tar.gz
|
||||
tar -zxvf ffmpeg-1.2.8.tar.gz
|
||||
cd ffmpeg-1.2.8
|
||||
|
||||
wget –quiet -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
|
||||
sudo -u vagrant unzip fdk-aac.zip
|
||||
cd mstorsjo-fdk-aac*
|
||||
autoreconf -fiv
|
||||
./configure --disable-shared
|
||||
make
|
||||
sudo make install
|
||||
make distclean
|
||||
cd ..
|
||||
|
||||
./configure --enable-gpl \
|
||||
--enable-nonfree \
|
||||
--enable-libfaac \
|
||||
--enable-libgsm \
|
||||
--enable-libmp3lame \
|
||||
--enable-libtheora \
|
||||
--enable-libvorbis \
|
||||
--enable-libx264 \
|
||||
--enable-libxvid \
|
||||
--enable-zlib \
|
||||
--enable-postproc \
|
||||
--enable-swscale \
|
||||
--enable-pthreads \
|
||||
--enable-x11grab \
|
||||
--enable-libdc1394 \
|
||||
--enable-version3 \
|
||||
--enable-libopencore-amrnb \
|
||||
--enable-libopencore-amrwb
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# node + npm
|
||||
cd /tmp
|
||||
wget –quiet "http://nodejs.org/dist/v0.10.29/node-v0.10.29-linux-x64.tar.gz"
|
||||
@@ -28,6 +73,7 @@ sudo cp -rf * /usr/local/
|
||||
sudo npm install -g recess
|
||||
sudo npm install -g grunt-cli
|
||||
sudo npm install -g bower
|
||||
sudo npm install -g uglify-js
|
||||
|
||||
# python tools
|
||||
sudo easy_install -U taschenmesser scour boto
|
||||
@@ -107,7 +153,7 @@ fi
|
||||
sudo sh -c 'echo "RUN=yes" > /etc/default/cachefilesd'
|
||||
|
||||
# copy www.conf
|
||||
sudo sh -c "cat /vagrant/resources/vagrant/config/nginx/php5-fpm-www.conf > /etc/php5/fpm/pool.d/www.conf"
|
||||
sudo sh -c 'cat /vagrant/resources/vagrant/config/nginx/php5-fpm-www.conf > /etc/php5/fpm/pool.d/www.conf'
|
||||
|
||||
#setup phraseanet
|
||||
if [ ! -f /var/www/phraseanet/config/configuration.yml ]
|
||||
@@ -116,13 +162,13 @@ then
|
||||
mv /var/www/phraseanet/lib/conf.d/configuration.yml /var/www/phraseanet/lib/conf.d/configuration.yml.bkp
|
||||
cp /vagrant/resources/vagrant/config/phraseanet/configuration.yml /var/www/phraseanet/lib/conf.d/configuration.yml
|
||||
mv /var/www/phraseanet/.bowerrc /var/www/phraseanet/.bowerrc.bkp
|
||||
cp /vagrant/resources/vagrant/config/bower/.bower.rc /var/www/phraseanet/.bowerrc
|
||||
cp /vagrant/resources/vagrant/config/bower/.bowerrc /var/www/phraseanet/.bowerrc
|
||||
cd /var/www/phraseanet
|
||||
composer install -n --prefer-source --dev
|
||||
npm install
|
||||
grunt install-assets
|
||||
bin/developer assets:compile-less
|
||||
rm -f /var/www/phraseanet/lib/conf.d/configuration.yml
|
||||
sudo -u vagrant composer install -n --prefer-source --dev
|
||||
sudo -u vagrant npm install
|
||||
sudo -u vagrant grunt install-assets
|
||||
sudo -u vagrant bin/developer assets:compile-less
|
||||
sudo -u vagrant rm -f /var/www/phraseanet/lib/conf.d/configuration.yml
|
||||
rm -f /var/www/phraseanet/.bowerrc
|
||||
mv /www/phraseanet/.bowerrc.bkp /www/phraseanet/.bowerrc
|
||||
mv /var/www/phraseanet/lib/conf.d/configuration.yml.bkp /var/www/phraseanet/lib/conf.d/configuration.yml
|
||||
|
@@ -423,7 +423,7 @@
|
||||
{% set date_field_names = date_field_names|merge([field.fieldname]) %}
|
||||
{% endfor %}
|
||||
<option value="{{ date_field_names|join('|') }}" selected="selected">
|
||||
{% trans 'rechercher dans tous les champs' %}
|
||||
{{ 'rechercher dans tous les champs'| trans }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
|
@@ -4,23 +4,22 @@
|
||||
{% import 'common/drop_down_options.html.twig' as drop_down %}
|
||||
{% set th_size = app['settings'].getUserSetting(app['authentication'].getUser(), 'images_size') %}
|
||||
{% set sbas_id = record.get_sbas_id %}
|
||||
{% set lazyload = not app['phraseanet.static-file-factory'].isStaticFileModeEnabled and app['phraseanet.configuration']['lazyload']|default(false) %}
|
||||
{% set lazyload = app['phraseanet.configuration']['lazyload']|default(false) %}
|
||||
{% set container_attributes %}
|
||||
{% if entry_id %}
|
||||
<div style="width:{{th_size+30}}px;" sbas="{{sbas_id}}"
|
||||
id="{{ prefix|default('IMGT') }}_{{record.get_sbas_id}}_{{record.get_record_id}}"
|
||||
class="IMGT diapo type-{{ record.get_type }}"
|
||||
onDblClick="openPreview('FEED',{{record.get_number()}},{{entry_id}});">
|
||||
onDblClick="openPreview('FEED',{{ record.get_number() }},{{ entry_id }});"
|
||||
{% elseif record.is_grouping() %}
|
||||
<div style="width:{{th_size+30}}px;" sbas="{{sbas_id}}"
|
||||
id="{{ prefix|default('IMGT') }}_{{record.get_sbas_id}}_{{record.get_record_id}}"
|
||||
class="IMGT diapo grouping type-{{ record.get_type }}"
|
||||
onDblClick="openPreview('REG','0','{{record.get_serialize_key()}}');">
|
||||
onDblClick="openPreview('REG','0','{{ record.get_serialize_key() }}');"
|
||||
{% else %}
|
||||
<div style="width:{{th_size+30}}px;" sbas="{{sbas_id}}"
|
||||
id="{{ prefix|default('IMGT') }}_{{record.get_sbas_id}}_{{record.get_record_id}}"
|
||||
class="IMGT diapo type-{{ record.get_type }}"
|
||||
onDblClick="openPreview('RESULT',{{record.get_number}});">
|
||||
onDblClick="openPreview('RESULT',{{ record.get_number }});"
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
<div style="width:{{ th_size+30 }}px;" sbas="{{ sbas_id }}"
|
||||
id="{{ prefix|default('IMGT') }}_{{ record.get_sbas_id }}_{{ record.get_record_id }}" {{ container_attributes }}>
|
||||
<div style="padding: 4px;">
|
||||
<div style="height:40px; position: relative; z-index: 95;margin-bottom:0;border-bottom:none;">
|
||||
<div class="title" style="max-height:100%" title="{{ record.get_title() }}">
|
||||
@@ -30,12 +29,12 @@
|
||||
{{ record.get_status_icons|raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% set rollover_gif = record.get_rollover_thumbnail() %}
|
||||
|
||||
{% set rollover_gif = record.get_rollover_thumbnail() %}
|
||||
{% set user_technical_display = app['settings'].getUserSetting(app['authentication'].getUser(), 'technical_display') %}
|
||||
{% set user_rollover_thumbnail =app['settings'].getUserSetting(app['authentication'].getUser(), 'rollover_thumbnail') %}
|
||||
|
||||
{% set extraclass = '' %}
|
||||
|
||||
{% if user_rollover_thumbnail == 'caption' and searchEngine is not null %}
|
||||
{% set extraclass = extraclass ~ ' captionTips' %}
|
||||
{% set tooltipsrc = path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'answer', 'number' : record.get_number() }) %}
|
||||
@@ -46,7 +45,9 @@
|
||||
{% set extraclass = extraclass ~ ' captionTips' %}
|
||||
{% set tooltipsrc = path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) %}
|
||||
{% endif %}
|
||||
<div class="thumb {{extraclass}} " tooltipsrc="{{tooltipsrc}}" style="height:{{th_size}}px; z-index:90;">
|
||||
|
||||
<div class="thumb {{ extraclass }} " tooltipsrc="{{ tooltipsrc }}"
|
||||
style="height:{{ th_size }}px; z-index:90;">
|
||||
<div class="doc_infos">
|
||||
{% if app['settings'].getUserSetting(app['authentication'].getUser(), 'doctype_display') == '1' %}
|
||||
{{ doctype_icons.format(record) }}
|
||||
@@ -66,6 +67,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 25px; position:relative; text-align:left;">
|
||||
<table class="bottom" style="width:100%; table-layout:fixed;">
|
||||
<tr>
|
||||
@@ -82,13 +84,17 @@
|
||||
<td style='text-align:right;width:{{ l_width }}px;' valign='bottom'>
|
||||
{{ drop_down.prod(record, entry_id) }}
|
||||
{% if record.has_preview() and app['acl'].get(app['authentication'].getUser()).has_access_to_subdef(record, 'preview') %}
|
||||
<div tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}" class="previewTips"></div>
|
||||
<div tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}"
|
||||
class="previewTips"></div>
|
||||
{% endif %}
|
||||
{% if user_rollover_thumbnail == 'preview' %}
|
||||
<div tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'answer', 'number' : record.get_number() }) }}" class="captionRolloverTips"></div>
|
||||
<div tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'answer', 'number' : record.get_number() }) }}"
|
||||
class="captionRolloverTips"></div>
|
||||
{% endif %}
|
||||
{% if user_technical_display == '1' %}
|
||||
<img class="infoTips" tooltipsrc="{{ path('prod_tooltip_technical_data', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}" src="/skins/icons/info.gif"/>
|
||||
<img class="infoTips"
|
||||
tooltipsrc="{{ path('prod_tooltip_technical_data', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}"
|
||||
src="/skins/icons/info.gif"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -5,67 +5,69 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('button').button();
|
||||
|
||||
$('.databox_create').bind('change', function(){
|
||||
var $this = $(this);
|
||||
var $current = $this.closest('.steps');
|
||||
$('.databox_creation_input', $current).attr('disabled', $this.attr('checked'));
|
||||
$('.db_tester', $current).attr('disabled', $this.attr('checked')).toggleClass( "ui-state-disabled", $this.attr('checked') );
|
||||
});
|
||||
|
||||
$('.ab_opt_toggler').bind('click', function(){
|
||||
$('.optional_ab_data').fadeToggle();
|
||||
$('.optional_ab_datas').fadeToggle();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('button.ab_tester').bind('click', function (){
|
||||
if(window.console)
|
||||
console.log('application box connection test');
|
||||
test_connection_appbox();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('button.db_tester').bind('click', function (){
|
||||
if(window.console)
|
||||
console.log('data box connection test');
|
||||
test_connection_databox();
|
||||
|
||||
return false;
|
||||
});
|
||||
var language = {
|
||||
ajaxError : "{% trans 'Erreur lors du contact avec le serveur WEB' %}",
|
||||
ajaxTimeout : "{% trans 'Delai depasse lors du contact avec le serveur WEB' %}",
|
||||
requiredField : "{% trans 'Required' %}",
|
||||
validateEmail : "{% trans 'forms::merci d\'entrer une adresse e-mail valide' %}",
|
||||
validatePassword : "{% trans 'forms::ce champ est requis' %}",
|
||||
validatePasswordConfirm : "{% trans 'forms::ce champ est requis' %}",
|
||||
validatePasswordEqual : "{% trans 'forms::les mots de passe ne correspondent pas' %}",
|
||||
wrongCredentials : "{% trans 'Vous devez specifier une adresse email et un mot de passe valides' %}",
|
||||
wrongDatabasename : "{% trans 'Le nom de base de donnee est incorrect' %}",
|
||||
someErrors : "{% trans 'Il y a des erreurs, merci de les corriger avant de continuer' %}"
|
||||
ajaxError : "{{ 'Erreur lors du contact avec le serveur WEB' | trans }}",
|
||||
ajaxTimeout : "{{ 'Delai depasse lors du contact avec le serveur WEB' | trans }}",
|
||||
requiredField : "{{ 'Required' | trans }}",
|
||||
validateEmail : "{{ 'forms::merci d\'entrer une adresse e-mail valide' | trans }}",
|
||||
validatePassword : "{{ 'forms::ce champ est requis' | trans }}",
|
||||
validatePasswordConfirm : "{{ 'forms::ce champ est requis' | trans }}",
|
||||
validatePasswordEqual : "{{ 'forms::les mots de passe ne correspondent pas' | trans }}",
|
||||
wrongCredentials : "{{ 'Vous devez specifier une adresse email et un mot de passe valides' | trans }}",
|
||||
wrongDatabasename : "{{ 'Le nom de base de donnee est incorrect' | trans }}",
|
||||
someErrors : "{{ 'Il y a des erreurs, merci de les corriger avant de continuer' | trans }}"
|
||||
}
|
||||
|
||||
$.validator.passwordRating.messages = {
|
||||
"similar-to-username": "{% trans 'forms::le mot de passe est trop similaire a l\'identifiant' %}",
|
||||
"too-short": "{% trans 'forms::la valeur donnee est trop courte' %}",
|
||||
"very-weak": "{% trans 'forms::le mot de passe est trop simple' %}",
|
||||
"weak": "{% trans 'forms::le mot de passe est trop simple' %}",
|
||||
"good": "{% trans 'forms::le mot de passe est bon' %}",
|
||||
"strong": "{% trans 'forms::le mot de passe est tres bon' %}"
|
||||
"similar-to-username": "{{ 'forms::le mot de passe est trop similaire a l\'identifiant' | trans }}",
|
||||
"too-short": "{{ 'forms::la valeur donnee est trop courte' | trans }}",
|
||||
"very-weak": "{{ 'forms::le mot de passe est trop simple' | trans }}",
|
||||
"weak": "{{ 'forms::le mot de passe est trop simple' | trans }}",
|
||||
"good": "{{ 'forms::le mot de passe est bon' | trans }}",
|
||||
"strong": "{{ 'forms::le mot de passe est tres bon' | trans }}"
|
||||
};
|
||||
|
||||
$("#create_admin").validate({
|
||||
rules: {
|
||||
email:{ email:true},
|
||||
|
||||
password : {password:"#create_admin input[name=email]"},
|
||||
password_confirm : {equalTo:"#create_admin input[name=password]"},
|
||||
hostname: {required: true},
|
||||
user: {required: true},
|
||||
ab_hostname : {required:true},
|
||||
ab_user : {required:true},
|
||||
ab_name : {required:true}
|
||||
},
|
||||
messages: {
|
||||
email:{
|
||||
email : language.validateEmail
|
||||
},
|
||||
hostname: {
|
||||
ab_hostname : {
|
||||
required : language.requiredField
|
||||
},
|
||||
password : {
|
||||
@@ -81,8 +83,8 @@
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$("#create_admin").valid();
|
||||
|
||||
$('.path_to_test').path_file_test({'url':'/setup/test/path/'});
|
||||
$('.url_to_test').url_test({'url':'/setup/test/url/'});
|
||||
|
||||
@@ -91,18 +93,23 @@
|
||||
var $current = $(this).closest('.steps');
|
||||
if($('input.field_error, input.error', $current).length > 0)
|
||||
{
|
||||
alert('{% trans "Veuillez corriger les erreurs avant de poursuivre" %}');
|
||||
alert('{{ "Veuillez corriger les erreurs avant de poursuivre" | trans }}');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$(this).hasClass('install')) {
|
||||
if(!$(this).hasClass('install'))
|
||||
{
|
||||
var callback = function(){
|
||||
$current.hide();
|
||||
$current.next().show();
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
var callback = function(){
|
||||
if(window.console)
|
||||
console.log('Processing install....');
|
||||
$(this).attr('disabled', 'disabled');
|
||||
var dialog = $('#install_wait');
|
||||
dialog.dialog({
|
||||
@@ -116,11 +123,15 @@
|
||||
};
|
||||
}
|
||||
|
||||
if ($current.hasClass('appbox_settings')) {
|
||||
if($current.hasClass('appbox_settings'))
|
||||
{
|
||||
test_connection_appbox(callback);
|
||||
} else if ($current.hasClass('databox_settings') && $('.databox_create', $current).is(':not(:checked)')) {
|
||||
}
|
||||
else if($current.hasClass('databox_settings') && $('.databox_create', $current).is(':not(:checked)'))
|
||||
{
|
||||
test_connection_databox(callback);
|
||||
} else {
|
||||
}
|
||||
else{
|
||||
callback();
|
||||
}
|
||||
|
||||
@@ -134,7 +145,9 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
function test_connection_appbox(callback) {
|
||||
|
||||
function test_connection_appbox(callback)
|
||||
{
|
||||
var scope = $('.appbox_settings');
|
||||
var hostname_input = $('input[name="hostname"]:visible', scope);
|
||||
var port_input = $('input[name="port"]:visible', scope);
|
||||
@@ -146,27 +159,31 @@
|
||||
var password = password_input.val();
|
||||
var db_name = db_name_input.val();
|
||||
|
||||
var data = {
|
||||
var datas = {
|
||||
user:user,
|
||||
password:password,
|
||||
db_name:db_name
|
||||
};
|
||||
|
||||
if (hostname_input.length > 0) {
|
||||
data.hostname = hostname_input.val();
|
||||
if(hostname_input.length > 0)
|
||||
{
|
||||
datas.hostname = hostname_input.val();
|
||||
}
|
||||
if (port_input.length > 0) {
|
||||
data.port = port_input.val();
|
||||
if(port_input.length > 0)
|
||||
{
|
||||
datas.port = port_input.val();
|
||||
}
|
||||
|
||||
var el_loader = $('.tester_loader', scope);
|
||||
var el_status = $('.tester_status', scope);
|
||||
var el_message = $('.tester_message', scope);
|
||||
|
||||
test_connection(el_loader, el_status, el_message, data, callback);
|
||||
test_connection(el_loader, el_status, el_message, datas, callback);
|
||||
}
|
||||
|
||||
function test_connection_databox(callback) {
|
||||
|
||||
function test_connection_databox(callback)
|
||||
{
|
||||
var appbox_scope = $('.appbox_settings');
|
||||
var databox_scope = $('.databox_settings');
|
||||
|
||||
@@ -181,26 +198,30 @@
|
||||
var password = password_input.val();
|
||||
var db_name = db_name_input.val();
|
||||
|
||||
var data = {
|
||||
var datas = {
|
||||
user:user,
|
||||
password:password,
|
||||
db_name:db_name
|
||||
};
|
||||
|
||||
if (hostname_input.length > 0) {
|
||||
data.hostname = hostname_input.val();
|
||||
if(hostname_input.length > 0)
|
||||
{
|
||||
datas.hostname = hostname_input.val();
|
||||
}
|
||||
if (port_input.length > 0) {
|
||||
data.port = port_input.val();
|
||||
if(port_input.length > 0)
|
||||
{
|
||||
datas.port = port_input.val();
|
||||
}
|
||||
|
||||
var el_loader = $('.tester_loader', databox_scope);
|
||||
var el_status = $('.tester_status', databox_scope);
|
||||
var el_message = $('.tester_message', databox_scope);
|
||||
test_connection(el_loader, el_status, el_message, data, callback);
|
||||
test_connection(el_loader, el_status, el_message, datas, callback);
|
||||
|
||||
}
|
||||
|
||||
function test_connection(el_loader, el_status, el_message, data, callback) {
|
||||
function test_connection(el_loader, el_status, el_message, datas, callback)
|
||||
{
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/setup/connection_test/mysql/',
|
||||
@@ -259,11 +280,14 @@
|
||||
<form id="create_admin" method="post" action="{{ path('install_do_install') }}">
|
||||
|
||||
|
||||
|
||||
<div class="steps">
|
||||
<div class="wrapper">
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2></h2>
|
||||
<h2>
|
||||
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
<table class="main_content_wrapper">
|
||||
@@ -274,37 +298,21 @@
|
||||
<td>
|
||||
<p>
|
||||
{% if error is not none %}
|
||||
|
||||
<p class='error'>
|
||||
{{error}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% trans %}
|
||||
Bonjour, vous etes sur le point d'installer Phraseanet.
|
||||
{% endtrans %}
|
||||
{% trans %}Bonjour, vous etes sur le point d'installer Phraseanet.{% endtrans %}
|
||||
</p>
|
||||
<p>
|
||||
{% trans %}
|
||||
Consultez en ligne les pré-requis et la
|
||||
configuration du serveur web
|
||||
{% endtrans %}
|
||||
{% trans %}Consultez en ligne les pré-requis et la configuration du serveur web{% endtrans %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans %}
|
||||
Vous aurez besoin de spécifier un serveur MySQL, des
|
||||
repertoires de stockage pour vos documents, et de
|
||||
configurer votre serveur web pour qu'il publie
|
||||
certains de ces dossiers de stockage.
|
||||
{% endtrans %}
|
||||
{% trans %}Vous aurez besoin de spécifier un serveur MySQL, des repertoires de stockage pour vos documents, et de configurer votre serveur web pour qu'il publie certains de ces dossiers de stockage.{% endtrans %}
|
||||
</p>
|
||||
{% if warnings|length > 0 %}
|
||||
<p>
|
||||
{% trans %}
|
||||
Avant de continuer, prenez connaissance des
|
||||
points ci-dessous. Vous pouvez continuer sans
|
||||
corriger ces problèmes.
|
||||
{% endtrans %}
|
||||
{% trans %}Avant de continuer, prenez connaissance des points ci-dessous. Vous pouvez continuer sans corriger ces problèmes.{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -319,7 +327,7 @@
|
||||
{% if warnings is not empty %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('install_root') }}">{% trans 'Review system configuration' %}</a>
|
||||
<a href="{{ path('install_root') }}">{{ 'Review system configuration' | trans }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -335,9 +343,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<a href="https://docs.phraseanet.com/3.8/Admin/"
|
||||
target="_blank">
|
||||
{% trans 'Prerequisite and Configuration' %}
|
||||
<a href="https://docs.phraseanet.com/3.8/Admin/" target="_blank">
|
||||
{{ 'Prerequisite and Configuration' | trans }}
|
||||
</a>
|
||||
</p>
|
||||
</td>
|
||||
@@ -352,7 +359,7 @@
|
||||
<td>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next">{% trans 'boutton::suivant' %}</button>
|
||||
<button class="next">{{ 'boutton::suivant' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -365,7 +372,7 @@
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2>
|
||||
1/5 {% trans 'Executables externes' %}
|
||||
1/5 {{ 'Executables externes' | trans }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
@@ -380,11 +387,7 @@
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td><label>{{ binary['name'] }}</label> </td>
|
||||
<td><input autocomplete="off" name="binary_{{ key }}"
|
||||
class="path_to_test test_executable {% if required == "1" %}required{% endif %}"
|
||||
type="text"
|
||||
value="{{ binary['binary'] }}"/> {% if required == "1" %}{% trans 'Required field' %}{% endif %}
|
||||
</td>
|
||||
<td><input autocomplete="off" name="binary_{{key}}" class="path_to_test test_executable {% if required == "1" %}required{% endif %}" type="text" value="{{ binary['binary'] }}" /> {% if required == "1" %}{{ 'Required field' | trans }}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
@@ -399,15 +402,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% trans 'Phraseanet may require many binaries.' %}
|
||||
{{ 'Phraseanet may require many binaries.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans 'Some of them are required, like the indexer, Exiftool or ImageMagick components, some others are optionnal, like FFmpeg which is used to preview video files.' %}
|
||||
{{ 'Some of them are required, like the indexer, Exiftool or ImageMagick components, some others are optionnal, like FFmpeg which is used to preview video files.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans 'Don\'t worry, You can modify your configuration later' %}
|
||||
{{ 'Don\'t worry, You can modify your configuration later' | trans }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -419,10 +420,10 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button class="previous">{% trans 'boutton::precedent' %}</button>
|
||||
<button class="previous">{{ 'boutton::precedent' | trans }}</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next">{% trans 'boutton::suivant' %}</button>
|
||||
<button class="next">{{ 'boutton::suivant' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -430,12 +431,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="steps">
|
||||
<div class="wrapper">
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2>2/5
|
||||
{% trans 'Creation de votre compte' %}
|
||||
{{ 'Creation de votre compte' | trans }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
@@ -444,16 +447,12 @@
|
||||
<td>
|
||||
<table class="main_content_table">
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Votre adresse email' %}</label></td>
|
||||
<td><input class="error" type="text" name="email" value=""/>
|
||||
</td>
|
||||
<td style="width:200px;"><label>{{ 'Votre adresse email' | trans }}</label></td>
|
||||
<td><input class="error" type="text" name="email" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Votre mot de passe' %}</label></td>
|
||||
<td><input autocomplete="off" type="password"
|
||||
name="password" value=""/></td>
|
||||
<td style="width:200px;"><label>{{ 'Votre mot de passe' | trans }}</label></td>
|
||||
<td><input autocomplete="off" type="password" name="password" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -468,24 +467,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Confirmation de votre mot de passe' %}</label>
|
||||
</td>
|
||||
<td><input autocomplete="off" type="password"
|
||||
name="password_confirm" value=""/></td>
|
||||
<td style="width:200px;"><label>{{ 'Confirmation de votre mot de passe' | trans }}</label></td>
|
||||
<td><input autocomplete="off" type="password" name="password_confirm" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div style="border:1px solid #404040;padding:0 10px;margin:20px 0">
|
||||
<h3>{% trans 'admin::compte-utilisateur A propos de la securite des mots de passe :' %}</h3>
|
||||
|
||||
<p>{% trans 'admin::compte-utilisateur Les mots de passe doivent etre clairement distincts du login et contenir au moins deux types parmis les caracteres suivants :' %}</p>
|
||||
<h3>{{ 'admin::compte-utilisateur A propos de la securite des mots de passe :' | trans }}</h3>
|
||||
<p>{{ 'admin::compte-utilisateur Les mots de passe doivent etre clairement distincts du login et contenir au moins deux types parmis les caracteres suivants :' | trans }}</p>
|
||||
<dl style="border:none;float:none;">
|
||||
<dt>{% trans 'admin::compte-utilisateur::securite caracteres speciaux' %}</dt>
|
||||
<dt>{% trans 'admin::compte-utilisateur::securite caracteres majuscules' %}</dt>
|
||||
<dt>{% trans 'admin::compte-utilisateur::securite caracteres minuscules' %}</dt>
|
||||
<dt>{% trans 'admin::compte-utilisateur::securite caracteres numeriques' %}</dt>
|
||||
<dt>{{ 'admin::compte-utilisateur::securite caracteres speciaux' | trans }}</dt>
|
||||
<dt>{{ 'admin::compte-utilisateur::securite caracteres majuscules' | trans }}</dt>
|
||||
<dt>{{ 'admin::compte-utilisateur::securite caracteres minuscules' | trans }}</dt>
|
||||
<dt>{{ 'admin::compte-utilisateur::securite caracteres numeriques' | trans }}</dt>
|
||||
</dl>
|
||||
</div>
|
||||
</td>
|
||||
@@ -502,9 +497,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% trans 'Your email will be used to log in the application.' %}
|
||||
<br/><br/>
|
||||
{% trans 'Please be sure it is still valid and you can access it' %}
|
||||
{{ 'Your email will be used to log in the application.' | trans }} <br/><br/>
|
||||
{{ 'Please be sure it is still valid and you can access it' | trans }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -516,10 +510,10 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button class="previous">{% trans 'boutton::precedent' %}</button>
|
||||
<button class="previous">{{ 'boutton::precedent' | trans }}</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next">{% trans 'boutton::suivant' %}</button>
|
||||
<button class="next">{{ 'boutton::suivant' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -527,15 +521,20 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="steps appbox_settings">
|
||||
<div class="wrapper">
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2>
|
||||
3/5
|
||||
{% trans %}
|
||||
setup::Configuration de la base de compte ApplicationBox
|
||||
{% endtrans %}
|
||||
{% trans %}setup::Configuration de la base de compte ApplicationBox{% endtrans %}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
@@ -545,45 +544,34 @@
|
||||
<table class="main_content_table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>{% trans 'MySQL database connection parameters' %}</h3>
|
||||
<h3>{{ 'MySQL database connection parameters' | trans }}</h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="optional_ab_data">
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'phraseanet:: adresse' %}</label></td>
|
||||
<td><input autocomplete="off" type="text" name="hostname"
|
||||
value="localhost"/></td>
|
||||
<tr class="optional_ab_datas">
|
||||
<td style="width:200px;"><label>{{ 'phraseanet:: adresse' | trans }}</label></td>
|
||||
<td><input autocomplete="off" type="text" name="hostname" value="localhost" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Database user' %}</label></td>
|
||||
<td style="width:200px;"><label>{{ 'Database user' | trans }}</label></td>
|
||||
<td><input type="text" name="user" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'admin::compte-utilisateur mot de passe' %}</label>
|
||||
</td>
|
||||
<td><input type="password" name="db_password" value=""
|
||||
autocomplete="off"/></td>
|
||||
<td style="width:200px;"><label>{{ 'admin::compte-utilisateur mot de passe' | trans }}</label></td>
|
||||
<td><input type="password" name="db_password" value="" autocomplete="off" /></td>
|
||||
</tr>
|
||||
<tr class="optional_ab_data">
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'phraseanet:: port' %}</label></td>
|
||||
<td><input autocomplete="off" type="text" name="port"
|
||||
value="3306"/></td>
|
||||
<tr class="optional_ab_datas">
|
||||
<td style="width:200px;"><label>{{ 'phraseanet:: port' | trans }}</label></td>
|
||||
<td><input autocomplete="off" type="text" name="port" value="3306" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Database' %}</label></td>
|
||||
<td style="width:200px;"><label>{{ 'Database' | trans }}</label></td>
|
||||
<td><input type="text" name="ab_name" value="" /></td>
|
||||
</tr>
|
||||
<tr style="height:40px;">
|
||||
<td style="text-align:center;">
|
||||
<button class="ab_tester error">{% trans 'boutton::tester' %}</button>
|
||||
<img class="tester_loader" style="visibility:hidden;"
|
||||
src="/skins/icons/loader-black.gif"/>
|
||||
<img class="tester_status" style="display:none;"
|
||||
src="/skins/icons/delete.png"/>
|
||||
<button class="ab_tester error">{{ 'boutton::tester' | trans }}</button>
|
||||
<img class="tester_loader" style="visibility:hidden;" src="/skins/icons/loader-black.gif"/>
|
||||
<img class="tester_status" style="display:none;" src="/skins/icons/delete.png"/>
|
||||
</td>
|
||||
<td>
|
||||
<span class="tester_message"> </span>
|
||||
@@ -594,11 +582,7 @@
|
||||
<p style="margin:10px 0;">
|
||||
{% set debut_lien = '<a href="#" class="ab_opt_toggler">' %}
|
||||
{% set fin_lien = '</a>' %}
|
||||
{% trans %}
|
||||
Si vous aviez besoin de plus de
|
||||
parametres, {{ debut_lien }}Afficher d'avantage
|
||||
d'options{{ fin_lien }}
|
||||
{% endtrans %}
|
||||
{% trans with {'%debut_lien%' : debut_lien, '%fin_lien%' : fin_lien} %}Si vous aviez besoin de plus de parametres, %debut_lien%Afficher d'avantage d'options%fin_lien%{% endtrans %}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -614,25 +598,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% trans 'ApplicationBox is a Mysql database.' %}
|
||||
{{ 'ApplicationBox is a Mysql database.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans 'It stores users data, rights, and references to DataBoxes where records are stored.' %}
|
||||
{{ 'It stores users datas, rights, and references to DataBoxes where records are stored.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% set link_start = '<a href="https://mariadb.org/" target="_blank">' %}
|
||||
{% set link_end = '</a>' %}
|
||||
{% trans %}
|
||||
Phraseanet strongly recommends the use of {{ link_start }}
|
||||
MariaDB{{ link_end }} as a replacement for MySQL.
|
||||
{% endtrans %}
|
||||
{% trans with {'%link_start%' : link_start, '%link_end%' : link_end} %}Phraseanet strongly recommends the use of %link_start%MariaDB%link_end% as a replacement for MySQL.{% endtrans %}
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://mariadb.org/" target="_blank">
|
||||
<img src="/skins/icons/Mariadb-big.png"
|
||||
style="width:100%;"/>
|
||||
<img src="/skins/icons/Mariadb-big.png" style="width:100%;" />
|
||||
</a>
|
||||
</p>
|
||||
</td>
|
||||
@@ -645,10 +623,10 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button class="previous">{% trans 'boutton::precedent' %}</button>
|
||||
<button class="previous">{{ 'boutton::precedent' | trans }}</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next">{% trans 'boutton::suivant' %}</button>
|
||||
<button class="next">{{ 'boutton::suivant' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -656,12 +634,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="steps">
|
||||
<div class="wrapper">
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2>4/5
|
||||
{% trans 'setup::Configuration des repertoires de stockage' %}
|
||||
{{ 'setup::Configuration des repertoires de stockage' | trans }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
@@ -670,11 +650,8 @@
|
||||
<td>
|
||||
<table class="main_content_table">
|
||||
<tr>
|
||||
<td>
|
||||
<label>{% trans 'Repertoire de stockage des fichiers' %}</label>
|
||||
</td>
|
||||
<td><input class="path_to_test test_writeable required"
|
||||
type="text" name="datapath_noweb" value=""/></td>
|
||||
<td><label>{{ 'Repertoire de stockage des fichiers' | trans }}</label></td>
|
||||
<td><input class="path_to_test test_writeable required" type="text" name="datapath_noweb" value="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -688,15 +665,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% trans 'Your medias and their subdefinitions (previews, thumbnails..) will be stored in these directories.' %}
|
||||
{{ 'Your medias and their subdefinitions (previews, thumbnails..) will be stored in these directories.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans 'Thumbnails directory is mounted to be accessible via HTTP, while other files are not.' %}
|
||||
{{ 'Thumbnails directory is mounted to be accessible via HTTP, while other files are not.' | trans }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% trans 'If you plan to store large files, be sure it will fit in these directories.' %}
|
||||
{{ 'If you plan to store large files, be sure it will fit in these directories.' | trans }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -708,10 +683,10 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button class="previous">{% trans 'boutton::precedent' %}</button>
|
||||
<button class="previous">{{ 'boutton::precedent' | trans }}</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next">{% trans 'boutton::suivant' %}</button>
|
||||
<button class="next">{{ 'boutton::suivant' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -719,14 +694,13 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="steps databox_settings">
|
||||
<div class="wrapper">
|
||||
<div class="PNB10 wrapper_left">
|
||||
<div class="PNB10 section_title">
|
||||
<h2>5/5
|
||||
{% trans %}
|
||||
setup::Configuration de la base de stockage DataBox
|
||||
{% endtrans %}
|
||||
{% trans %}setup::Configuration de la base de stockage DataBox{% endtrans %}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="PNB10" style="top:50px;overflow-x:hidden;">
|
||||
@@ -735,41 +709,32 @@
|
||||
<td>
|
||||
<table class="main_content_table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>{% trans 'MySQL database connection parameters' %}</h3>
|
||||
</td>
|
||||
<td colspan="2"><h3>{{ 'MySQL database connection parameters' | trans }}</h3></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Ne pas creer de DataBox maintenant' %}</label>
|
||||
</td>
|
||||
<td style="width:200px;"><label>{{ 'Ne pas creer de DataBox maintenant' | trans }}</label></td>
|
||||
<td><input type="checkbox" class="databox_create" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
<label>{% trans 'Database' %}</label></td>
|
||||
<td><input class="databox_creation_input" type="text"
|
||||
name="db_name" value=""/></td>
|
||||
<td style="width:200px;"><label>{{ 'Database' | trans }}</label></td>
|
||||
<td><input class="databox_creation_input" type="text" name="db_name" value="" /></td>
|
||||
</tr>
|
||||
<tr style="height:40px;">
|
||||
<td style="text-align:center;">
|
||||
<button class="db_tester error">{% trans 'boutton::tester' %}</button>
|
||||
<img class="tester_loader" style="visibility:hidden;"
|
||||
src="/skins/icons/loader-black.gif"/>
|
||||
<img class="tester_status" style="display:none;"
|
||||
src="/skins/icons/delete.png"/>
|
||||
<button class="db_tester error">{{ 'boutton::tester' | trans }}</button>
|
||||
<img class="tester_loader" style="visibility:hidden;" src="/skins/icons/loader-black.gif"/>
|
||||
<img class="tester_status" style="display:none;" src="/skins/icons/delete.png"/>
|
||||
</td>
|
||||
<td>
|
||||
<span class="tester_message"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label>{% trans 'Modele de donnees' %}</label></td>
|
||||
<td><label>{{ 'Modele de donnees' | trans }}</label></td>
|
||||
<td>
|
||||
<select name="db_template"
|
||||
class="databox_creation_input">
|
||||
<select name="db_template" class="databox_creation_input">
|
||||
{% for template in available_templates %}
|
||||
<option value="{{ template }}">{{ template }}</option>
|
||||
{% endfor %}
|
||||
@@ -781,40 +746,29 @@
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>
|
||||
{% trans %}
|
||||
Creation des taches
|
||||
{% endtrans %}
|
||||
{% trans %}Creation des taches{% endtrans %}
|
||||
</h3>
|
||||
{% trans 'Phraseanet embarque un moteur de taches pour la lecture / ecriture des metadonnes, et autre operations' %}
|
||||
{{ 'Phraseanet embarque un moteur de taches pour la lecture / ecriture des metadonnes, et autre operations' | trans }}
|
||||
<br/><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px;text-align:right;">
|
||||
<input type="checkbox" name="create_task[]"
|
||||
value="writemeta" checked/>
|
||||
</td>
|
||||
<td>
|
||||
<label>{% trans 'Creer la tache d\'ecriture des metadonnees' %}</label>
|
||||
<input type="checkbox" name="create_task[]" value="writemeta" checked />
|
||||
</td>
|
||||
<td><label>{{ 'Creer la tache d\'ecriture des metadonnees' | trans }}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px;text-align:right;">
|
||||
<input type="checkbox" name="create_task[]"
|
||||
value="subdef" checked/>
|
||||
</td>
|
||||
<td>
|
||||
<label>{% trans 'Creer la tache de creation des sous-definitions' %}</label>
|
||||
<input type="checkbox" name="create_task[]" value="subdef" checked />
|
||||
</td>
|
||||
<td><label>{{ 'Creer la tache de creation des sous-definitions' | trans }}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px;text-align:right;">
|
||||
<input type="checkbox" name="create_task[]"
|
||||
value="cindexer" checked/>
|
||||
</td>
|
||||
<td>
|
||||
<label>{% trans 'Creer la tache d\'indexation' %}</label>
|
||||
<input type="checkbox" name="create_task[]" value="cindexer" checked />
|
||||
</td>
|
||||
<td><label>{{ 'Creer la tache d\'indexation' | trans }}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -828,9 +782,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% trans 'Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox.' %}
|
||||
<br/><br/>
|
||||
{% trans 'Databoxes store records, metadatas and their classifications' %}
|
||||
{{ 'Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox.' | trans }}<br/><br/>
|
||||
{{ 'Databoxes store records, metadatas and their classifications' | trans }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -842,23 +795,20 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button class="previous">{% trans 'boutton::precedent' %}</button>
|
||||
<button class="previous">{{ 'boutton::precedent' | trans }}</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="next install"
|
||||
type="submit">{% trans 'button::Install' %}</button>
|
||||
<button class="next install" type="submit">{{ 'button::Install' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="install_wait" style="display:none;" title="{% trans 'Install in progess' %}">
|
||||
<div id="install_wait" style="display:none;" title="{{ 'Install in progess' | trans }}">
|
||||
<p>
|
||||
<img src="/skins/icons/loader111111.gif"/>
|
||||
{% trans %}
|
||||
Installation is currenlty processing, please wait...
|
||||
{% endtrans %}
|
||||
{% trans %}Installation is currenlty processing, please wait...{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -39,7 +39,7 @@ class ApiJSONPTest extends ApiTestCase
|
||||
|
||||
protected function unserialize($data)
|
||||
{
|
||||
if (strpos($data, 'jsFunction(') !== 0) {
|
||||
if (strpos($data, 'jsFunction(') !== 4) {
|
||||
$this->fail('Invalid JSONP response');
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class ApiJSONPTest extends ApiTestCase
|
||||
$this->fail('Invalid JSONP response');
|
||||
}
|
||||
|
||||
return json_decode(substr($data, 11, -2), true);
|
||||
return json_decode(substr($data, 15, -2), true);
|
||||
}
|
||||
|
||||
protected function getAcceptMimeType()
|
||||
|
@@ -2156,7 +2156,7 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase
|
||||
$this->assertArrayHasKey('response', $content);
|
||||
$this->assertTrue(is_array($content['meta']), 'Le bloc meta est un array');
|
||||
$this->assertTrue(is_array($content['response']), 'Le bloc reponse est un array');
|
||||
$this->assertEquals('1.3', $content['meta']['api_version']);
|
||||
$this->assertEquals('1.4.1', $content['meta']['api_version']);
|
||||
$this->assertNotNull($content['meta']['response_time']);
|
||||
$this->assertEquals('UTF-8', $content['meta']['charset']);
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ class ResultTest extends \PhraseanetAuthenticatedTestCase
|
||||
$return = $apiResult->createResponse()->getContent();
|
||||
$this->assertInternalType(\PHPUnit_Framework_Constraint_IsType::TYPE_STRING, $return);
|
||||
$this->assertRegexp("/my_callback_function\\(\\{.+\\}\\);/", $return);
|
||||
$response = json_decode(substr($return, 21, strlen($return) - 23), true);
|
||||
$response = json_decode(substr($return, 25, -2), true);
|
||||
$this->assertSame([], $response['response']);
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,6 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase
|
||||
self::$DI['client']->request('POST', $route);
|
||||
|
||||
$response = self::$DI['client']->getResponse();
|
||||
|
||||
$this->assertEquals('application/json', $response->headers->get('Content-type'));
|
||||
$data = json_decode($response->getContent(), true);
|
||||
$this->assertInternalType('array', $data);
|
||||
|
@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\StaticFile;
|
||||
use Alchemy\Phrasea\Http\StaticFile\Apache;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class ApacheModeTest extends \PhraseanetPHPUnitAbstract
|
||||
class ApacheModeTest extends \PhraseanetWebTestCase
|
||||
{
|
||||
public function testGetVirtualHost()
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\StaticFile;
|
||||
use Alchemy\Phrasea\Http\StaticFile\Nginx;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class NginxModeTest extends \PhraseanetPHPUnitAbstract
|
||||
class NginxModeTest extends \PhraseanetWebTestCase
|
||||
{
|
||||
public function testGetVirtualHost()
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile;
|
||||
|
||||
use Alchemy\Phrasea\Http\StaticFile\StaticFileFactory;
|
||||
|
||||
class StaticFileFactoryTest extends \PhraseanetPHPUnitAbstract
|
||||
class StaticFileFactoryTest extends \PhraseanetWebTestCase
|
||||
{
|
||||
public function testFactoryCreation()
|
||||
{
|
||||
|
@@ -52,7 +52,7 @@ class InstallerTest extends \PhraseanetTestCase
|
||||
'port' => 3306,
|
||||
'user' => $credentials['user'],
|
||||
'password' => $credentials['password'],
|
||||
'dbname' => 'ab_unitTests',
|
||||
'dbname' => 'ab_setup_test',
|
||||
]);
|
||||
$abConn->connect();
|
||||
$dbConn = self::$DI['app']['dbal.provider']->get([
|
||||
@@ -60,14 +60,14 @@ class InstallerTest extends \PhraseanetTestCase
|
||||
'port' => 3306,
|
||||
'user' => $credentials['user'],
|
||||
'password' => $credentials['password'],
|
||||
'dbname' => 'db_unitTests',
|
||||
'dbname' => 'db_setup_test',
|
||||
]);
|
||||
$dbConn->connect();
|
||||
|
||||
// empty databases
|
||||
$stmt = $abConn->prepare('DROP DATABASE ab_unitTests; CREATE DATABASE ab_unitTests');
|
||||
$stmt = $abConn->prepare('DROP DATABASE ab_setup_test; CREATE DATABASE ab_setup_test');
|
||||
$stmt->execute();
|
||||
$stmt = $abConn->prepare('DROP DATABASE db_unitTests; CREATE DATABASE db_unitTests');
|
||||
$stmt = $abConn->prepare('DROP DATABASE db_setup_test; CREATE DATABASE db_setup_test');
|
||||
$stmt->execute();
|
||||
unset($stmt);
|
||||
|
||||
@@ -81,7 +81,7 @@ class InstallerTest extends \PhraseanetTestCase
|
||||
|
||||
$databoxes = $app['phraseanet.appbox']->get_databoxes();
|
||||
$databox = array_pop($databoxes);
|
||||
$this->assertContains('<path>'.realpath($dataPath).'/db_unitTests/subdefs</path>', $databox->get_structure());
|
||||
$this->assertContains('<path>'.realpath($dataPath).'/db_setup_test/subdefs</path>', $databox->get_structure());
|
||||
|
||||
$conf = $app['configuration.store']->getConfig();
|
||||
$this->assertArrayHasKey('main', $conf);
|
||||
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"directory": "www/assets",
|
||||
"interactive": false
|
||||
}
|
@@ -1,169 +0,0 @@
|
||||
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'
|
@@ -1,3 +0,0 @@
|
||||
!.gitignore
|
||||
*
|
||||
!insecure_private_key
|
Reference in New Issue
Block a user