Index: t3lib/class.t3lib_befunc.php
===================================================================
--- t3lib/class.t3lib_befunc.php	(revision 3034)
+++ t3lib/class.t3lib_befunc.php	(working copy)
@@ -2611,43 +2611,88 @@
 	 * Call to update the page tree frame (or something else..?) after
 	 * t3lib_BEfunc::getSetUpdateSignal('updatePageTree') -> will set the page tree to be updated.
 	 * t3lib_BEfunc::getSetUpdateSignal() -> will return some JavaScript that does the update (called in the typo3/template.php file, end() function)
+	 * please use the setUpdateSignal function instead now, as it allows you to add more parameters
 	 * Usage: 11
 	 *
 	 * @param	string		Whether to set or clear the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set.
 	 * @return	string		HTML code (<script> section)
+	 * @see	t3lib_BEfunc::getUpdateSignalCode()
+	 * @see	t3lib_BEfunc::setUpdateSignal()
 	 */
-	function getSetUpdateSignal($set='')	{
+	function getSetUpdateSignal($set = '')	{
+			// kept for backwards compatibility if $set is empty, use "getUpdateSignalCode()" instead
+		if ($set) {
+			return t3lib_BEfunc::setUpdateSignal($set);
+		} else {
+			return t3lib_BEfunc::getUpdateSignalCode();
+		}
+	}
+
+
+	/**
+	 * Call to update the page tree frame (or something else..?) after
+	 * use 'updatePageTree' as a first parameter will set the page tree to be updated.
+	 * Usage: 10
+	 *
+	 * @param	string		Key to set the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set. If empty, all update signals will be removed.
+	 * @param	mixed		Additional information for the update signal, used to only refresh a branch of the tree
+	 * @return	void
+	 * @see	t3lib_BEfunc::getUpdateSignalCode()
+	 */
+	public function setUpdateSignal($set = '', $params = '') {
 		global $BE_USER;
-		$key = 't3lib_BEfunc::getSetUpdateSignal';
-		$out='';
-		if ($set)	{
-			$modData=array();
-			$modData['set']=$set;
-			$BE_USER->pushModuleData($key,$modData);
+		$modData = $BE_USER->getModuleData('t3lib_BEfunc::getUpdateSignal', 'ses');
+
+		if ($set) {
+			$modData[$set] = array(
+				'set' => $set,
+				'parameter' => $params);
 		} else {
-			$modData = $BE_USER->getModuleData($key,'ses');
-			if (trim($modData['set']))	{
-				$l=explode(',',$modData['set']);
-				while(list(,$v)=each($l))	{
-					switch($v)	{
-						case 'updatePageTree':
-						case 'updateFolderTree':
-							$out.='
-					<script type="text/javascript">
-					/*<![CDATA[*/
-							if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)	{
-								top.content.nav_frame.refresh_nav();
-							}
-					/*]]>*/
-					</script>';
-						break;
+			$modData = array();
+		}
+		$BE_USER->pushModuleData('t3lib_BEfunc::getUpdateSignal', $modData);
+	}
+
+
+	/**
+	 * Call to update the page tree frame (or something else..?) if this is set by the function
+	 * setUpdateSignal(). It will return some JavaScript that does the update (called in the typo3/template.php file, end() function)
+	 * Usage: 1
+	 *
+	 * @return	string		HTML javascript code
+	 * @see	t3lib_BEfunc::setUpdateSignal()
+	 */
+	public function getUpdateSignalCode() {
+		$out = '';
+		$modData = $GLOBALS['BE_USER']->getModuleData('t3lib_BEfunc::getUpdateSignal', 'ses');
+
+		if (!count($modData)) {
+			return $out;
+		}
+
+		foreach($modData as $set => $val) {
+			switch ($set) {
+				case 'updatePageTree':
+				case 'updateFolderTree':
+
+					if (isset($val['parameter'])) {
+						$funcName = 'top.content.nav_frame.Tree.refreshBranch('.htmlspecialchars($val['parameter']).');';
+					} else {
+						$funcName = 'top.content.nav_frame.Tree.refresh();';
 					}
-				}
-				$modData=array();
-				$modData['set']='';
-				$BE_USER->pushModuleData($key,$modData);
+
+					$out .= '
+				<script type="text/javascript">
+				/*<![CDATA[*/
+						if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)	{
+							'.$funcName.'
+						}
+				/*]]>*/
+				</script>';
+				break;
 			}
 		}
+		t3lib_BEfunc::setUpdateSignal();
 		return $out;
 	}
 
Index: typo3/tree.js
===================================================================
--- typo3/tree.js	(revision 3034)
+++ typo3/tree.js	(working copy)
@@ -26,7 +26,8 @@
 
 
 var Tree = {
-	thisScript: 'ajax.php',
+	thisScript: top.TS.PATH_typo3 + 'alt_db_navframe.php',
+	ajaxScript: top.TS.PATH_typo3 + 'ajax.php',
 	ajaxID: 'SC_alt_db_navframe::expandCollapse',	// has to be either "SC_alt_db_navframe::expandCollapse" or "SC_alt_file_navframe::expandCollapse"
 	frameSetModule: null,
 	activateDragDrop: true,
@@ -36,7 +37,7 @@
 	load: function(params, isExpand, obj) {
 			// fallback if AJAX is not possible (e.g. IE < 6)
 		if (typeof Ajax.getTransport() != 'object') {
-			window.location.href = this.thisScript + '?ajaxID=' + this.ajaxID + '&PM=' + params;
+			window.location.href = this.thisScript + '?PM=' + params;
 			return;
 		}
 
@@ -55,7 +56,7 @@
 			obj.style.cursor = 'wait';
 		}
 
-		new Ajax.Request(this.thisScript, {
+		new Ajax.Request(this.ajaxScript, {
 			method: 'get',
 			parameters: 'ajaxID=' + this.ajaxID + '&PM=' + params,
 			onComplete: function(xhr) {
@@ -72,13 +73,38 @@
 		});
 	},
 
-	// does the complete page refresh (previously known as "_refresh_nav()")
+		// does the complete page refresh (previously known as "_refresh_nav()")
 	refresh: function() {
 		var r = new Date();
 		// randNum is useful so pagetree does not get cached in browser cache when refreshing
-		window.location.href = '?randNum=' + r.getTime();
+		window.location.href = this.thisScript + '?randNum=' + r.getTime();
 	},
 
+
+		// refreshes only a part of the tree (right now only works with pages)
+		// gets a comma-separated list of page IDs (branches) to update
+	refreshBranch: function(branch) {
+		if (!branch) {
+			this.refresh();
+			return;
+		}
+		branch = String(branch);
+		var branches = ((!branch.include(',')) ? $A(branch) : branch.split(','));
+		branches.each(function(branch) {
+			var itm = $('pages'+branch+'_0');
+			if (!itm) {
+				this.refresh();
+				return;
+			}
+			if (itm.hasClassName('expanded')) {
+				this.load('0_1_'+branch+'_browsePages', 1, itm.firstChild);
+			} else {
+				this.load('0_0_'+branch+'_browsePages', 1, itm.firstChild);
+			}
+		}.bind(this));
+	},
+
+
 	// attaches the events to the elements needed for the drag and drop (for the titles and the icons)
 	registerDragDropHandlers: function() {
 		if (!this.activateDragDrop) return;
@@ -116,7 +142,9 @@
 
 		// Set the new item
 		top.fsMod.navFrameHighlightedID[frameSetModule] = highlightID;
-		if ($(highlightID)) Element.addClassName(highlightID, this.highlightClass);
+		if ($(highlightID)) {
+			Element.addClassName(highlightID, this.highlightClass);
+		}
 	}
 };
 
Index: typo3/template.php
===================================================================
--- typo3/template.php	(revision 3034)
+++ typo3/template.php	(working copy)
@@ -694,7 +694,7 @@
 		$str = $this->sectionEnd().
 				$this->postCode.
 				$this->endPageJS().
-				t3lib_BEfunc::getSetUpdateSignal().
+				t3lib_BEfunc::getUpdateSignalCode().
 				$this->parseTime().
 				($this->form?'
 </form>':'');
Index: typo3/alt_doc.php
===================================================================
--- typo3/alt_doc.php	(revision 3036)
+++ typo3/alt_doc.php	(working copy)
@@ -303,7 +303,11 @@
 
 			// If pages are being edited, we set an instruction about updating the page tree after this operation.
 		if (isset($this->data['pages']))	{
-			t3lib_BEfunc::getSetUpdateSignal('updatePageTree');
+			$pageRecords  = array_keys($this->data['pages']);
+			if (count($pageRecords)) {
+				$pageRecords = implode(',', $pageRecords);
+			}
+			t3lib_BEfunc::setUpdateSignal('updatePageTree', $pageRecords);
 		}
 
 
Index: typo3/alt_file_navframe.php
===================================================================
--- typo3/alt_file_navframe.php	(revision 3034)
+++ typo3/alt_file_navframe.php	(working copy)
@@ -136,6 +136,7 @@
 
 		// setting prefs for foldertree
 		Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";
+		Tree.thisScript = top.TS.PATH_typo3 + "alt_file_navframe.php";
 
 		// Function, loading the list frame from navigation tree:
 		function jumpTo(id, linkObj, highlightID, bank)	{
