|
@@ -166,7 +166,7 @@ if ($prev_id<0)
|
|
|
}
|
|
|
|
|
|
//first message img
|
|
|
-echo '<a title="'.get_lang('FirstMessage').'" href="viewthread.php?'.api_get_cidreq()."&forum=".Security::remove_XSS($_GET['forum'])."&thread=".Security::remove_XSS($_GET['thread'])."&origin=".$origin."&post=".$prev_next_array[0]."\" $class>".$first_page_text."</a>";
|
|
|
+echo '<a title="'.get_lang('FirstMessage').'" href="viewthread.php?'.api_get_cidreq()."&forum=".Security::remove_XSS($_GET['forum'])."&thread=".Security::remove_XSS($_GET['thread'])."&origin=".$origin."&id=1&post=".$prev_next_array[0]."\" $class>".$first_page_text."</a>";
|
|
|
// prev message link
|
|
|
if ($href_prev==1)
|
|
|
{
|
|
@@ -241,7 +241,20 @@ if (api_is_allowed_to_edit(false,true) && !(api_is_course_coach() && $current_f
|
|
|
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&forum=".Security::remove_XSS($_GET['forum'])."&thread=".Security::remove_XSS($_GET['thread'])."&action=delete&content=post&id=".$rows[$display_post_id]['post_id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("DeletePost"),ENT_QUOTES,$charset))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>\n";
|
|
|
display_visible_invisible_icon('post', $rows[$display_post_id]['post_id'], $rows[$display_post_id]['visible'],array('forum'=>Security::remove_XSS($_GET['forum']),'thread'=>Security::remove_XSS($_GET['thread']), 'post'=>Security::remove_XSS($_GET['post']) ));
|
|
|
echo "\n";
|
|
|
- if (!isset($_GET['id']) && isset($_GET['post'])) {
|
|
|
+ //verified the post minor
|
|
|
+ $my_post=get_posts($_GET['thread']);
|
|
|
+ $id_posts=array();
|
|
|
+
|
|
|
+ foreach ($my_post as $post_value) {
|
|
|
+ $id_posts[]=$post_value['post_id'];
|
|
|
+ }
|
|
|
+
|
|
|
+ sort($id_posts,SORT_NUMERIC);
|
|
|
+ reset($id_posts);
|
|
|
+ //the post minor
|
|
|
+ $post_minor=$id_posts[0];
|
|
|
+
|
|
|
+ if (!isset($_GET['id']) && (isset($_GET['post']) && $_GET['post']>$post_minor)) {
|
|
|
echo "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".Security::remove_XSS($_GET['forum'])."&thread=".Security::remove_XSS($_GET['thread'])."&origin=".$origin."&action=move&post=".$rows[$display_post_id]['post_id']."\">".icon('../img/deplacer_fichier.gif',get_lang('MovePost'))."</a>\n";
|
|
|
}
|
|
|
}
|