Skip to content

Commit

Permalink
#3 Default value for title in stats block
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmi08 committed Apr 25, 2024
1 parent 5ce9eeb commit f8a037d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/betareader/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -34,4 +37,3 @@
$content = preg_replace("@\{totalbetas\}@", $count, $content);
}
else $content .= "<div><span class='label'>".$field_title.": </span>".$count."</div>";
?>

0 comments on commit f8a037d

Please sign in to comment.