Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
padams committed Feb 16, 2022
1 parent e223521 commit 79d1f0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
16 changes: 9 additions & 7 deletions modules/base/reportDomstreams.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,18 @@ function action() {
// check for limits
if ($this->getParam('document_id') || $this->getParam('pageUrl') || $this->getParam('pagePath')) {
$doc = owa_coreAPI::entityFactory('base.document');

if ($this->getParam('pageUrl')) {

if ( $this->get( 'document_id' ) ) {

$doc->load($this->getParam('document_id'));
} elseif ($this->getParam('pageUrl')) {
$doc->getByColumn('url', $this->getParam('pageUrl'));
} elseif ($this->getParam('pagePath')) {
$doc->getByColumn('uri', $this->getParam('pagePath'));
} else {
$doc->load($this->getParam('document_id'));
}

}

$document_id = $doc->get('id');
$pageUrl = $doc->get('url');

$this->setTitle('Domstream Recordings: ', $doc->get('url'));
$this->set('document', $doc->_getProperties());
Expand All @@ -69,7 +71,7 @@ function action() {
'request_method' => 'GET',
'startDate' => $p->getStartDate()->getYyyymmdd(),
'endDate' => $p->getEndDate()->getYyyymmdd(),
'document_id' => $document_id,
'pageUrl' => $pageUrl,
'siteId' => $this->getParam('siteId'),
'page' => $this->getParam('page'),
'resultsPerPage' => 50
Expand Down
11 changes: 1 addition & 10 deletions modules/base/src/tracker/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GPL v2.0
*/

//import { OWA_instance as OWA } from './owa.js';
//import { Util } from './Util.js';
import { OWA_instance } from '../common/owa.js';
import * as jQuery from 'jquery';

class Player {
Expand All @@ -23,14 +22,6 @@ class Player {
this.lock = false;
OWA_instance.debug('hello from player');
OWA_instance.registerStateStore('overlay', '', '', 'json');
//OWA_instance.state.load('overlay');

//Util.loadScript(OWA_instance.getSetting('baseUrl')+'/modules/base/js/includes/jquery/jquery-1.6.4.min.js', function(){});
//Util.loadScript(OWA_instance.getSetting('baseUrl')+'/modules/base/js/includes/jquery/jquery.jgrowl_minimized.js', function(){});
//Util.loadCss(OWA_instance.getSetting('baseUrl')+'/modules/base/css/jquery.jgrowl.css', function(){});
//Util.loadCss(OWA_instance.getSetting('baseUrl')+'/modules/base/css/owa.overlay.css', function(){});


}

init() {
Expand Down
6 changes: 3 additions & 3 deletions modules/domstream/controllers/domstreamsRestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ function action() {
$rsm->db->groupby('domstream_guid');

// get domstreams for a particular document/page
if ($this->get('document_id')) {
if ($this->get('pageUrl')) {

$rsm->db->where('document_id', $this->get('document_id'));
$rsm->setQueryStringParam('document_id', $document_id);
$rsm->db->where('page_url', $this->get('pageUrl'));
$rsm->setQueryStringParam('pageUrl', $this->get('pageUrl') );
}

$rsm->db->orderBy('timestamp', 'DESC');
Expand Down

0 comments on commit 79d1f0c

Please sign in to comment.