Commit 92925860 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Prevent a crash when a group has no forum posts in it. Fix up some language...

Prevent a crash when a group has no forum posts in it. Fix up some language strings on the group info page too.
parent a48a08fe
......@@ -66,10 +66,12 @@ $string['edittopic'] = 'Edit topic';
$string['edittopicsuccess'] = 'Topic edited successfully';
$string['forumsuccessfulsubscribe'] = 'Forum subscribed successfully';
$string['forumsuccessfulunsubscribe'] = 'Forum unsubscribed successfully';
$string['gotoforums'] = 'Go to forums';
$string['groupadmins'] = 'Group administrators';
$string['groupadminlist'] = 'Group admins:';
$string['Key'] = 'Key';
$string['lastpost'] = 'Last post';
$string['latestforumposts'] = 'Latest Forum Posts';
$string['Moderators'] = 'Moderators';
$string['moderatorslist'] = 'Moderators:';
$string['moderatorsdescription'] = 'Moderators can edit and delete topics and posts. They can also open, close, set and unset topics as sticky';
......@@ -79,6 +81,7 @@ $string['newforum'] = 'New forum';
$string['newforumpostin'] = 'New forum post in %s';
$string['newpost'] = 'New post: ';
$string['newtopic'] = 'New topic';
$string['noforumpostsyet'] = 'There are no posts in this group yet';
$string['noforums'] = 'There are no forums in this group';
$string['notopics'] = 'There are no topics in this forum';
$string['Open'] = 'Open';
......
......@@ -42,7 +42,6 @@ $string['useradded'] = 'User added';
$string['editgroup'] = 'Edit Group';
$string['savegroup'] = 'Save Group';
$string['groupsaved'] = 'Group Saved Successfully';
$string['groupname'] = 'Group Name';
$string['invalidgroup'] = 'The group doesn\'t exist';
$string['canteditdontown'] = 'You can\'t edit this group because you don\'t own it';
$string['groupdescription'] = 'Group Description';
......@@ -56,8 +55,9 @@ $string['reason'] = 'Reason';
$string['approve'] = 'Approve';
$string['reject'] = 'Reject';
$string['groupalreadyexists'] = 'A Group by this name already exists';
$string['owner'] = 'Owner';
$string['members'] = 'Members';
$string['Created'] = 'Created';
$string['groupadmins'] = 'Group admins';
$string['Members'] = 'Members';
$string['memberrequests'] = 'Membership requests';
$string['declinerequest'] = 'Decline request';
$string['submittedviews'] = 'Submitted views';
......
......@@ -13,7 +13,7 @@
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=20&amp;id={$id|escape}" alt="">
<a href="{$WWWROOT}user/view.php?id={$id|escape}">{$id|display_name|escape}</a>{if !$smarty.foreach.admins.last}, {/if}
{/foreach}</li>
<li>{str tag=created section=group}: {$group->ctime}</li>
<li>{str tag=Created section=group}: {$group->ctime}</li>
{if $strgroupviews}<li>{$strgroupviews}</li>{/if}
{if $strcontent}<li>{$strcontent}</li>{/if}
</ul>
......@@ -42,7 +42,8 @@
</form>
</td>
<td>
<h3>{str tag=latestforumposts section=group}</h3>
<h3>{str tag=latestforumposts section=interaction.forum}</h3>
{if $foruminfo}
{foreach from=$foruminfo item=postinfo}
<div>
<h4><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}#post{$postinfo->id|escape}">{$postinfo->topicname|escape}</a></h4>
......@@ -50,7 +51,10 @@
<p>{$postinfo->body|str_shorten:100:true}</p>
</div>
{/foreach}
<p><a href="{$WWWROOT}interaction/forum/?group={$group->id|escape}">{str tag=gotoforums} &raquo;</a></p>
{else}
<p>{str tag=noforumpostsyet section=interaction.forum}</p>
{/if}
<p><a href="{$WWWROOT}interaction/forum/?group={$group->id|escape}">{str tag=gotoforums section=interaction.forum} &raquo;</a></p>
</td>
</tr>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment