Feature #16920 » 0004886_2.patch

Administrator Admin, 2007-01-30 13:40

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
			// Reset POST parameters:
431
		t3lib_div::_POSTset(array());
432
			// Reset content:
433
		$this->content = '';
434
			// Reload loaded extensions TCA, etc:
435
		$this->refreshGlobalExtList();
436
			// Restart like index.php would have done:
437
		$this->init();
438
		$this->checkExtObj();
439
		$this->main();
440
		$this->printContent();
441
	}
442

  
443
	/**
414 444
	 * This function is a copy of the same function in t3lib_SCbase with one modification:
415 445
	 * In contrast to t3lib_SCbase::handleExternalFunctionValue() this function merges the $this->extClassConf array
416 446
	 * instead of overwriting it. That was necessary for including the Kickstarter as a submodule into the 'singleDetails'
......
1927 1957
							} else {
1928 1958
								$vA = array('CMD'=>Array('showExt'=>$extKey));
1929 1959
							}
1960
								// Determine if modules were affected:
1961
							$techInfo = $this->makeDetailedExtensionAnalysis($extKey, $list[$extKey]);
1962
							$changedModules = is_array($techInfo['flags']) && in_array('Module', $techInfo['flags'], true);
1963
								// Extension was installed stand-alone in a separate window:
1930 1964
							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>';
1965
								if ($changedModules) {
1966
									$refreshMenu = 'opener.top.menu.refresh_menu();';
1967
								}
1968
								$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>';
1969
								// Modules were installed or remove, so we have to reload the menu frame:
1970
							} elseif($changedModules) {
1971
								$this->JScode = 'top.menu.refresh_menu();';
1972
								$this->restart($vA);
1973
								exit;
1974
								// No modules were affected:
1932 1975
							} else {
1933 1976
								header('Location: '.t3lib_div::linkThisScript($vA));
1934 1977
							}
t3lib/class.t3lib_div.php (Arbeitskopie)
322 322
	}
323 323

  
324 324
	/**
325
	 * Writes input value to $_POST
326
	 * Usage: 1
327
	 *
328
	 * @param	array		Array to write to $_POST. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
329
	 * @param	string		Alternative key; If set, this will not set the WHOLE POST array, but only the key in it specified by this value!
330
	 * @return	void
331
	 */
332
	function _POSTset($inputPost,$key='')	{
333
			// ADDS slashes since TYPO3 standard currently is that slashes MUST be applied (regardless of magic_quotes setting).
334
		if (strcmp($key,''))	{
335
			if (is_array($inputPost))	{ t3lib_div::addSlashesOnArray($inputPost); } else { $inputPost = addslashes($inputPost); }
336
			$GLOBALS['HTTP_POST_VARS'][$key] = $_POST[$key] = $inputPost;
337
		} elseif (is_array($inputPost)){
338
			t3lib_div::addSlashesOnArray($inputPost);
339
			$GLOBALS['HTTP_POST_VARS'] = $_POST = $inputPost;
340
		}
341
	}
342

  
343
	/**
325 344
	 * GET/POST variable
326 345
	 * Returns the 'GLOBAL' value of incoming data from POST or GET, with priority to POST (that is equalent to 'GP' order)
327 346
	 * Strips slashes of string-outputs, but not arrays UNLESS $strip is set. If $strip is set all output will have escaped characters unescaped.
(2-2/3)