summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--edit_topic.php3
-rw-r--r--templates/flipswitch.tpl4
-rw-r--r--templates/list_topics.tpl12
3 files changed, 10 insertions, 9 deletions
diff --git a/edit_topic.php b/edit_topic.php
index be760c6..efce82a 100644
--- a/edit_topic.php
+++ b/edit_topic.php
@@ -18,6 +18,7 @@ $gBitUser->verifyTicket();
// Load up the Topic's board - we'll respect its permissions
$board = new BitBoard( $gContent->mInfo['board_id'] );
+$board->load();
$rslt = false;
@@ -35,7 +36,7 @@ if( isset($_REQUEST['is_locked']) || isset($_REQUEST['is_sticky']) ){
// Remove a topic
}elseif( isset( $_REQUEST['remove'] ) ) {
// Check permissions to edit this topic if the root object is the board check its perms, otherwise check general comment admin perms
- if( !(( $gContent->mInfo['root_id'] == $gContent->mInfo['board_id'] && $board->hasEditPermission() ) || $gBitUser->hasPermission('p_liberty_admin_comments')) ){
+ if( !(( $gContent->mInfo['root_id'] == $gContent->mInfo['board_content_id'] && $board->hasAdminPermission() ) || $gBitUser->hasPermission('p_liberty_admin_comments')) ){
$gBitSystem->fatalError( 'You do not have permission to delete this topic.' );
}
diff --git a/templates/flipswitch.tpl b/templates/flipswitch.tpl
index 4b7b7ae..42f6e57 100644
--- a/templates/flipswitch.tpl
+++ b/templates/flipswitch.tpl
@@ -11,7 +11,7 @@ $flip_down=>$flip.$flip_name.down
$flip_downname=>$flip.$flip_name.downname
*}
<span id="flip_{$flip.$flip_name.id}-{$flip_name}">
-{if $gBitUser->hasPermission( $flip.$flip_name.perm )}
+{if $gContent->hasUserPermission( $flip.$flip_name.perm )}
<a href="{$smarty.const.BOARDS_PKG_URL}edit_topic.php?{$flip.$flip_name.idname}={$flip.$flip_name.id|escape:"url"}&amp;{$flip_name}={$flip.$flip_name.state|escape:"url"}" />
{/if}
{if $flip.$flip_name.state==1}
@@ -19,7 +19,7 @@ $flip_downname=>$flip.$flip_name.downname
{else}
{biticon ipackage=icons iname=$flip.$flip_name.down iexplain=$flip.$flip_name.downname iforce="icon"}
{/if}
-{if $gBitUser->hasPermission( $flip.$flip_name.perm )}
+{if $gContent->hasUserPermission( $flip.$flip_name.perm )}
</a>
{/if}
</span>
diff --git a/templates/list_topics.tpl b/templates/list_topics.tpl
index b335ad7..820cbc4 100644
--- a/templates/list_topics.tpl
+++ b/templates/list_topics.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_boards/templates/list_topics.tpl,v 1.23 2008/08/01 03:44:32 wjames5 Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_boards/templates/list_topics.tpl,v 1.24 2008/08/01 04:32:02 wjames5 Exp $ *}
{strip}
<div class="listing boards">
<div class="floaticon">
@@ -45,7 +45,7 @@
<th style="width:5%;">{tr}Replies{/tr}</th>
<th style="width:20%;">{tr}Started{/tr}</th>
<th style="width:20%;">{tr}Last Reply{/tr}</th>
- {if $gBitUser->hasPermission('p_boards_edit') || $gBitUser->hasPermission('p_boards_post_edit')}
+ {if $board->hasEditPermission() || $gBitUser->hasPermission('p_boards_post_edit')}
<th style="width:1%;"><abbr title="{tr}Number of posts by Anonymous users{/tr}">Anon</abbr></th>
{/if}
{if $board->hasEditPermission()}
@@ -111,7 +111,7 @@
{/if}
{/if}
- {if $thread.th_moved==0 && $gBitUser->hasPermission( 'p_boards_remove' )}
+ {if $thread.th_moved==0 && $board->hasAdminPermission()}
<a title="{tr}Delete Topic{/tr}" href="{$smarty.const.BOARDS_PKG_URL}edit_topic.php?remove=1&amp;t={$thread.th_thread_id|escape:"url"}">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete Thread" iforce="icon"}</a>
{else}
{biticon ipackage=liberty iname=spacer iforce="icon"}
@@ -130,7 +130,7 @@
{/if}
</td>
- {if $thread.th_moved==0 && $gBitUser->hasPermission( 'p_boards_remove' )}
+ {if $thread.th_moved==0 && $board->hasAdminPermission()}
<td>
<input type="checkbox" name="checked[]" title="{$thread.title|escape}" value="{$thread.th_thread_id}" />
</td>
@@ -150,7 +150,7 @@
</div>
{/if}
- {if $gBitUser->hasPermission( 'p_boards_remove' )}
+ {if $board->hasAdminPermission()}
<div style="text-align:right;">
<script type="text/javascript">/* <![CDATA[ check / uncheck all */
document.write("<label for=\"switcher\">{tr}Select All{/tr}</label> ");
@@ -161,7 +161,7 @@
<select name="submit_mult" onchange="this.form.submit();">
<option value="" selected="selected">{tr}with checked{/tr}:</option>
- {if $gBitUser->hasPermission( 'p_boards_remove' )}
+ {if $board->hasAdminPermission()}
<option value="remove_boards">{tr}remove{/tr}</option>
{/if}
</select>