Index: admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linodef/modules/linodef_taglists/includes/admin.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 admin.inc
--- admin.inc	19 Dec 2009 02:38:17 -0000	1.1.2.2
+++ admin.inc	25 Mar 2010 15:37:09 -0000
@@ -122,8 +122,6 @@
 			$widget_array = linodef_taglists_widgets();
 			$properties_array['widget']['#title'] = t('Widget');
 			$properties_array['widget']['#value'] = $widget_array[$taglist->properties['widget']]['#title'];
-			$properties_array['comment']['#title'] = t('Comments');
-			$properties_array['comment']['#value'] = $taglist->properties['comment'] ? t('yes') : t('no');
 			$properties_array['sort']['#title'] = t('Sort');
 			if ($taglist->properties['sort_sequence'] == 'as view' || $taglist->properties['sort_sequence'] == 'as vocabulary') {
 				$properties_array['sort']['#value'] = $taglist->properties['sort_sequence'];
@@ -135,6 +133,12 @@
 			foreach ($properties_array as $value) {
 				$properties .= $value['#title'] . ': ' . l($value['#value'], 'admin/build/taglists/nojs/' . $taglist->tlid . '/edit/options', array('attributes' => array('class' => 'use-ajax', 'title' => t('Edit')), 'html' => TRUE)) . '<br />';
 			}
+			if ($taglist->properties['comment'] || $taglist->properties['show_unpublished']) {
+				$properties .= '<span class="description">' . t('Includes') . ' ';
+				$properties .= $taglist->properties['comment'] ? t('default comments') : '';
+				$properties .= $taglist->properties['show_unpublished'] ? $taglist->properties['comment'] ? ', ' . t('unpublished nodes') . '.' : t('unpublished nodes') . '.' : '.';
+				$properties .= '</span>';
+			}
 
 			// Taglist fields.
 			$form['id'][$taglist->tlid] = array('#value' => check_plain($taglist->tlid));
@@ -681,10 +685,19 @@
 		'#title' => t('Include comment into tags'),
 		'#default_value' => $form_state['taglist']->properties['comment'] ? $form_state['taglist']->properties['comment'] : 0,
 		'#description' => theme('advanced_help_topic', 'linodef', 'filter_comments') .' '. t('The taglist will include a predefined comment into the tags.') . ' ' . $comment_description,
-		'#attributes' => array('class' => 'container-inline'),
 		'#disabled' => $disabled_comment
 	);
 
+	// Show unpublished nodes.
+	if ($form_state['taglist']->sourcetype == 'contenttype') {
+		$form['properties']['show_unpublished'] = array(
+			'#type' => 'checkbox',
+			'#title' => t('Show unpublished nodes'),
+			'#default_value' => $form_state['taglist']->properties['show_unpublished'] ? $form_state['taglist']->properties['show_unpublished'] : 0,
+			'#description' => t('Unpublished nodes will be listed in the taglist.'),
+		);
+	}
+
 	// Options.
 	$supported_tags = new linodef_tags;
 	foreach ($supported_tags->valid_options as $key => $value) {
@@ -807,6 +820,7 @@
 	$form_state['taglist']->properties['sort_method'] = $form_state['values']['sort_method'];
 	$form_state['taglist']->properties['comment'] = $form_state['values']['comment'];
 	$form_state['taglist']->properties['description_override'] = $form_state['values']['description_override'];
+	$form_state['taglist']->properties['show_unpublished'] = $form_state['values']['show_unpublished'];
 	// Reset old tagoptions.
 	$form_state['taglist']->tagoptions = array();
 	foreach ($form_state['values'] as $option => $value) {
Index: taglist.load.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linodef/modules/linodef_taglists/includes/taglist.load.inc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 taglist.load.inc
--- taglist.load.inc	12 Dec 2009 00:40:55 -0000	1.1.2.1
+++ taglist.load.inc	25 Mar 2010 15:04:05 -0000
@@ -203,8 +203,12 @@
 function _linodef_taglists_getnodesbycontenttype($contenttype, $option_string, $tl_properties) {
 	if ($ctype_obj = node_get_types('type', $contenttype)) {
 		$i = 0;
-		//$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "%s"', $contenttype);
-		$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "%s" order by n.%s %s', $contenttype, $tl_properties['sort_method'], $tl_properties['sort_sequence']);
+		if ($tl_properties['show_unpublished']) {
+			$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "%s" order by n.%s %s', $contenttype, $tl_properties['sort_method'], $tl_properties['sort_sequence']);
+		}
+		else {
+			$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "%s" AND n.status > 0 order by n.%s %s', $contenttype, $tl_properties['sort_method'], $tl_properties['sort_sequence']);
+		}
 		while ($ergebnis = db_fetch_object($result)) {
 			if ($ergebnis->nid && $node = node_load($ergebnis->nid)) {
 				if (node_access('view', $node)) {

