Feature #16920 » 0004886.patch

Administrator Admin, 2007-01-30 09:28

View differences:

typo3/alt_menu.php (Arbeitskopie)
111 111
		$TBE_TEMPLATE->docType='xhtml_trans';
112 112
		$TBE_TEMPLATE->divClass='vertical-menu';
113 113
		$TBE_TEMPLATE->bodyTagAdditions = 'onload="top.restoreHighlightedModuleMenuItem()"';
114
		$TBE_TEMPLATE->JScodeArray[] = "
115
		function refresh_menu() { window.setTimeout('_refresh_menu();',0); }
116
		function _refresh_menu()	{
117
			var r = new Date();
118
			// randNum is useful so pagetree does not get cached in browser cache when refreshing
119
			window.location.href = 'alt_menu.php?randNum='+r.getTime();
120
		}
121
";
122
		
114 123
		$this->content.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
115 124
		$backPath = $GLOBALS['BACK_PATH'];
116 125

  
typo3/mod/tools/em/class.em_index.php (Arbeitskopie)
318 318
	var $inst_keys = array();			// Storage of installed extensions
319 319
	var $gzcompress = 0;				// Is set true, if system support compression.
320 320

  
321
	var $terConnection;			// instance of TER connection handler
321
	var $terConnection;					// instance of TER connection handler
322
	var $JScode;						// JavaScript code to be forwared to $this->doc->JScode
322 323

  
323 324
		// GPvars:
324 325
	var $CMD = array();					// CMD array
......
394 395
			function jumpToUrl(URL)	{	//
395 396
				window.location.href = URL;
396 397
			}
398
			'.$this->JScode.'
397 399
		');
398 400
		$this->doc->form = '<form action="index.php" method="post" name="pageform">';
399 401

  
......
411 413
	}
412 414

  
413 415
	/**
416
	 * This method triggers a restart of this instance.
417
	 *
418
	 * @param	array	$getParams: Array of GET parameters to include
419
	 * @return	void
420
	 */
421
	function restart($getParams=array()) {
422
			// Handle GET parameters to include:
423
		$params = t3lib_div::_GET();
424
		foreach($getParams as $k => $v)	{
425
			if (strcmp($v,''))	{
426
				$params[$k]=$v;
427
			} else unset($params[$k]);
428
		}
429
		t3lib_div::_GETset($params);
430

  
431
			// Reset content:
432
		$this->content = '';
433
			// Reload loaded extensions TCA, etc:
434
		$this->refreshGlobalExtList();
435
			// Restart like index.php would have done:
436
		$this->init();
437
		$this->checkExtObj();
438
		$this->main();
439
		$this->printContent();
440
	}
441

  
442
	/**
414 443
	 * This function is a copy of the same function in t3lib_SCbase with one modification:
415 444
	 * In contrast to t3lib_SCbase::handleExternalFunctionValue() this function merges the $this->extClassConf array
416 445
	 * instead of overwriting it. That was necessary for including the Kickstarter as a submodule into the 'singleDetails'
......
1927 1956
							} else {
1928 1957
								$vA = array('CMD'=>Array('showExt'=>$extKey));
1929 1958
							}
1959
								// Determine if modules were affected:
1960
							$techInfo = $this->makeDetailedExtensionAnalysis($extKey, $list[$extKey]);
1961
							$changedModules = count($techInfo['moduleNames'])>0 ? true : false;
1962
								// Extension was installed stand-alone in a separate window:
1930 1963
							if($this->CMD['standAlone'] || t3lib_div::_GP('standAlone')) {
1931
								$this->content .= 'Extension has been '.($this->CMD['load'] ? 'installed' : 'removed').'.<br /><br /><a href="javascript:opener.top.content.document.forms[0].submit();window.close();">Close window and recheck dependencies</a>';
1964
								if ($changedModules) {
1965
									$refreshMenu = 'opener.top.menu.refresh_menu();';
1966
								}
1967
								$this->content .= 'Extension has been '.($this->CMD['load'] ? 'installed' : 'removed').'.<br /><br /><a href="javascript:opener.top.content.document.forms[0].submit();'.$refreshMenu.'window.close();">Close window and recheck dependencies</a>';
1968
								// Modules were installed or remove, so we have to reload the menu frame:
1969
							} elseif($changedModules) {
1970
								$this->JScode = 'top.menu.refresh_menu();';
1971
								$this->restart($vA);
1972
								exit;
1973
								// No modules were affected:
1932 1974
							} else {
1933 1975
								header('Location: '.t3lib_div::linkThisScript($vA));
1934 1976
							}
(1-1/3)