Set how order from the post list - refs BT#9892 #TMI

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 68bba34521
commit f3f0fbfcfb
  1. 4
      main/forum/viewthread_flat.inc.php
  2. 4
      main/forum/viewthread_nested.inc.php
  3. 3
      main/forum/viewthread_threaded.inc.php

@ -20,8 +20,10 @@ $_user = api_get_user_info();
$userId = api_get_user_id();
$groupId = api_get_group_id();
$sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : 'ASC';
if (isset($current_thread['thread_id'])) {
$rows = getPosts($current_thread['thread_id']);
$rows = getPosts($current_thread['thread_id'], $sortDirection);
$increment = 0;
$clean_forum_id = intval($_GET['forum']);
$clean_thread_id = intval($_GET['thread']);

@ -22,7 +22,9 @@ if (isset($_GET['action']) &&
delete_attachment(0, $_GET['id_attach']);
}
$rows = getPosts($_GET['thread'], 'ASC', true);
$sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : 'ASC';
$rows = getPosts($_GET['thread'], $sortDirection, true);
$count = 0;
$clean_forum_id = intval($_GET['forum']);
$clean_thread_id = intval($_GET['thread']);

@ -23,7 +23,8 @@
$forumUrl = api_get_path(WEB_CODE_PATH) . 'forum/';
$_user = api_get_user_info();
$rows = getPosts($_GET['thread'], 'ASC', true);
$sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : 'ASC';
$rows = getPosts($_GET['thread'], $sortDirection, true);
$sessionId = api_get_session_id();
$currentThread = get_thread_information($_GET['thread']);
$post_id = isset($_GET['post']) ? (int) $_GET['post'] : 0;

Loading…
Cancel
Save