You are here

public function StringDatabaseStorage::deleteStrings in Localization update 7.2

Implements StringStorageInterface::deleteLanguage().

Overrides StringStorageInterface::deleteStrings

File

includes/locale/StringDatabaseStorage.php, line 150
Definition of StringDatabaseStorage.

Class

StringDatabaseStorage
Defines the locale string class.

Code

public function deleteStrings(array $conditions) {
  $lids = $this
    ->dbStringSelect($conditions, array(
    'fields' => array(
      'lid',
    ),
  ))
    ->execute()
    ->fetchCol();
  if ($lids) {
    $this
      ->dbDelete('locales_target', array(
      'lid' => $lids,
    ))
      ->execute();
    $this
      ->dbDelete('locales_source', array(
      'lid' => $lids,
    ))
      ->execute();
    $this
      ->dbDelete('locales_location', array(
      'sid' => $lids,
    ))
      ->execute();
  }
}