mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUG FIX: table and column names quoted properly
This commit is contained in:
parent
c23b49323f
commit
5d2019f246
@ -21,7 +21,7 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
|
|||||||
static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin.";
|
static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin.";
|
||||||
|
|
||||||
function CommentText() {
|
function CommentText() {
|
||||||
$unmoderatedcount = DB::query("SELECT COUNT(*) FROM PageComment WHERE NeedsModeration=1")->value();
|
$unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
|
||||||
if($unmoderatedcount == 1) {
|
if($unmoderatedcount == 1) {
|
||||||
return _t("BlogManagementWidget.UNM1", "You have 1 unmoderated comment");
|
return _t("BlogManagementWidget.UNM1", "You have 1 unmoderated comment");
|
||||||
} else if($unmoderatedcount > 1) {
|
} else if($unmoderatedcount > 1) {
|
||||||
@ -35,7 +35,7 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
|
|||||||
if(!Permission::check('BLOGMANAGEMENT')) {
|
if(!Permission::check('BLOGMANAGEMENT')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$unmoderatedcount = DB::query("SELECT COUNT(*) FROM PageComment WHERE NeedsModeration=1")->value();
|
$unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
|
||||||
|
|
||||||
if($unmoderatedcount > 0) {
|
if($unmoderatedcount > 0) {
|
||||||
return "admin/comments/unmoderated";
|
return "admin/comments/unmoderated";
|
||||||
|
Loading…
Reference in New Issue
Block a user