• Welcome to Simple Machines Community Forum. Please login or sign up.

[FIX] Quick inLine-Edit on locked topics not possible

Started by DracoBlue, October 28, 2007, 05:29:29 PM

Previous topic - Next topic

DracoBlue

October 28, 2007, 05:29:29 PM Last Edit: October 29, 2007, 08:19:01 AM by DracoBlue
Hello,

A member of my board noticed that the quickedit in-line button doesn't work on closed topics.

TestCase:
0. Installation of SMF 1.0, patch it to 1.1.4.
1. Create a new topic.
2. Lock it.
3. Press the QuickEdit-Button right after the topics body.
-> won't work.

I found out that the reason is that the rights aren't properly check in the QuoteFast-Procedure in Post.php.

hxxp:dracoblue.net/dev/index.php/2007/10/28/quick-edit-button-broken-in-simple-machines-forum/ [nonactive] is a (not that well suiting but still working fix):

Replace line 2050f (containing the following):
(!isset($_REQUEST['modify']) || (!empty($moderate_boards) && $moderate_boards[0] == 0) ? '' : '
AND (t.locked = 0' . (empty($moderate_boards) ? '' : ' OR b.ID_BOARD IN (' . implode(', ', $moderate_boards)) . ')')

And replace it with:
""

Now put right after the
mysql_free_result($request);
in line 2059 the following:
if (!empty($row['locked'])) isAllowedTo('moderate_board');

Am not sure if thats also in the 2.0 Beta 1, but I got this problem since 1.1 release.

Kind regards,
  Jan (DracoBlue)

Edit, Testing..
hxxp:dracoblue.net/dev [nonactive] • hxxp:www.newsflut.de [nonactive]  • hxxp:wp.dracoblue.net [nonactive]  • hxxp:gtat.dracoblue.net [nonactive]  • hxxp:crysis.dracoblue.net [nonactive] • hxxp:www.hglondon.net [nonactive] • hxxp:luanet.net [nonactive]

SleePy

I can't reproduce this on a fresh install of SMF 1.1.4
Can't reproduce here either on 2.0
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

DracoBlue

Hello SleePy,

thanks for the fast reply. I checked the real 1.1.4 files again and noticed that there was a line called:
$moderate_boards = boardsAllowedTo('moderate_board');
which wasn't in my 1.0->patched to->1.1->patched to 1.1.4 version of SMF. I asume that this line wasn't automaticly added on the patches, but was available in the install-package.

So I am not sure how to 'fix' that or if something with my update packages was wrong. But since 1.1 was released a long time ago, I am pretty sure that not much guys will have that issue.

Kind regards,
  Jan (DracoBlue)
hxxp:dracoblue.net/dev [nonactive] • hxxp:www.newsflut.de [nonactive]  • hxxp:wp.dracoblue.net [nonactive]  • hxxp:gtat.dracoblue.net [nonactive]  • hxxp:crysis.dracoblue.net [nonactive] • hxxp:www.hglondon.net [nonactive] • hxxp:luanet.net [nonactive]

Advertisement: