#!/usr/bin/perl

###############################################################################
#
# T_Init.pl - Topic Editing Functions
#
# AUTHOR:	Shawn Stepper, wiTHinc Inc.
# AUTHOR:	George Toye, wiTHinc Inc.
# DATE:		$Date: 2001/08/21 17:50:51 $ (last modified)
# COPYRIGHT:	1998, 1999, 2000, 2001 wiTHinc Inc. All Rights Reserved.
#
###############################################################################

$FileRevision = '$Id: T_Init.pl,v 1.6.2.2 2001/08/21 17:50:51 stepper Exp $';
$Version = '1.4.0';

if (@ARGV[0] eq "-v" || @ARGV[0] eq "--version") {
	print "File:		$0\n";
	print "Revision:	$FileRevision\n";
	print "Version:	$Version\n";
	exit();
}

1;

sub gettopsubjectlist {
	local($Subject) = @_;
	local(@junk, $DB_Key, $dbfile, @ls);

	# Get the listing from the database
	$dbfile = $C_rootpath . "/" . $DIR_CLASSFORUM . "/" . $DBFILE_FSUBJ;
	
	foreach (`$prtDB $dbfile -tbtree -a`) {
		($DB_Key, @junk) = split(/\t/, $_);
		if ($DB_Key !~ /\//) {
				push(@ls, $DB_Key); 
		}
	}
	
	return @ls;
}
