Skip to content
Extraits de code Groupes Projets
Valider c77688cc rédigé par mattab's avatar mattab
Parcourir les fichiers

Remove DB::tableExists method

parent 2aaa48d5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,6 +18,9 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' ...@@ -18,6 +18,9 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
* Add your own SMS/Text provider by creating a new class in the `SMSProvider` directory of your plugin. The class has to extend `Piwik\Plugins\MobileMessaging\SMSProvider` and implement the required methods. * Add your own SMS/Text provider by creating a new class in the `SMSProvider` directory of your plugin. The class has to extend `Piwik\Plugins\MobileMessaging\SMSProvider` and implement the required methods.
* Segments can now be composed by a union of multiple segments. To do this set an array of segments that shall be used for that segment `$segment->setUnionOfSegments(array('outlinkUrl', 'downloadUrl'))` instead of defining a SQL column. * Segments can now be composed by a union of multiple segments. To do this set an array of segments that shall be used for that segment `$segment->setUnionOfSegments(array('outlinkUrl', 'downloadUrl'))` instead of defining a SQL column.
### Deprecations
* The method `DB::tableExists` was un-used and has been removed.
## Piwik 2.15.0 ## Piwik 2.15.0
### New commands ### New commands
......
...@@ -631,17 +631,6 @@ class Db ...@@ -631,17 +631,6 @@ class Db
} }
} }
/**
* Returns `true` if a table in the database, `false` if otherwise.
*
* @param string $tableName The name of the table to check for. Must be prefixed.
* @return bool
*/
public static function tableExists($tableName)
{
return self::query("SHOW TABLES LIKE ?", $tableName)->rowCount() > 0;
}
/** /**
* Attempts to get a named lock. This function uses a timeout of 1s, but will * Attempts to get a named lock. This function uses a timeout of 1s, but will
* retry a set number of times. * retry a set number of times.
......
...@@ -41,7 +41,7 @@ class ManagePlugin extends ConsoleCommand ...@@ -41,7 +41,7 @@ class ManagePlugin extends ConsoleCommand
} }
/** /**
* Execute command like: ./console cloudadmin:plugin activate CustomAlerts --piwik-domain=testcustomer.piwik.pro * Execute command like: ./console core:plugin activate CustomAlerts --piwik-domain=testcustomer.piwik.pro
*/ */
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
......
...@@ -85,12 +85,6 @@ class DbTest extends IntegrationTestCase ...@@ -85,12 +85,6 @@ class DbTest extends IntegrationTestCase
Db::destroyDatabaseObject(); Db::destroyDatabaseObject();
} }
public function test_tableExists()
{
$this->assertFalse(Db::tableExists('noTExistIngTable'));
$this->assertTrue(Db::tableExists(Common::prefixTable('log_visit')));
}
public function getDbAdapter() public function getDbAdapter()
{ {
return array( return array(
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter