Commit eb27d4ef authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

Changed edit, delete, update strings to use mahara language strings

Fixed topic.php for topics with deleted posts
parent 35b53e53
......@@ -123,8 +123,8 @@ $editform = pieform(array(
'submit' => array(
'type' => 'submitcancel',
'value' => array(
isset($post) ? get_string('edit', 'interaction.forum') : get_string('post','interaction.forum'),
get_string('cancel', 'interaction.forum')
isset($post) ? get_string('edit') : get_string('post','interaction.forum'),
get_string('cancel')
),
'goto' => get_config('wwwroot') . 'interaction/forum/topic.php?id='.$topicid
),
......
......@@ -130,8 +130,8 @@ $editform =array(
'submit' => array(
'type' => 'submitcancel',
'value' => array(
isset($topicinfo) ? get_string('edit', 'interaction.forum') : get_string('post','interaction.forum'),
get_string('cancel', 'interaction.forum')
isset($topicinfo) ? get_string('edit') : get_string('post','interaction.forum'),
get_string('cancel')
),
'goto' => get_config('wwwroot') . 'interaction/forum/' . (isset($topicinfo) ? 'topic.php?id='.$topicid : 'view.php?id='.$forumid)
),
......
......@@ -15,8 +15,8 @@
<p>{$forum->description}</p>
<div class="fr">{$forum->count|escape}</div>
{if $admin}
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}">{str tag=edit section=interaction.forum}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}">{str tag=delete section=interaction.forum}</a>
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}">{str tag=edit}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}">{str tag=delete}</a>
{/if}
{$forum->subscribe}
</li>
......
{if $post->deleted}
<h4>{str tag="deletedpost" section="interaction.forum}</h4>
{else}
<h4>{$post->subject|escape}</h4>
<h5>{$post->poster|display_name|escape}</h5>
<h5>{str tag="posts" section=interaction.forum} {$post->count|escape}</h5>
<div><img src="{$WWWROOT}thumb.php?type=profileicon&maxsize=100&id={$post->poster}" alt=""></div>
<p>{$post->body}</p>
{if $moderator || !$closed}<a href="{$WWWROOT}interaction/forum/editpost.php?parent={$post->id|escape}">{str tag="reply" section=interaction.forum}</a>{/if}
{if $moderator || $post->editor}<a href="{$WWWROOT}interaction/forum/editpost.php?id={$post->id|escape}"> {str tag="edit" section=interaction.forum}</a>{/if}
{if $moderator && $post->parent}<a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete" section=interaction.forum}</a>{/if}
{if $moderator || $post->editor}<a href="{$WWWROOT}interaction/forum/editpost.php?id={$post->id|escape}"> {str tag="edit"}</a>{/if}
{if $moderator && $post->parent}<a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete"}</a>{/if}
{if $post->edit}
<p>{str tag="edited" section="interaction.forum}</p>
<ul>
......@@ -17,6 +20,7 @@
{/foreach}
</ul>
{/if}
{/if}
{if $children}
<ul>
{foreach from=$children item=child}
......
......@@ -5,8 +5,8 @@
<h2>{$topic->subject}</h2>
{if $moderator}
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edittopic" section="interaction.forum}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="deletetopic" section="interaction.forum}</a>
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a>
{/if}
{if !$topic->forumsubscribed}{$topic->subscribe}{/if}
<ul>
......
......@@ -6,12 +6,12 @@
<p>{$forum->description}</p>
<a href="{$WWWROOT}interaction/forum/edittopic.php?forum={$forum->id|escape}">{str tag="newtopic" section="interaction.forum}</a>
{if $admin}
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}">{str tag="edittitle" section="interaction.forum}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}">{str tag="deleteforum" section="interaction.forum}</a>
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}">{str tag="delete"}</a>
{/if}
{$forum->subscribe}
<form action="" method="post">
{if $moderator}<input type="submit" name="update" value="{str tag="update" section="interaction.forum"}">{/if}
{if $moderator}<input type="submit" name="update" value="{str tag="update"}">{/if}
<h4>{str tag="stickytopics" section=interaction.forum}</h4>
<table>
<tr>
......@@ -42,8 +42,8 @@
<input type="checkbox" name="closed[{$topic->id|escape}]">
{/if}
</td>
<td><a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit" section="interaction.forum"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete" section="interaction.forum"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a></td>
{/if}
{if !$forum->subscribed}
{if $topic->subscribed}
......@@ -85,8 +85,8 @@
<input type="checkbox" name="closed[{$topic->id|escape}]">
{/if}
</td>
<td><a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit" section="interaction.forum"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete" section="interaction.forum"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a></td>
<td><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a></td>
{/if}
{if !$forum->subscribed}
{if $topic->subscribed}
......
......@@ -77,7 +77,7 @@ if (!$topic->forumsubscribed) {
}
$posts = get_records_sql_array(
'SELECT p1.id, p1.parent, p1.poster, p1.subject, p1.body, p1.ctime AS posttime, COUNT(p2.*), e.ctime AS edit, e.user AS editor
'SELECT p1.id, p1.parent, p1.poster, p1.subject, p1.body, p1.ctime AS posttime, p1.deleted, COUNT(p2.*), e.ctime AS edit, e.user AS editor
FROM interaction_forum_post p1
INNER JOIN interaction_forum_post p2
ON (p1.poster = p2.poster
......@@ -95,8 +95,7 @@ $posts = get_records_sql_array(
LEFT JOIN interaction_forum_edit e
ON (e.post = p1.id)
WHERE p1.topic = ?
AND p1.deleted != 1
GROUP BY 1, 2, 3, 4, 5, 6, 8, 9
GROUP BY 1, 2, 3, 4, 5, 6, 7, 9, 10
ORDER BY p1.ctime',
array($topic->group, $topicid)
);
......
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