diff --git a/modules/forum/forum-topic-navigation.tpl.php b/modules/forum/forum-topic-navigation.tpl.php deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/modules/forum/forum.css b/modules/forum/forum.css index 1fc37f049e43a0843dcc9ad72465cc085d63d25e..f8dcab54404d21fb03afe37bf97943ce9fb41031 100644 --- a/modules/forum/forum.css +++ b/modules/forum/forum.css @@ -20,20 +20,3 @@ margin-left: 20px; } -.forum-topic-navigation { - padding: 1em 0 0 3em; /* LTR */ - border-top: 1px solid #888; - border-bottom: 1px solid #888; - text-align: center; - padding: 0.5em; -} -.forum-topic-navigation .topic-previous { - text-align: right; /* LTR */ - float: left; /* LTR */ - width: 46%; -} -.forum-topic-navigation .topic-next { - text-align: left; /* LTR */ - float: right; /* LTR */ - width: 46%; -} diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 4bbef282980256a31b310ae46a4794d4a8f5897c..c6816ac807235a313690f7ebd9eed7e113899963 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -53,10 +53,6 @@ function forum_theme() { 'template' => 'forum-icon', 'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0), ), - 'forum_topic_navigation' => array( - 'template' => 'forum-topic-navigation', - 'arguments' => array('node' => NULL), - ), 'forum_submitted' => array( 'template' => 'forum-submitted', 'arguments' => array('topic' => NULL), @@ -212,12 +208,6 @@ function forum_node_view($node, $build_mode) { } drupal_set_breadcrumb($breadcrumb); - if ($build_mode == 'full') { - $node->content['forum_navigation'] = array( - '#markup' => theme('forum_topic_navigation', $node), - '#weight' => 100, - ); - } } } } @@ -993,52 +983,6 @@ function template_preprocess_forum_icon(&$variables) { } } -/** - * Preprocess variables to format the next/previous forum topic navigation links. - * - * $variables contains $node. - * - * @see forum-topic-navigation.tpl.php - * @see theme_forum_topic_navigation() - */ -function template_preprocess_forum_topic_navigation(&$variables) { - $output = ''; - - // Get previous and next topic. - $query = db_select('node', 'n'); - $query->join('node_comment_statistics', 'ncs', 'n.nid = ncs.nid'); - $query->join('forum', 'f', 'n.vid = f.vid AND f.tid = :tid', array(':tid' => isset($variables['node']->tid) ? $variables['node']->tid : 0)); - - $order = _forum_get_topic_order(variable_get('forum_order', 1)); - $result = $query - ->fields('n', array('nid', 'title', 'sticky')) - ->fields('ncs', array('comment_count', 'last_comment_timestamp')) - ->condition('n.status', 1) - ->addTag('node_access') - ->orderBy('n.sticky', 'DESC') - ->orderBy($order['field'], strtoupper($order['sort'])) - ->execute(); - - $stop = $variables['prev'] = $variables['next'] = 0; - - foreach ($result as $topic) { - if ($stop == 1) { - $variables['next'] = $topic->nid; - $variables['next_title'] = check_plain($topic->title); - $variables['next_url'] = url("node/$topic->nid"); - break; - } - if ($topic->nid == $variables['node']->nid) { - $stop = 1; - } - else { - $variables['prev'] = $topic->nid; - $variables['prev_title'] = check_plain($topic->title); - $variables['prev_url'] = url("node/$topic->nid"); - } - } -} - /** * Process variables to format submission info for display in the forum list and topic list. * diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 05070ae4d4dba42f78890439dbaab0355e650e28..8d1bda40591a6440de3d9ad24967a4b16c608903 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -692,9 +692,6 @@ function hook_theme($existing, $type, $theme, $path) { 'forum_icon' => array( 'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0), ), - 'forum_topic_navigation' => array( - 'arguments' => array('node' => NULL), - ), ); }