Skip to content

Commit

Permalink
Merge pull request #39 from m0hamed/fix/better_handle_same_reports
Browse files Browse the repository at this point in the history
Fix/better handle same reports
  • Loading branch information
nijel committed Mar 18, 2014
2 parents d38d925 + 9ce7925 commit d12b201
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/Config/oauth.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
* user. You can then enter the resultant token here
*/
Configure::write('SourceForgeCredentials', array(
'key' => 'b9404a915db97d594cac',
'secret' => '2af63d5258742d4f0c9820c26252b435210faf58d0e2af2a248e1b11ce0d92ca80cba6bba98e0828'
'key' => '<oauth-token-key>',
'secret' => '<oauth-token-secret>'
));
5 changes: 4 additions & 1 deletion app/Controller/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public function data_tables() {

$params = array(
'fields' => $aColumns,
'conditions' => $searchConditions,
'conditions' => array(
$searchConditions,
'related_to' => NULL
),
'order' => $orderConditions,
);

Expand Down
5 changes: 2 additions & 3 deletions app/Test/Case/Controller/ReportsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ public function testDataTables() {
));
$expected = array(
'iTotalRecords' => 3,
'iTotalDisplayRecords' => 3,
'iTotalDisplayRecords' => 2,
'sEcho' => 1,
'aaData' => array(
array('1', 'error2', 'Lorem ipsum dolor sit amet', '4.0', 'new'),
array('2', 'error2', 'Lorem ipsum dolor sit amet', '4.0', 'new'),
array('4', 'error1', 'Lorem ipsum dolor sit amet', '3.8', 'new')
array('2', 'error2', 'Lorem ipsum dolor sit amet', '4.0', 'new')
)
);
$result = json_decode($this->contents, true);
Expand Down

0 comments on commit d12b201

Please sign in to comment.