From f8a037d7a944b9bc339eab612566f4ac04ec7e84 Mon Sep 17 00:00:00 2001 From: Jimako Date: Thu, 25 Apr 2024 11:41:05 +0200 Subject: [PATCH] #3 Default value for title in stats block --- modules/betareader/stats.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/betareader/stats.php b/modules/betareader/stats.php index 8572a88..e1c1471 100644 --- a/modules/betareader/stats.php +++ b/modules/betareader/stats.php @@ -25,6 +25,9 @@ if(!defined("_CHARSET")) exit( ); list($field_id, $field_title) = dbrow(dbquery("SELECT field_id, field_title FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_name = 'betareader'")); + +if(empty($field_title)) $field_title = _BETAS; + $query = dbquery("SELECT count(uid) FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field = '$field_id' AND info = '"._YES."'"); list($count) = dbrow($query); if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) { @@ -34,4 +37,3 @@ $content = preg_replace("@\{totalbetas\}@", $count, $content); } else $content .= "
".$field_title.": ".$count."
"; -?> \ No newline at end of file