Commit da1de1df authored by Dries's avatar Dries

- Patch #35205 by stefan: removed some deprecated code from forum.module! Yay.

parent 0f373580
......@@ -239,7 +239,7 @@ function _forum_parent_select($tid, $title, $child_type) {
if ($tree) {
foreach ($tree as $term) {
if (!in_array($term->tid, $exclude)) {
$options[$term->tid] = _forum_depth($term->depth).$term->name;
$options[$term->tid] = _taxonomy_depth($term->depth) . $term->name;
}
}
}
......@@ -263,10 +263,10 @@ function forum_overview() {
if ($tree) {
foreach ($tree as $term) {
if (in_array($term->tid, variable_get('forum_containers', array()))) {
$rows[] = array(_forum_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/forum/edit/container/$term->tid"));
$rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/forum/edit/container/$term->tid"));
}
else {
$rows[] = array(_forum_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/forum/edit/forum/$term->tid"));
$rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/forum/edit/forum/$term->tid"));
}
}
......@@ -277,19 +277,6 @@ function forum_overview() {
return theme('table', $header, $rows);
}
/**
* Helper function used to generate indentation for forum list
*
* @param $depth Depth of the indentation
* @param $graphic HTML text to be repeated for each stage of depth
*/
function _forum_depth($depth, $graphic = '--') {
for ($n = 0; $n < $depth; $n++) {
$result .= $graphic;
}
return $result;
}
/**
* Returns the vocabulary id for forum navigation.
*/
......
......@@ -239,7 +239,7 @@ function _forum_parent_select($tid, $title, $child_type) {
if ($tree) {
foreach ($tree as $term) {
if (!in_array($term->tid, $exclude)) {
$options[$term->tid] = _forum_depth($term->depth).$term->name;
$options[$term->tid] = _taxonomy_depth($term->depth) . $term->name;
}
}
}
......@@ -263,10 +263,10 @@ function forum_overview() {
if ($tree) {
foreach ($tree as $term) {
if (in_array($term->tid, variable_get('forum_containers', array()))) {
$rows[] = array(_forum_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/forum/edit/container/$term->tid"));
$rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/forum/edit/container/$term->tid"));
}
else {
$rows[] = array(_forum_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/forum/edit/forum/$term->tid"));
$rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/forum/edit/forum/$term->tid"));
}
}
......@@ -277,19 +277,6 @@ function forum_overview() {
return theme('table', $header, $rows);
}
/**
* Helper function used to generate indentation for forum list
*
* @param $depth Depth of the indentation
* @param $graphic HTML text to be repeated for each stage of depth
*/
function _forum_depth($depth, $graphic = '--') {
for ($n = 0; $n < $depth; $n++) {
$result .= $graphic;
}
return $result;
}
/**
* Returns the vocabulary id for forum navigation.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment