From: <dh...@us...> - 2012-07-03 09:04:19
|
Revision: 9783 http://xoops.svn.sourceforge.net/xoops/?rev=9783&view=rev Author: dhcst Date: 2012-07-03 09:04:09 +0000 (Tue, 03 Jul 2012) Log Message: ----------- fix permission in forum Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/delete.php XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html XoopsModules/newbb/branches/alfred/newbb/viewforum.php Modified: XoopsModules/newbb/branches/alfred/newbb/delete.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/delete.php 2012-07-03 08:45:49 UTC (rev 9782) +++ XoopsModules/newbb/branches/alfred/newbb/delete.php 2012-07-03 09:04:09 UTC (rev 9783) @@ -54,12 +54,12 @@ if ( $topic_handler->getPermission($topic->getVar("forum_id"), $topic_status, 'delete') && ( $isadmin || $post_obj->checkIdentity() )) {} else { - redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); exit(); } if (!$isadmin && !$post_obj->checkTimelimit('delete_timelimit')) { - redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid",2,_MD_TIMEISUPDEL); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&pid=$pid",2,_MD_TIMEISUPDEL); exit(); } @@ -73,7 +73,7 @@ if ($post_obj->isTopic() && $topic->getVar("topic_replies")==0) $isDeleteOne=false; if ($isDeleteOne && $post_obj->isTopic() && $topic->getVar("topic_replies")>0) { //$post_handler->emptyTopic($post_obj); - redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTFIRSTWITHREPLYNODELETED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_POSTFIRSTWITHREPLYNODELETED); exit(); } else { if (!empty($_POST['post_text'])) Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-07-03 08:45:49 UTC (rev 9782) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-07-03 09:04:09 UTC (rev 9783) @@ -1,5 +1,4 @@ <{if $post_id == $topic_post.post_id}><div id="aktuell"></div><{/if}> - <table class="outer" cellpadding="0" cellspacing="0" border="0" width="100%" align="center" style="border-bottom-width: 0px;"> <tr> <th width="20%" align="left"> Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html 2012-07-03 08:45:49 UTC (rev 9782) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html 2012-07-03 09:04:09 UTC (rev 9783) @@ -60,7 +60,7 @@ <option value="approve"><{$smarty.const._MD_APPROVE}></option> <{elseif $status eq "deleted"}> <option value="restore"><{$smarty.const._MD_RESTORE}></option> - <{/if}> + <{/if}> </select> <input type="hidden" name="topic_id" value="<{$topic_id}>" /> <input type="submit" name="submit" value="<{$smarty.const._SUBMIT}>" /> | Modified: XoopsModules/newbb/branches/alfred/newbb/viewforum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/viewforum.php 2012-07-03 08:45:49 UTC (rev 9782) +++ XoopsModules/newbb/branches/alfred/newbb/viewforum.php 2012-07-03 09:04:09 UTC (rev 9783) @@ -50,7 +50,7 @@ $forum_obj = $forum_handler->get($forum_id); -if (!$forum_handler->getPermission($forum_obj)) { +if (!$forum_handler->getPermission($forum_obj) || !$forum_handler->getPermission($forum_obj,'view')) { redirect_header(XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/index.php", 2, _NOPERM); exit(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |