Fix report tests

This commit is contained in:
Romain Neutron
2012-09-24 12:46:01 +02:00
parent 29c7de942a
commit 5c1a9bf5d5
5 changed files with 18 additions and 8 deletions

View File

@@ -578,16 +578,16 @@ class module_report
{
switch ($domain) {
case 'connexion' :
return new module_report_sqlconnexion($this);
return new module_report_sqlconnexion($this->app, $this);
break;
case 'download' :
return new module_report_sqldownload($this->app, $this);
break;
case 'question' :
return new module_report_sqlquestion($this);
return new module_report_sqlquestion($this->app, $this);
break;
case 'action' :
return new module_report_sqlaction($this);
return new module_report_sqlaction($this->app, $this);
break;
default:
return $this->req;

View File

@@ -9,6 +9,8 @@
* file that was distributed with this source code.
*/
use Alchemy\Phrasea\Application;
/**
*
* @package module_report
@@ -17,6 +19,7 @@
*/
class module_report_filter
{
private $app;
private $posting_filter = array();
private $cor_query = array();
private $active_column = array();
@@ -36,8 +39,9 @@ class module_report_filter
'search' => 'report:: question',
);
public function __construct($current_filter, $correspondance)
public function __construct(Application $app, $current_filter, $correspondance)
{
$this->app = $app;
$this->tab_filter = $current_filter;
$this->cor_query = $correspondance;
}