Fix tests

This commit is contained in:
Nicolas Le Goff
2013-02-11 18:18:16 +01:00
parent 8bd64d1314
commit c85701cfeb
4 changed files with 7 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ class module_report_download extends module_report
'activite' => 'log.activite',
'fonction' => 'log.fonction',
'usrid' => 'log.usrid',
'coll_id' => 'record.coll_id',
'coll_id' => 'log_colls.coll_id',
'ddate' => "log_docs.date",
'id' => 'log_docs.id',
'log_id' => 'log_docs.log_id',

View File

@@ -30,7 +30,7 @@ class module_report_sqldownload extends module_report_sql implements module_repo
if ($this->groupby == false) {
$this->sql = "
SELECT DISTINCT(log.id), log.user, log.societe, log.pays, log.activite,
SELECT DISTINCT(log.id), log.user, log.societe, log.pays, log.activite, log_colls.coll_id,
log.fonction, log.usrid, log_docs.date AS ddate, log_docs.record_id, log_docs.final, log_docs.comment
FROM log_docs
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_docs.log_id)

View File

@@ -489,6 +489,10 @@ class record_adapter implements record_Interface, cache_cacheableInterface
*/
public function move_to_collection(collection $collection, appbox $appbox)
{
if ($collection->get_base_id() === $this->get_collection()->get_base_id()) {
return $this;
}
$sql = "UPDATE record SET coll_id = :coll_id WHERE record_id =:record_id";
$params = array(

View File

@@ -45,8 +45,7 @@ class pushReportTest extends PhraseanetPHPUnitAuthenticatedAbstract
'date' => array("", 1, 0, 1, 1),
'record_id' => array("", 1, 1, 1, 1),
'file' => array("", 1, 0, 1, 1),
'mime' => array("", 1, 0, 1, 1),
'size' => array("", 1, 0, 1, 1)
'mime' => array("", 1, 0, 1, 1)
);
foreach ($this->ret as $sbasid => $collections) {