Avatar

Problem with marking a post (Bugs)

by Milo ⌂, Friday, August 25, 2017, 12:19 (85 days ago) @ Magma
edited by Milo, Friday, August 25, 2017, 12:31

Hi,

okay, you are right. Now, I can confirm your problem.

If I mark a posting from the forum index the post marks fine with a red X

Yes, this should always the case.

I get an error, the red X does not show and is undefined.

That is true, because the dynamic JS-file index.php?mode=js_defaults has (sometimes) a wrong user_type-argument.

<script src="{$FORUM_ADDRESS}/index.php?mode=js_defaults&amp;t={$settings.last_changes}{if $user}&amp;user_type={$user_type}{/if}" type="text/javascript" charset="utf-8"></script>

The user_type is set correctly in index.php line 97 but is overwritten in entry.inc.php line 235. Whereas in index.php, the user_type is related to the current user, in entry.inc.php the user_type is related to the user of the posting. :no:

A simple solution is to replace line 32 in main.tmpl by:

<script src="{$FORUM_ADDRESS}/index.php?mode=js_defaults&amp;t={$settings.last_changes}{if $user}&amp;user_type={if $mod}1{elseif $admin}2{else}0{/if}{/if}" type="text/javascript" charset="utf-8"></script>

@Auge, should I update the main.tmpl at Github?

/Micha

--
Surveyor-Software: Geodetic Network Adjustment & Deformation-Analysis and Transformation


Complete thread:

 RSS Feed of thread

powered by my little forum