Skip to content

Commit 16c8a4f

Browse files
committed
Merge pull request #72 from claroline/5.x-stable
5.x stable
2 parents 7b302cf + 924977d commit 16c8a4f

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

Repository/ForumRepository.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ public function findCategories(Forum $forum, $getQuery = false)
7979
{
8080
$dql = "
8181
SELECT c.id as id,
82-
count(m) as count_messages,
82+
count(s) as count_subjects,
8383
c.name as name
8484
FROM Claroline\ForumBundle\Entity\Category c
8585
LEFT JOIN c.subjects s
86-
LEFT JOIN s.messages m
8786
JOIN c.forum forum
8887
WHERE forum.id = :forumId
8988
GROUP BY c

Resources/translations/forum.en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ started_by: Initiated by
3939
stick: Stick
4040
stuck: Stuck
4141
subject: Topic
42+
subjects: Topics
4243
subjets_per_page: Subjects per page
4344
subscribe_mail_list: Subscribe to notifications
4445
unstick: Unstick

Resources/translations/forum.es.yml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ started_by: 'Iniciado por'
3838
stick: Anclar
3939
stuck: Anclado
4040
subject: Tema
41+
subjects: Temas
4142
subjets_per_page: 'Temas por pagina'
4243
subscribe_mail_list: 'Suscríbase a las notificaciones'
4344
unstick: Desanclar

Resources/translations/forum.fr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ started_by: Initié par
3939
stick: Épingler
4040
stuck: Épinglé
4141
subject: Sujet
42+
subjects: Sujets
4243
subjets_per_page: Sujets par page
4344
subscribe_mail_list: Recevoir les notifications
4445
unstick: Désépingler

Resources/views/Forum/messages.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
{% if not subject.isClosed() %}
150150
<textarea class="forum-answer claroline-tiny-mce hide"></textarea>
151151
{# something may be wrong here because _token doesn't always exists #}
152-
{{ form_widget(form._token) }}
152+
{% if form._token is defined %} {{ form_widget(form._token) }} {% endif %}
153153
{% endif %}
154154
</div>
155155
{% endif %}

Resources/views/Forum/subjects.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
{{ subject['subject_created']|intl_date_format() }}
129129
</td>
130130
<td>
131-
{{ subject['count_messages'] }}
131+
{{ subject['count_messages'] - 1 }}
132132
</td>
133133
<td>
134134
{% if lastMessages[subject['id']] is defined and lastMessages[subject['id']] is not empty %}
@@ -145,7 +145,7 @@
145145
{{ lastMessages[subject['id']].getAuthor() }}
146146
<br>
147147
{{ lastMessages[subject['id']].getModificationDate()|intl_date_format() }}
148-
148+
149149
{% if isNew %}
150150
</b>
151151
{% endif %}

Resources/views/index.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<thead>
9191
<tr>
9292
<th>{{ 'category'|trans({}, 'forum') }}</th>
93-
<th>{{ 'messages'|trans({}, 'forum') }} </th>
93+
<th>{{ 'subjects'|trans({}, 'forum') }} </th>
9494
<th>{{ 'last_message'|trans({}, 'forum') }}</th>
9595
{% if isModerator %}
9696
<th></th>
@@ -113,7 +113,7 @@
113113
{% endif %}
114114
<br>
115115
<td>
116-
{{ category['count_messages'] }}
116+
{{ category['count_subjects'] }}
117117
</td>
118118
<td>
119119
{{ category['last_message_author'] }}

0 commit comments

Comments
 (0)