Index: t3lib/class.t3lib_querygenerator.php
===================================================================
--- t3lib/class.t3lib_querygenerator.php	(Revision 3043)
+++ t3lib/class.t3lib_querygenerator.php	(Arbeitskopie)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2001-2006 Christian Jul Jensen (christian@typo3.com)
+*  (c) 2001-2008 Christian Jul Jensen (christian@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -233,12 +233,14 @@
 	var $enableQueryParts = 0;
 	var $extJSCODE='';
 
+	protected $formName = '';
 
 
 
 
 
 
+
 	/**
 	 * @return	[type]		...
 	 */
@@ -629,11 +631,11 @@
 					if ($conf['comparison']==100 || $conf['comparison']==101)	{	// between
 						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue]_hr'.'" value="'.strftime('%e-%m-%Y', $conf['inputValue']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue]\', \'date\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue']).'" name="'.$this->name.$subscript.'[inputValue]'.'">';
 						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue1]_hr'.'" value="'.strftime('%e-%m-%Y', $conf['inputValue1']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue1]\', \'date\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue1']).'" name="'.$this->name.$subscript.'[inputValue1]'.'">';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", '.date.', "", 0,0);';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue1]", '.date.', "", 0,0);';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", "date", "", 0,0);';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue1]", "date", "", 0,0);';
 					} else {
 						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue]_hr'.'" value="'.strftime('%e-%m-%Y', $conf['inputValue']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue]\', \'date\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue']).'" name="'.$this->name.$subscript.'[inputValue]'.'">';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", '.date.', "", 0,0);';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", "date", "", 0,0);';
 					}
 				break;
 				case 'time':
@@ -644,11 +646,11 @@
 					if ($conf['comparison']==100 || $conf['comparison']==101)	{	// between:
 						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue]_hr'.'" value="'.strftime('%H:%M %e-%m-%Y', $conf['inputValue']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue]\', \'datetime\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue']).'" name="'.$this->name.$subscript.'[inputValue]'.'">';
 						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue1]_hr'.'" value="'.strftime('%H:%M %e-%m-%Y', $conf['inputValue1']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue1]\', \'datetime\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue1']).'" name="'.$this->name.$subscript.'[inputValue1]'.'">';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", '.datetime.', "", 0,0);';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue1]", '.datetime.', "", 0,0);';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", "datetime", "", 0,0);';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue1]", "datetime", "", 0,0);';
 					} else {
-						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue]_hr'.'" value="'.strftime('%H:%M %e-%m-%Y', $conf['inputValue']).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue]\', \'datetime\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue']).'" name="'.$this->name.$subscript.'[inputValue]'.'">';
-						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", '.datetime.', "", 0,0);';
+						$lineHTML.='<input type="text" name="'.$this->name.$subscript.'[inputValue]_hr'.'" value="'.strftime('%H:%M %e-%m-%Y', intval($conf['inputValue'])).'" '.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' onChange="typo3form.fieldGet(\''.$this->name.$subscript.'[inputValue]\', \'datetime\', \'\', 0,0);"><input type="hidden" value="'.htmlspecialchars($conf['inputValue']).'" name="'.$this->name.$subscript.'[inputValue]'.'">';
+						$this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", "datetime", "", 0,0);';
 					}
 				break;
 				case 'multiple':
@@ -1415,7 +1417,7 @@
 			}
 		}
 		$out='<table border="0" cellpadding="3" cellspacing="1">'.$out.'</table>';
-		$out.=$this->JSbottom();
+		$out.=$this->JSbottom($this->formName);
 		return $out;
 	}
 
@@ -1501,15 +1503,29 @@
 	 * @param	[type]		$formname: ...
 	 * @return	[type]		...
 	 */
-	function JSbottom($formname='forms[0]')	{
+	function JSbottom($formname)	{
 		if ($this->extJSCODE)	{
 			$out.='
 			<script language="javascript" type="text/javascript" src="'.$GLOBALS['BACK_PATH'].'../t3lib/jsfunc.evalfield.js"></script>
 			<script language="javascript" type="text/javascript" src="'.$GLOBALS['BACK_PATH'].'jsfunc.tbe_editor.js"></script>
-			<script language="javascript" type="text/javascript">'.$this->extJSCODE.'</script>';
+			<script language="javascript" type="text/javascript">
+				TBE_EDITOR.formname = "'.$formname.'";
+				TBE_EDITOR.formnameUENC = "'.rawurlencode($formname).'";
+				'.$this->extJSCODE.'
+			</script>';
 			return $out;
 		}
 	}
+
+	/**
+	 * Sets the current name of the input form.
+	 *
+	 * @param	string		$formName: The name of the form.
+	 * @return	void 
+	 */
+	public function setFormName($formName) {
+		$this->formName = trim($formName);
+	}
 }
 
 
Index: t3lib/class.t3lib_fullsearch.php
===================================================================
--- t3lib/class.t3lib_fullsearch.php	(Revision 3043)
+++ t3lib/class.t3lib_fullsearch.php	(Arbeitskopie)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -91,10 +91,12 @@
 	var $formW=48;
 	var $noDownloadB=0;
 
+	protected $formName = '';
 
 
 
 
+
 	/**
 	 * [Describe function...]
 	 *
@@ -218,6 +220,7 @@
 			$qOK = 0;
 				// Show query
 			if ($saveArr['queryTable'])	{
+				/* @var t3lib_queryGenerator */
 				$qGen = t3lib_div::makeInstance('t3lib_queryGenerator');
 				$qGen->init('queryConfig',$saveArr['queryTable']);
 				$qGen->makeSelectorTable($saveArr);
@@ -361,6 +364,9 @@
 			// Query Maker:
 		$qGen = t3lib_div::makeInstance('t3lib_queryGenerator');
 		$qGen->init('queryConfig',$GLOBALS['SOBE']->MOD_SETTINGS['queryTable']);
+		if ($this->formName) {
+			$qGen->setFormName($this->formName);
+		}
 		$tmpCode=$qGen->makeSelectorTable($GLOBALS['SOBE']->MOD_SETTINGS);
 		$output.= $GLOBALS['SOBE']->doc->section('Make query',$tmpCode,0,1);
 
@@ -630,7 +636,7 @@
 		$out.='<td nowrap>';
 		if (!$row['deleted'])	{
 			$out .= '<a href="#" onClick="top.launchView(\''.$table.'\','.$row['uid'].',\''.$GLOBALS['BACK_PATH'].'\');return false;"><img src="'.$GLOBALS['BACK_PATH'].'gfx/zoom2.gif" width="12" height="12" alt="" /></a>';
-			$out .= '<a href="#" onClick="'.t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], t3lib_div::getIndpEnv('REQUEST_URI').t3lib_div::implodeArrayForUrl('SET', t3lib_div::_POST('SET'))).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a>';
+			$out .= '<a href="#" onClick="'.t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], t3lib_div::getIndpEnv('REQUEST_URI').t3lib_div::implodeArrayForUrl('SET', (array)t3lib_div::_POST('SET'))).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a>';
 		} else {
 			$out.= '<a href="'.t3lib_div::linkThisUrl($GLOBALS['BACK_PATH'].'tce_db.php', array('cmd['.$table.']['.$row['uid'].'][undelete]' => '1', 'redirect' => t3lib_div::linkThisScript(array()))).'">';
 			$out.= '<img src="'.$GLOBALS['BACK_PATH'].'gfx/undelete.gif" width="13" height="12" border="0" alt="undelete" only></A>';
@@ -1076,6 +1082,16 @@
 		}
 		return $out;
 	}
+
+	/**
+	 * Sets the current name of the input form.
+	 *
+	 * @param	string		$formName: The name of the form.
+	 * @return	void 
+	 */
+	public function setFormName($formName) {
+		$this->formName = trim($formName);
+	}
 }
 
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_fullsearch.php'])	{
Index: typo3/sysext/lowlevel/dbint/index.php
===================================================================
--- typo3/sysext/lowlevel/dbint/index.php	(Revision 3043)
+++ typo3/sysext/lowlevel/dbint/index.php	(Arbeitskopie)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -102,7 +102,9 @@
 	var $content;
 	var $menu;
 
+	protected $formName = 'queryform';
 
+
 	/**
 	 * Initialization
 	 *
@@ -115,7 +117,7 @@
 		$this->menuConfig();
 
 		$this->doc = t3lib_div::makeInstance('mediumDoc');
-		$this->doc->form='<form action="" method="post">';
+		$this->doc->form='<form action="" method="post" name="'.$this->formName.'">';
 		$this->doc->backPath = $BACK_PATH;
 
 				// JavaScript
@@ -351,6 +353,7 @@
 		global $LANG;
 
 		$fullsearch = t3lib_div::makeInstance('t3lib_fullsearch');
+		$fullsearch->setFormName($this->formName);
 		$this->content.= $this->doc->header($LANG->getLL('search'));
 		$this->content.= $this->doc->spacer(5);
 
