New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3316] Add request parameter option to disable seriesPicker on jqplot #6

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@chmielot

chmielot commented Aug 23, 2012

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Tests pass: -
Fixes the following tickets: #3316
Todo: -
License of the code: MIT

Use case: Using Widgetize-Plugin to display certain widgets on a website:

<div id="widgetIframe">
<iframe width="100%" 
    height="350" 
    src="http://host/piwik/index.php?module=Widgetize&action=iframe&columns[]=nb_visits,nb_pageviews&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=1&period=month&date=today&disableLink=1&widget=1&seriesPicker=0" 
    scrolling="no" 
    frameborder="0" 
    marginheight="0" 
    marginwidth="0" 
    id="visitssum"></iframe>
</div>

This widget should be a limited version of the real piwik widgets, so you want to disable other series for the graph. Currently there is no option to disable the series picker in jqPlot, it is always activated as long as there are other series types for the requested graph.

I am aware of the fact that the URL can be manipulated to show other graph types. This is not important as the end user is assumed to not be able to do it. On the other hand, this could be prevented by apache rules for example.

This patch allows to set request parameter "seriesPicker" to 0 to disable the seriesPicker.

@robocoder robocoder closed this Aug 26, 2012

@halfdan halfdan referenced this pull request Jul 1, 2009

Closed

PHP 5.3 breaks Piwik #844

@EPinci EPinci referenced this pull request Jun 24, 2014

Closed

Openbasedir regression #5325

diosmosis added a commit that referenced this pull request Jun 11, 2015

Merge pull request #8027 from piwik/test_env_di_8
Injection Inception, Change #6: Final cleanup of test environment setup. Remove TestingEnvironment.addHooks event, make sure core doesn't depend on test files/classes/constants, integrate test environment variables w/ DI for easier overriding in tests, and related clean ups to test environment setup.

tsteur added a commit that referenced this pull request Jul 4, 2018

Destroy database connection only if it has a connection already
Otherwise it would create a connection just to destroy it. Noticed this when my tests were failing because of this.

```
Failed to setup fixture: TEST INITIALIZATION FAILED: SQLSTATE[HY000] [1049] Unknown database 'piwik_tests'
#0 libs/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 core/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 core/Db/Adapter/Pdo/Mysql.php(74): Piwik\Db\Adapter\Pdo\Mysql->_connect()
#3 core/Db/Adapter.php(51): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
#4 core/Db.php(122): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
#5 core/Db.php(54): Piwik\Db::createDatabaseObject()
#6 core/DbHelper.php(142): Piwik\Db::get()
#7 core/Db.php(144): Piwik\DbHelper::disconnectDatabase()
#8 tests/PHPUnit/Framework/Fixture.php(869): Piwik\Db::destroyDatabaseObject()
#9 tests/PHPUnit/Framework/Fixture.php(227): Piwik\Tests\Framework\Fixture::connectWithoutDatabase()
#10 tests/PHPUnit/Framework/TestCase/SystemTestCase.php(76): Piwik\Tests\Framework\Fixture->performSetUp()
#11 tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php(61): Piwik\Tests\Framework\TestCase\SystemTestCase::setUpBeforeClass()
```

diosmosis added a commit that referenced this pull request Jul 8, 2018

Destroy database connection only if it has a connection already (#13132)
Otherwise it would create a connection just to destroy it. Noticed this when my tests were failing because of this.

```
Failed to setup fixture: TEST INITIALIZATION FAILED: SQLSTATE[HY000] [1049] Unknown database 'piwik_tests'
#0 libs/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 core/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 core/Db/Adapter/Pdo/Mysql.php(74): Piwik\Db\Adapter\Pdo\Mysql->_connect()
#3 core/Db/Adapter.php(51): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
#4 core/Db.php(122): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
#5 core/Db.php(54): Piwik\Db::createDatabaseObject()
#6 core/DbHelper.php(142): Piwik\Db::get()
#7 core/Db.php(144): Piwik\DbHelper::disconnectDatabase()
#8 tests/PHPUnit/Framework/Fixture.php(869): Piwik\Db::destroyDatabaseObject()
#9 tests/PHPUnit/Framework/Fixture.php(227): Piwik\Tests\Framework\Fixture::connectWithoutDatabase()
#10 tests/PHPUnit/Framework/TestCase/SystemTestCase.php(76): Piwik\Tests\Framework\Fixture->performSetUp()
#11 tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php(61): Piwik\Tests\Framework\TestCase\SystemTestCase::setUpBeforeClass()
```

InfinityVoid added a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018

Destroy database connection only if it has a connection already (mato…
…mo-org#13132)

Otherwise it would create a connection just to destroy it. Noticed this when my tests were failing because of this.

```
Failed to setup fixture: TEST INITIALIZATION FAILED: SQLSTATE[HY000] [1049] Unknown database 'piwik_tests'
#0 libs/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 core/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Mysql->_connect()
matomo-org#2 core/Db/Adapter/Pdo/Mysql.php(74): Piwik\Db\Adapter\Pdo\Mysql->_connect()
matomo-org#3 core/Db/Adapter.php(51): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
matomo-org#4 core/Db.php(122): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
matomo-org#5 core/Db.php(54): Piwik\Db::createDatabaseObject()
matomo-org#6 core/DbHelper.php(142): Piwik\Db::get()
matomo-org#7 core/Db.php(144): Piwik\DbHelper::disconnectDatabase()
matomo-org#8 tests/PHPUnit/Framework/Fixture.php(869): Piwik\Db::destroyDatabaseObject()
matomo-org#9 tests/PHPUnit/Framework/Fixture.php(227): Piwik\Tests\Framework\Fixture::connectWithoutDatabase()
matomo-org#10 tests/PHPUnit/Framework/TestCase/SystemTestCase.php(76): Piwik\Tests\Framework\Fixture->performSetUp()
matomo-org#11 tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php(61): Piwik\Tests\Framework\TestCase\SystemTestCase::setUpBeforeClass()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment