Project

General

Profile

Feature #17988 » 7140.patch

Administrator Admin, 2008-02-29 16:57

View differences:

C:/workspace/TYPO3_4-2/typo3/mod/tools/em/class.em_index.php (working copy)
// Initialize Document Template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/em_index.html');
$this->doc->setModuleTemplate('templates/em_index.html');
$this->doc->docType='xhtml_trans';
// JavaScript
......
break;
}
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array(
'CSH' => $docHeaderButtons['csh'],
'FUNC_MENU' => $this->getFuncMenu(),
'CONTENT' => $this->content
);
);
// Build the <body> for the module
$this->content = $this->doc->startPage('Extension Manager');
......
echo $this->content;
}
}
/**
* Create the function menu
*
......
} elseif($this->CMD['showExt'] && (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone'))) {
$funcMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[singleDetails]', $this->MOD_SETTINGS['singleDetails'], $this->MOD_MENU['singleDetails'], '', '&CMD[showExt]=' . $this->CMD['showExt']);
}
return $funcMenu;
return $funcMenu;
}
/**
......
* @return array all available buttons as an assoc. array
*/
private function getButtons() {
$buttons = array(
'csh' => '',
'back' => '',
......
);
// CSH
//$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
// Shortcut
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('CMD','function',$this->MCONF['name']);
......
if(($this->CMD['showExt'] && (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone'))) || ($this->CMD['importExt'] || $this->CMD['uploadExt'] && (!$this->CMD['standAlone'])) || $this->CMD['importExtInfo']) {
$buttons['back'] = '<a href="index.php" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/goback.gif') . ' title="Go back" class="absmiddle" alt="" /></a>';
}
return $buttons;
}
......
switch($metaType) {
case 'mirrors':
$mfile = t3lib_div::tempnam('mirrors');
$mirrorsFile = t3lib_div::getURL($this->MOD_SETTINGS['mirrorListURL']);
$mirrorsFile = t3lib_div::getURL($this->MOD_SETTINGS['mirrorListURL'], 0, array('User-Agent: TYPO3/'.TYPO3_version));
if($mirrorsFile===false) {
t3lib_div::unlink_tempfile($mfile);
$content = '<p>The mirror list was not updated, it could not be fetched from '.$this->MOD_SETTINGS['mirrorListURL'].'. Possible reasons: network problems, allow_url_fopen is off, curl is not enabled in Install tool.</p>';
......
$mirror = $this->getMirrorURL();
$extfile = $mirror.'extensions.xml.gz';
$extmd5 = t3lib_div::getURL($mirror.'extensions.md5');
$extmd5 = t3lib_div::getURL($mirror.'extensions.md5', 0, array('User-Agent: TYPO3/'.TYPO3_version));
if (is_file(PATH_site.'typo3temp/extensions.xml.gz')) {
$localmd5 = md5_file(PATH_site.'typo3temp/extensions.xml.gz');
}
......
} elseif($extmd5 == $localmd5) {
$content .= '<p>The extension list has not changed remotely, it has thus not been fetched.</p>';
} else {
$extXML = t3lib_div::getURL($extfile);
$extXML = t3lib_div::getURL($extfile, 0, array('User-Agent: TYPO3/'.TYPO3_version));
if($extXML === false) {
$content .= '<p>Error: The extension list could not be fetched from '.$extfile.'. Possible reasons: network problems, allow_url_fopen is off, curl is not enabled in Install tool.</p>';
} else {
C:/workspace/TYPO3_4-2/typo3/mod/tools/em/class.em_terconnection.php (working copy)
*/
function fetchExtension($extKey, $version, $expectedMD5, $mirrorURL) {
$mirrorURL .= $extKey{0}.'/'.$extKey{1}.'/'.$extKey.'_'.$version.'.t3x';
$t3x = t3lib_div::getURL($mirrorURL);
$t3x = t3lib_div::getURL($mirrorURL, 0, array('User-Agent: TYPO3/'.TYPO3_version));
$MD5 = md5($t3x);
if($t3x===false) return 'The T3X file could not be fetched. Possible reasons: network problems, allow_url_fopen is off, curl is not enabled in Install tool.';
......
*/
function fetchTranslation($extKey, $lang, $mirrorURL) {
$mirrorURL .= $extKey{0}.'/'.$extKey{1}.'/'.$extKey.'-l10n/'.$extKey.'-l10n-'.$lang.'.zip';
$l10n = t3lib_div::getURL($mirrorURL);
$l10n = t3lib_div::getURL($mirrorURL, 0, array('User-Agent: TYPO3/'.TYPO3_version));
if($l10n !== false) {
return array($l10n);
......
function fetchTranslationStatus($extKey, $mirrorURL) {
$url = $mirrorURL . $extKey{0}.'/'.$extKey{1}.'/'.$extKey.'-l10n/'.$extKey.'-l10n.xml';
$remote = t3lib_div::getURL($url);
$remote = t3lib_div::getURL($url, 0, array('User-Agent: TYPO3/'.TYPO3_version));
if($remote !== false) {
$parsed = $this->emObj->xmlhandler->parseL10nXML($remote);
......
);
}
// END for Bug #5919
// Compile data for SOAP call:
$accountData = array(
'username' => $em['user']['fe_u'],
(1-1/2)