Delete data in the advagg_critical_css table.

Paramètres

array $records: List of rows needed that need to be removed from the db.

Return value

array Return array of booleans if anything was removed from the database.

1 call to advagg_critical_css_table_delete()
advagg_critical_css_admin_settings_form_submit dans advagg_critical_css/advagg_critical_css.admin.inc
Submit callback, process the advagg_critical_css form.

Fichier

advagg_critical_css/advagg_critical_css.module, line 220

Code

function advagg_critical_css_table_delete(array $records) {
    $return = array();
    foreach ($records as $record) {
        try {
            $return[] = db_delete('advagg_critical_css')->condition('theme', $record['theme'])
                ->condition('user', $record['user'])
                ->condition('type', $record['type'])
                ->condition('lookup', $record['lookup'])
                ->execute();
        } catch (PDOException $e) {
            // Log the error if in development mode.
            if (variable_get('advagg_cache_level', ADVAGG_CACHE_LEVEL) < 0) {
                watchdog('advagg_critical_css', 'Development Mode - Caught PDO Exception: <code>@info</code>', array(
                    '@info' => $e,
                ));
            }
        }
    }
    return $return;
}