Merge branch '3.8'

Conflicts:
	composer.lock
	lib/Alchemy/Phrasea/Application.php
	lib/Alchemy/Phrasea/Command/Setup/H264MappingGenerator.php
	lib/Alchemy/Phrasea/Controller/AbstractDelivery.php
	lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php
	lib/Alchemy/Phrasea/Controller/Prod/Edit.php
	lib/Alchemy/Phrasea/Controller/Prod/Story.php
	lib/Alchemy/Phrasea/Controller/Prod/Upload.php
	lib/Alchemy/Phrasea/Controller/Report/Activity.php
	lib/Alchemy/Phrasea/Controller/Report/Root.php
	lib/Alchemy/Phrasea/Controller/Root/Account.php
	lib/Alchemy/Phrasea/Core/PhraseaEvents.php
	lib/Alchemy/Phrasea/Core/Version.php
	lib/classes/API/V1/adapter.php
	lib/classes/User/Adapter.php
	lib/classes/databox.php
	lib/classes/media/subdef.php
	lib/classes/module/report.php
	lib/classes/module/report/activity.php
	lib/classes/module/report/connexion.php
	lib/classes/module/report/download.php
	lib/classes/module/report/nav.php
	lib/classes/module/report/question.php
	lib/classes/module/report/sqlaction.php
	lib/classes/module/report/sqlconnexion.php
	lib/classes/module/report/sqldownload.php
	lib/classes/module/report/sqlfilter.php
	lib/classes/task/abstract.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/prod/index.html.twig
	tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php
	tests/classes/api/v1/api_v1_adapterTest.php
	tests/classes/report/activityTest.php
	tests/classes/report/editTest.php
This commit is contained in:
Nicolas Le Goff
2014-12-09 13:59:29 +01:00
55 changed files with 1106 additions and 325 deletions

View File

@@ -25,11 +25,12 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
$this->params = array_merge([], $filter['params']);
if ($this->groupby == false) {
$this->sql ="
SELECT DISTINCT(log.id), log_search.date ddate, log_search.search, log.usrid, log.user, log.pays, log.societe, log.activite, log.fonction
$this->sql =" SELECT log.id, log_search.date ddate, log_search.search, log.usrid, log.user, log.pays, log.societe, log.activite, log.fonction
FROM log_search
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id)
INNER JOIN log_colls FORCE INDEX (couple) ON (log.id = log_colls.log_id) WHERE (" . $filter['sql'] .")";
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id) AND !ISNULL(usrid)
WHERE (" . $filter['sql'] .")";
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND);
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($this->params);
@@ -48,12 +49,13 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
SELECT DISTINCT(log.id), TRIM(" . $this->getTransQuery($this->groupby) . ") AS " . $this->groupby . "
FROM (`log_search`)
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id)
INNER JOIN log_colls FORCE INDEX (couple) ON (log.id = log_colls.log_id)
WHERE (" . $filter['sql'] .")
) AS tt
GROUP BY " . $this->groupby ."
ORDER BY nb DESC";
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND);
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($this->params);
$this->total_row = $stmt->rowCount();
@@ -74,7 +76,6 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
SELECT DISTINCT(log.id), " . $this->getTransQuery($field) . " AS val
FROM (`log_search`)
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id)
INNER JOIN log_colls FORCE INDEX (couple) ON (log.id = log_colls.log_id)
WHERE (" . $filter['sql'] . ")
) as tt
ORDER BY tt.val ASC";