Skip to content

Commit

Permalink
Allow idSite to be overridden in SegmentSelectorControl PHP class.
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Mar 25, 2014
1 parent c626d8c commit 257d6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/SegmentEditor/SegmentSelectorControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class SegmentSelectorControl extends UIControl
/**
* Constructor.
*/
public function __construct()
public function __construct($idSite = false)
{
parent::__construct();

$this->jsClass = "SegmentSelectorControl";
$this->cssIdentifier = "segmentEditorPanel";
$this->cssClass = "piwikTopControl";

$this->idSite = Common::getRequestVar('idSite', false, 'int');
$this->idSite = $idSite ?: Common::getRequestVar('idSite', false, 'int');

$this->selectedSegment = Common::getRequestVar('segment', false, 'string');

Expand Down

0 comments on commit 257d6c7

Please sign in to comment.