From 400e7a9026e31615d80f8ae7fe0bf838cbcc7dc9 Mon Sep 17 00:00:00 2001 From: Drave Robber Date: Fri, 26 Oct 2012 10:25:04 +0300 Subject: [PATCH] fontyourface_count_fonts() is broken. --- fontyourface.module | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fontyourface.module b/fontyourface.module index 8d77d14..f536d9e 100644 --- a/fontyourface.module +++ b/fontyourface.module @@ -121,10 +121,13 @@ function fontyourface_provider_info($font, $info_part = NULL) { } // fontyourface_provider_info /** - * Returns the amount of fonts that exists in the database + * Returns the number of fonts that exist in the database. * - * $provider can be used to filter on provider (eg 'google_fonts_api') - * @status can be used to filter on status (NULL / TRUE / FALSE) + * @param string $provider + * (optional) Filter by provider (e.g. 'google_fonts_api'). + * @param bool $status + * (optional) Filter by status of the font (NULL = all, TRUE = enabled, + * FALSE = disabled). */ function fontyourface_count_fonts($provider = NULL, $status = NULL) { @@ -135,7 +138,7 @@ function fontyourface_count_fonts($provider = NULL, $status = NULL) { $query->condition('provider', $provider); } // if if (!empty($status)) { - $query->condition('status', (int) $status); + $query->condition('enabled', (int) $status); } // if $count = $query->execute()->rowCount(); -- 1.7.4.1