Feature #16884 » ter-3.diff
dummy2/typo3/mod/tools/em/class.em_index.php 2007-08-29 21:11:27.000000000 +0200 | ||
---|---|---|
2 => 'Import extensions',
|
||
4 => 'Translation handling',
|
||
3 => 'Settings',
|
||
5 => 'Check for extension updates',
|
||
),
|
||
'listOrder' => array(
|
||
'cat' => 'Category',
|
||
... | ... | |
'display_own' => '',
|
||
'display_unchecked' => '',
|
||
'display_obsolete' => '',
|
||
'display_installed' => '',
|
||
'display_files' => '',
|
||
'singleDetails' => array(
|
||
'info' => 'Information',
|
||
... | ... | |
$menu.=' Group by: '.t3lib_BEfunc::getFuncMenu(0,'SET[listOrder]',$this->MOD_SETTINGS['listOrder'],$this->MOD_MENU['listOrder']).
|
||
' Show: '.t3lib_BEfunc::getFuncMenu(0,'SET[display_details]',$this->MOD_SETTINGS['display_details'],$this->MOD_MENU['display_details']).'<br />';
|
||
}
|
||
if (t3lib_div::inList('0,1',$this->MOD_SETTINGS['function'])) {
|
||
if (t3lib_div::inList('0,1,5',$this->MOD_SETTINGS['function'])) {
|
||
$menu.='<label for="checkDisplayShy">Display shy extensions:</label> '.t3lib_BEfunc::getFuncCheck(0,'SET[display_shy]',$this->MOD_SETTINGS['display_shy'],'','','id="checkDisplayShy"');
|
||
}
|
||
if (t3lib_div::inList('2',$this->MOD_SETTINGS['function']) && strlen($this->fe_user['username'])) {
|
||
... | ... | |
// Allows to set the translation preferences and check the status
|
||
$this->translationHandling();
|
||
break;
|
||
case '5':
|
||
// Shows a list of extensions with updates in TER
|
||
$this->ter_update_check();
|
||
break;
|
||
default:
|
||
$this->extObjContent();
|
||
break;
|
||
... | ... | |
);
|
||
} else return true;
|
||
}
|
||
/*******************************
|
||
*
|
||
* TER Update Check
|
||
*
|
||
******************************/
|
||
function ter_update_check() {
|
||
global $LANG;
|
||
if(is_file(PATH_site.'typo3temp/extensions.xml.gz')) {
|
||
$tmp = $this->ter_doShow();
|
||
$tmp .= t3lib_BEfunc::getFuncCheck(0, 'SET[display_installed]', $this->MOD_SETTINGS['display_installed']).' '.
|
||
$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_nle'). '<br/>';
|
||
$tmp .= t3lib_BEfunc::getFuncCheck(0, 'SET[display_files]', $this->MOD_SETTINGS['display_files']).' '.
|
||
$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_files');
|
||
$content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_upd_ext'), $tmp, 0, 1);
|
||
}
|
||
$tmp = '';
|
||
if(is_file(PATH_site.'typo3temp/extensions.xml.gz')) {
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:note_last_update').' '.date('Y-m-d H:i',filemtime(PATH_site.'typo3temp/extensions.xml.gz')).'<br />';
|
||
}
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:note_last_update2');
|
||
$content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_vers_ret'), $tmp, 0, 1);
|
||
$this->content .= $content;
|
||
}
|
||
function ter_doShow() {
|
||
global $LANG;
|
||
$tmp = & $this->getInstalledExtensions();
|
||
$list = & $tmp[0];
|
||
$content[] = '<table border="0" cellpadding="2" cellspacing="1">'.
|
||
'<tr class="bgColor5">'.
|
||
'<td></td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_name').'</td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_key').'</td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_loc_ver').'</td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_rem_ver').'</td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_location').'</td>'.
|
||
'<td>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_comment').'</td>'.
|
||
'</tr>';
|
||
reset($list);
|
||
while (list($name,) = each($list)) {
|
||
$data = & $list[$name];
|
||
$this->xmlhandler->searchExtensionsXML($name, '', '', false, true);
|
||
if(!is_array($this->xmlhandler->extensionsXML[$name])) continue;
|
||
$v = & $this->xmlhandler->extensionsXML[$name][versions];
|
||
$versions = array_keys($v);
|
||
$lastversion = end($versions);
|
||
if( (t3lib_extMgm::isLoaded($name) || $this->MOD_SETTINGS['display_installed']) &&
|
||
($data[EM_CONF][shy] == 0 || $this->MOD_SETTINGS['display_shy']) &&
|
||
$this->versionDifference($lastversion, $data[EM_CONF][version], 1))
|
||
{
|
||
$imgInfo = @getImageSize($this->getExtPath($name,$data['type']).'/ext_icon.gif');
|
||
if (is_array($imgInfo)) {
|
||
$icon = '<img src="'.$GLOBALS['BACK_PATH'].$this->typeRelPaths[$data['type']].$name.'/ext_icon.gif'.'" '.$imgInfo[3].' alt="" />';
|
||
} elseif ($extInfo['_ICON']) {
|
||
$icon = $extInfo['_ICON'];
|
||
} else {
|
||
$icon = '<img src="clear.gif" width="1" height="1" alt="" />';
|
||
}
|
||
$comment = '<table cellpadding="0" cellspacing="0" width="100%">';
|
||
foreach($versions as $vk) {
|
||
$va = & $v[$vk];
|
||
if(t3lib_div::int_from_ver($vk) < t3lib_div::int_from_ver($data[EM_CONF][version])) continue;
|
||
$comment .= '<tr><td valign="top" style="padding-right:2px;border-bottom:1px dotted gray">'.$vk.'</td>'.
|
||
'<td valign="top" style="border-bottom:1px dotted gray">'.nl2br($va[uploadcomment]).'</td></tr>';
|
||
}
|
||
$comment .= '</table>';
|
||
$currentMd5Array = $this->serverExtensionMD5Array($name,$data);
|
||
$warn = '';
|
||
if (strcmp($data['EM_CONF']['_md5_values_when_last_written'],serialize($currentMd5Array))) {
|
||
$warn = '<tr class="bgColor4" style="color:red"><td colspan="7">'.$GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>'.$name.': '.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_warn_diff').'</strong>').'</td></tr>'."\n";
|
||
if($this->pObj->MOD_SETTINGS['display_files'] == 1) {
|
||
$affectedFiles = $this->findMD5ArrayDiff($currentMd5Array,unserialize($data['EM_CONF']['_md5_values_when_last_written']));
|
||
if (count($affectedFiles))
|
||
$warn .= '<tr class="bgColor4"><td colspan="7"><strong>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_modified').'</strong><br />'.$GLOBALS['TBE_TEMPLATE']->rfw(implode('<br />',$affectedFiles)).'</td></tr>'."\n";
|
||
}
|
||
}
|
||
$content[] = '<tr class="bgColor4"><td valign="top">'.$icon.'</td>'.
|
||
'<td valign="top"><a href="?CMD[importExtInfo]='.$name.'">'.$data[EM_CONF][title].'</a></td>'.
|
||
'<td valign="top">'.$name.'</td>'.
|
||
'<td valign="top" align="right">'.$data[EM_CONF][version].'</td>'.
|
||
'<td valign="top" align="right">'.$lastversion.'</td>'.
|
||
'<td valign="top" nowrap="nowrap">'.$this->typeLabels[$data['type']].(strlen($data['doubleInstall'])>1?'<strong> '.$GLOBALS['TBE_TEMPLATE']->rfw($extInfo['doubleInstall']).'</strong>':'').'</td>'.
|
||
'<td valign="top">'.$comment.'</td></tr>'."\n".
|
||
$warn.
|
||
'<tr class="bgColor4"><td colspan="7"><hr style="margin:0px" /></td></tr>'."\n";
|
||
}
|
||
}
|
||
$content[] = '</table><br/>';
|
||
$this->content .= implode('',$content);
|
||
}
|
||
}
|
||
// Include extension?
|
dummy2/typo3/sysext/lang/locallang_mod_tools_em.xml 2007-01-27 16:59:40.520761714 +0100 | ||
---|---|---|
<label index="mlang_labels_tablabel">TYPO3 Extension Manager</label>
|
||
<label index="mlang_labels_tabdescr">Manages TYPO3 extensions from a central repository, which includes plugins, modules, class extensions, configuration code etc.</label>
|
||
<label index="mlang_tabs_tab">Ext Manager</label>
|
||
<label index="display_nle">Include not loaded extensions into listing</label>
|
||
<label index="display_files">Display the list of changed files</label>
|
||
<label index="header_upd_ext">Updated extensions</label>
|
||
<label index="header_vers_ret">Version information</label>
|
||
<label index="tab_mod_name">Extension</label>
|
||
<label index="tab_mod_key">Ext-Key</label>
|
||
<label index="tab_mod_loc_ver">Local</label>
|
||
<label index="tab_mod_rem_ver">Remote</label>
|
||
<label index="tab_mod_comment">Upload-Comment</label>
|
||
<label index="tab_mod_location">Location</label>
|
||
<label index="msg_warn_diff">A difference between the originally installed version and the current was detected!</label>
|
||
<label index="msg_modified">Modified Files:</label>
|
||
<label index="note_last_update">Last update of list of extensions:</label>
|
||
<label index="note_last_update2">Use "Retrieve/Update" in "Import Extensions" section to get/update the list.</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|