Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIXED: Incorrect sprintf format string

FIXED: Incorrect reference to old page comment database structure. Updated to be compatible with new Comment module code.
REMOVED: Obsolete reference to comment admin CMS urls. Moderated and unmoderated comments don't seem to have distinct urls in the CMS anymore.
  • Loading branch information...
commit f9620de3949f9c5d039c03286774db8249110c9d 1 parent ac4e6f2
@tractorcow authored
View
22 code/widgets/BlogManagementWidget.php
@@ -19,15 +19,17 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
static $title = "Blog Management";
static $cmsTitle = "Blog Management";
static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin.";
-
+
function CommentText() {
- if(!class_exists('Comment')) return false;
- $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
+ if(!class_exists('Comment'))
+ return false;
+
+ $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"Comment\" WHERE \"Moderated\"=0")->value();
if($unmoderatedcount == 1) {
return _t("BlogManagementWidget.UNM1", "You have 1 unmoderated comment");
} else if($unmoderatedcount > 1) {
- return sprintf(_t("BlogManagementWidget.UNMM", "You have %i unmoderated comments"), $unmoderatedcount);
+ return sprintf(_t("BlogManagementWidget.UNMM", "You have %d unmoderated comments"), $unmoderatedcount);
} else {
return _t("BlogManagementWidget.COMADM", "Comment administration");
}
@@ -35,14 +37,10 @@ function CommentText() {
function CommentLink() {
- if(!Permission::check('BLOGMANAGEMENT') || !class_exists('Comment')) return false;
- $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
-
- if($unmoderatedcount > 0) {
- return "admin/comments/unmoderated";
- } else {
- return "admin/comments";
- }
+ if(!Permission::check('BLOGMANAGEMENT') || !class_exists('Comment'))
+ return false;
+
+ return "admin/comments";
}
function providePermissions() {
View
2  lang/ar_SA.php
@@ -54,7 +54,7 @@
$lang['ar_SA']['BlogManagementWidget.ss']['LOGOUT'] = 'خروج';
$lang['ar_SA']['BlogManagementWidget.ss']['POSTNEW'] = 'نشر تدوينة جديدة';
$lang['ar_SA']['BlogManagementWidget']['UNM1'] = 'يوجد تعليق واحد لا يحتاج إلى موافقة';
-$lang['ar_SA']['BlogManagementWidget']['UNMM'] = 'يوجد %i تعليقات لا تحتاج إلى موافقة';
+$lang['ar_SA']['BlogManagementWidget']['UNMM'] = 'يوجد %d تعليقات لا تحتاج إلى موافقة';
$lang['ar_SA']['BlogSummary.ss']['COMMENTS'] = 'التعليقات';
$lang['ar_SA']['BlogSummary.ss']['POSTEDBY'] = 'بواسطة';
$lang['ar_SA']['BlogSummary.ss']['POSTEDON'] = 'في';
View
2  lang/bg_BG.php
@@ -46,7 +46,7 @@
$lang['bg_BG']['BlogManagementWidget.ss']['LOGOUT'] = 'Излез';
$lang['bg_BG']['BlogManagementWidget.ss']['POSTNEW'] = 'Публикувайте нова блог статия';
$lang['bg_BG']['BlogManagementWidget']['UNM1'] = 'Вие имате 1 непрегледан коментар';
-$lang['bg_BG']['BlogManagementWidget']['UNMM'] = 'Вие имате %i непрегледани коментара';
+$lang['bg_BG']['BlogManagementWidget']['UNMM'] = 'Вие имате %d непрегледани коментара';
$lang['bg_BG']['BlogSummary.ss']['COMMENTS'] = 'Коментари';
$lang['bg_BG']['BlogSummary.ss']['POSTEDBY'] = 'Публикувано от';
$lang['bg_BG']['BlogSummary.ss']['POSTEDON'] = 'на';
View
2  lang/da_DK.php
@@ -46,7 +46,7 @@
$lang['da_DK']['BlogManagementWidget.ss']['LOGOUT'] = 'Log ud';
$lang['da_DK']['BlogManagementWidget.ss']['POSTNEW'] = 'Send et nyt blog indlæg';
$lang['da_DK']['BlogManagementWidget']['UNM1'] = 'Du har 1 uvurderet kommentar';
-$lang['da_DK']['BlogManagementWidget']['UNMM'] = 'Du har %i uvurderet kommentarer';
+$lang['da_DK']['BlogManagementWidget']['UNMM'] = 'Du har %d uvurderet kommentarer';
$lang['da_DK']['BlogSummary.ss']['COMMENTS'] = 'Kommentarer';
$lang['da_DK']['BlogSummary.ss']['POSTEDON'] = 'd. ';
$lang['da_DK']['RSSWidget']['CT'] = 'Brugerdefineret title for dette feed';
View
2  lang/de_DE.php
@@ -54,7 +54,7 @@
$lang['de_DE']['BlogManagementWidget.ss']['LOGOUT'] = 'Logout';
$lang['de_DE']['BlogManagementWidget.ss']['POSTNEW'] = 'Neuen Eintrag schreiben';
$lang['de_DE']['BlogManagementWidget']['UNM1'] = 'Sie haben 1 noch nicht moderierten Kommentar';
-$lang['de_DE']['BlogManagementWidget']['UNMM'] = 'Sie haben %i noch nicht moderierte Kommentare';
+$lang['de_DE']['BlogManagementWidget']['UNMM'] = 'Sie haben %d noch nicht moderierte Kommentare';
$lang['de_DE']['BlogSummary.ss']['COMMENTS'] = 'Kommentare';
$lang['de_DE']['BlogSummary.ss']['POSTEDBY'] = 'Verfasst von';
$lang['de_DE']['BlogSummary.ss']['POSTEDON'] = 'am';
View
2  lang/en_GB.php
@@ -54,7 +54,7 @@
$lang['en_GB']['BlogManagementWidget.ss']['LOGOUT'] = 'Logout';
$lang['en_GB']['BlogManagementWidget.ss']['POSTNEW'] = 'Post a new blog entry';
$lang['en_GB']['BlogManagementWidget']['UNM1'] = 'You have 1 unmoderated comment';
-$lang['en_GB']['BlogManagementWidget']['UNMM'] = 'You have %i unmoderated comments';
+$lang['en_GB']['BlogManagementWidget']['UNMM'] = 'You have %d unmoderated comments';
$lang['en_GB']['BlogSummary.ss']['COMMENTS'] = 'Comments';
$lang['en_GB']['BlogSummary.ss']['POSTEDBY'] = 'Posted by';
$lang['en_GB']['BlogSummary.ss']['POSTEDON'] = 'on';
View
2  lang/en_US.php
@@ -69,7 +69,7 @@
'Singular name of the object, used in dropdowns and to generally identify a single object in the interface'
);
$lang['en_US']['BlogManagementWidget']['UNM1'] = 'You have 1 unmoderated comment';
-$lang['en_US']['BlogManagementWidget']['UNMM'] = 'You have %i unmoderated comments';
+$lang['en_US']['BlogManagementWidget']['UNMM'] = 'You have %d unmoderated comments';
$lang['en_US']['BlogManagementWidget.ss']['LOGOUT'] = 'Logout';
$lang['en_US']['BlogManagementWidget.ss']['POSTNEW'] = 'Post a new blog entry';
$lang['en_US']['BlogSummary.ss']['COMMENTS'] = 'Comments';
View
2  lang/es_ES.php
@@ -54,7 +54,7 @@
$lang['es_ES']['BlogManagementWidget.ss']['LOGOUT'] = 'Salir';
$lang['es_ES']['BlogManagementWidget.ss']['POSTNEW'] = 'Escribir una nueva entrada del blog';
$lang['es_ES']['BlogManagementWidget']['UNM1'] = 'Tienes 1 comentario sin moderar';
-$lang['es_ES']['BlogManagementWidget']['UNMM'] = 'Tienes %i comentarios sin moderar';
+$lang['es_ES']['BlogManagementWidget']['UNMM'] = 'Tienes %d comentarios sin moderar';
$lang['es_ES']['BlogSummary.ss']['COMMENTS'] = 'Comentarios';
$lang['es_ES']['BlogSummary.ss']['POSTEDBY'] = 'Publicado por';
$lang['es_ES']['BlogSummary.ss']['POSTEDON'] = 'en';
View
2  lang/es_MX.php
@@ -54,7 +54,7 @@
$lang['es_MX']['BlogManagementWidget.ss']['LOGOUT'] = 'Salir';
$lang['es_MX']['BlogManagementWidget.ss']['POSTNEW'] = 'Enviar nueva entrada a la bitácora';
$lang['es_MX']['BlogManagementWidget']['UNM1'] = 'Tienes 1 comentario pendiente de moderación';
-$lang['es_MX']['BlogManagementWidget']['UNMM'] = 'Tienes %i comentarios pendientes de moderación';
+$lang['es_MX']['BlogManagementWidget']['UNMM'] = 'Tienes %d comentarios pendientes de moderación';
$lang['es_MX']['BlogSummary.ss']['COMMENTS'] = 'Comentarios';
$lang['es_MX']['BlogSummary.ss']['POSTEDBY'] = 'Enviado por';
$lang['es_MX']['BlogSummary.ss']['POSTEDON'] = 'en';
View
2  lang/et_EE.php
@@ -54,7 +54,7 @@
$lang['et_EE']['BlogManagementWidget.ss']['LOGOUT'] = 'Logi välja';
$lang['et_EE']['BlogManagementWidget.ss']['POSTNEW'] = 'Postita uus blogi sissekanne';
$lang['et_EE']['BlogManagementWidget']['UNM1'] = 'Sul on 1 üle vaatamata kommentaar';
-$lang['et_EE']['BlogManagementWidget']['UNMM'] = 'Sul on %i üle vaatamata kommentaari';
+$lang['et_EE']['BlogManagementWidget']['UNMM'] = 'Sul on %d üle vaatamata kommentaari';
$lang['et_EE']['BlogSummary.ss']['COMMENTS'] = 'Kommentaarid';
$lang['et_EE']['BlogSummary.ss']['POSTEDBY'] = 'Postitas';
$lang['et_EE']['BlogSummary.ss']['POSTEDON'] = '-';
View
2  lang/fr_FR.php
@@ -54,7 +54,7 @@
$lang['fr_FR']['BlogManagementWidget.ss']['LOGOUT'] = 'Déconnexion';
$lang['fr_FR']['BlogManagementWidget.ss']['POSTNEW'] = 'Publier une nouvelle entrée dans le blog';
$lang['fr_FR']['BlogManagementWidget']['UNM1'] = 'Vous avez 1 commentaire non modéré';
-$lang['fr_FR']['BlogManagementWidget']['UNMM'] = 'Vous avez %i commentaires non modérés';
+$lang['fr_FR']['BlogManagementWidget']['UNMM'] = 'Vous avez %d commentaires non modérés';
$lang['fr_FR']['BlogSummary.ss']['COMMENTS'] = 'Commentaires';
$lang['fr_FR']['BlogSummary.ss']['POSTEDBY'] = 'Posté par';
$lang['fr_FR']['BlogSummary.ss']['POSTEDON'] = 'sur';
View
2  lang/is_IS.php
@@ -53,7 +53,7 @@
$lang['is_IS']['BlogManagementWidget.ss']['LOGOUT'] = 'Útskrá';
$lang['is_IS']['BlogManagementWidget.ss']['POSTNEW'] = 'Skrifa nýja færslu';
$lang['is_IS']['BlogManagementWidget']['UNM1'] = 'Þú átt 1 óskoðaða athugasemd';
-$lang['is_IS']['BlogManagementWidget']['UNMM'] = 'Þú átt %i óskoðaða athugasemd';
+$lang['is_IS']['BlogManagementWidget']['UNMM'] = 'Þú átt %d óskoðaða athugasemd';
$lang['is_IS']['BlogSummary.ss']['COMMENTS'] = 'Athugasemdir';
$lang['is_IS']['BlogSummary.ss']['POSTEDBY'] = 'Skráð af';
$lang['is_IS']['BlogSummary.ss']['POSTEDON'] = 'á';
View
2  lang/it_IT.php
@@ -54,7 +54,7 @@
$lang['it_IT']['BlogManagementWidget.ss']['LOGOUT'] = 'Esci';
$lang['it_IT']['BlogManagementWidget.ss']['POSTNEW'] = 'Inserisci un nuovo post';
$lang['it_IT']['BlogManagementWidget']['UNM1'] = 'Hai 1 commento da moderare';
-$lang['it_IT']['BlogManagementWidget']['UNMM'] = 'Hai %i commenti non approvati';
+$lang['it_IT']['BlogManagementWidget']['UNMM'] = 'Hai %d commenti non approvati';
$lang['it_IT']['BlogSummary.ss']['COMMENTS'] = 'Commenti';
$lang['it_IT']['BlogSummary.ss']['POSTEDBY'] = 'Inserito da';
$lang['it_IT']['BlogSummary.ss']['POSTEDON'] = 'su';
View
2  lang/nl_NL.php
@@ -54,7 +54,7 @@
$lang['nl_NL']['BlogManagementWidget.ss']['LOGOUT'] = 'Afmelden';
$lang['nl_NL']['BlogManagementWidget.ss']['POSTNEW'] = 'Publiceer een nieuw blog entree';
$lang['nl_NL']['BlogManagementWidget']['UNM1'] = 'U heeft 1 niet gecontroleerde opmerking';
-$lang['nl_NL']['BlogManagementWidget']['UNMM'] = 'U heeft %i niet gecontroleerde opmerkingen';
+$lang['nl_NL']['BlogManagementWidget']['UNMM'] = 'U heeft %d niet gecontroleerde opmerkingen';
$lang['nl_NL']['BlogSummary.ss']['COMMENTS'] = 'Reacties';
$lang['nl_NL']['BlogSummary.ss']['POSTEDBY'] = 'Geplaatst door';
$lang['nl_NL']['BlogSummary.ss']['POSTEDON'] = 'Aan';
View
2  lang/pl_PL.php
@@ -50,7 +50,7 @@
$lang['pl_PL']['BlogManagementWidget.ss']['LOGOUT'] = 'Wyloguj';
$lang['pl_PL']['BlogManagementWidget.ss']['POSTNEW'] = 'Dodaj nowy wpis';
$lang['pl_PL']['BlogManagementWidget']['UNM1'] = 'Masz 1 niesprawdzony komentarz';
-$lang['pl_PL']['BlogManagementWidget']['UNMM'] = 'Masz %i niesprawdzonych komentarzy';
+$lang['pl_PL']['BlogManagementWidget']['UNMM'] = 'Masz %d niesprawdzonych komentarzy';
$lang['pl_PL']['BlogSummary.ss']['COMMENTS'] = 'Komentarze';
$lang['pl_PL']['BlogSummary.ss']['POSTEDBY'] = 'Napisane przez';
$lang['pl_PL']['BlogSummary.ss']['POSTEDON'] = 'Opublikowano';
View
2  lang/pt_PT.php
@@ -29,7 +29,7 @@
$lang['pt_PT']['BlogManagementWidget']['COMADM'] = 'Administração de comentários';
$lang['pt_PT']['BlogManagementWidget.ss']['LOGOUT'] = 'Sair';
$lang['pt_PT']['BlogManagementWidget']['UNM1'] = 'Existe 1 comentário por moderar';
-$lang['pt_PT']['BlogManagementWidget']['UNMM'] = 'Existem %i comentários por moderar';
+$lang['pt_PT']['BlogManagementWidget']['UNMM'] = 'Existem %d comentários por moderar';
$lang['pt_PT']['BlogSummary.ss']['COMMENTS'] = 'Comentários';
$lang['pt_PT']['BlogSummary.ss']['POSTEDON'] = 'em';
$lang['pt_PT']['RSSWidget']['NTS'] = 'Número de items para mostrar';
View
2  lang/ru_RU.php
@@ -46,7 +46,7 @@
$lang['ru_RU']['BlogManagementWidget.ss']['LOGOUT'] = 'Выход';
$lang['ru_RU']['BlogManagementWidget.ss']['POSTNEW'] = 'Опубликовать новую запись';
$lang['ru_RU']['BlogManagementWidget']['UNM1'] = 'У вас 1 непроверенный комментарий';
-$lang['ru_RU']['BlogManagementWidget']['UNMM'] = 'У вас %i непроверенных комментариев';
+$lang['ru_RU']['BlogManagementWidget']['UNMM'] = 'У вас %d непроверенных комментариев';
$lang['ru_RU']['BlogSummary.ss']['COMMENTS'] = 'Комментарии';
$lang['ru_RU']['BlogSummary.ss']['POSTEDBY'] = 'Автор:';
$lang['ru_RU']['BlogSummary.ss']['POSTEDON'] = ':';
View
2  lang/tr_TR.php
@@ -54,7 +54,7 @@
$lang['tr_TR']['BlogManagementWidget.ss']['LOGOUT'] = 'Oturumu kapat';
$lang['tr_TR']['BlogManagementWidget.ss']['POSTNEW'] = 'Yeni bir blog girdisi oluştur';
$lang['tr_TR']['BlogManagementWidget']['UNM1'] = '1 adet onay bekleyen yorumunuz var';
-$lang['tr_TR']['BlogManagementWidget']['UNMM'] = '%i adet onay bekleyen yorumunuz var';
+$lang['tr_TR']['BlogManagementWidget']['UNMM'] = '%d adet onay bekleyen yorumunuz var';
$lang['tr_TR']['BlogSummary.ss']['COMMENTS'] = 'Yorumlar';
$lang['tr_TR']['BlogSummary.ss']['POSTEDBY'] = 'Gönderen: ';
$lang['tr_TR']['BlogSummary.ss']['POSTEDON'] = 'üzerinde';
Please sign in to comment.
Something went wrong with that request. Please try again.