mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
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:
@@ -233,7 +233,12 @@ class module_report
|
||||
/**
|
||||
*
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
protected $cor_query = [];
|
||||
=======
|
||||
protected $dateField = 'log.date';
|
||||
protected $cor_query = array();
|
||||
>>>>>>> 3.8
|
||||
protected $isInformative;
|
||||
|
||||
/**
|
||||
@@ -579,6 +584,7 @@ class module_report
|
||||
return new module_report_sqlconnexion($this->app, $this);
|
||||
break;
|
||||
case 'download' :
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
return new module_report_sqldownload($this->app, $this);
|
||||
break;
|
||||
case 'question' :
|
||||
@@ -778,7 +784,6 @@ class module_report
|
||||
*/
|
||||
protected function setConfigColumn($tab)
|
||||
{
|
||||
|
||||
foreach ($tab as $column => $row) {
|
||||
foreach ($row as $ind => $value) {
|
||||
$title_text = "";
|
||||
@@ -805,6 +810,18 @@ class module_report
|
||||
}
|
||||
}
|
||||
|
||||
public function setDateField($dateField)
|
||||
{
|
||||
$this->dateField = $dateField;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDateField()
|
||||
{
|
||||
return $this->dateField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the final formated array which contains all the result,
|
||||
* we construct the html code from this array
|
||||
@@ -817,40 +834,72 @@ class module_report
|
||||
*/
|
||||
public function buildReport($tab = false, $groupby = false, $on = false)
|
||||
{
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
|
||||
if (sizeof($this->report) > 0) {
|
||||
return $this->report;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
$databox = $this->app['phraseanet.appbox']->get_databox($this->sbas_id);
|
||||
$conn = $databox->get_connection();
|
||||
=======
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
|
||||
$conn = connection::getPDOConnection($this->app, $this->sbas_id);
|
||||
>>>>>>> 3.8
|
||||
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
|
||||
$this->buildReq($groupby, $on);
|
||||
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\nreq=%s\n\n", __FILE__, __LINE__, $this->req), FILE_APPEND);
|
||||
|
||||
try {
|
||||
try {
|
||||
$stmt = $conn->prepare($this->req);
|
||||
$stmt->execute($this->params);
|
||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
<<<<<<< HEAD
|
||||
} catch (DBALException $e) {
|
||||
=======
|
||||
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\ncount==%s\n\n", __FILE__, __LINE__, count($rs)), FILE_APPEND);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
>>>>>>> 3.8
|
||||
echo $e->getMessage();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s) %s\n\n", __FILE__, __LINE__, get_class($this)), FILE_APPEND);
|
||||
|
||||
//set request field
|
||||
$this->setChamp($rs);
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
//set display
|
||||
$this->setDisplay($tab, $groupby);
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
//construct results
|
||||
$this->buildResult($this->app, $rs);
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
//calculate prev and next page
|
||||
<<<<<<< HEAD
|
||||
$this->calculatePages();
|
||||
=======
|
||||
$this->calculatePages($rs);
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
>>>>>>> 3.8
|
||||
//do we display navigator ?
|
||||
$this->setDisplayNav();
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
//assign all variables
|
||||
$this->setReport();
|
||||
|
||||
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n\n", __FILE__, __LINE__), FILE_APPEND);
|
||||
|
||||
return $this->report;
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
|
Reference in New Issue
Block a user