Feature #16884 » ter.diff
typo3/mod/tools/em/class.em_index.php (Arbeitskopie) | ||
---|---|---|
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_devupd' => '',
|
||
'display_diff' => '',
|
||
'display_files' => '',
|
||
'singleDetails' => array(
|
||
'info' => 'Information',
|
||
'edit' => 'Edit files',
|
||
... | ... | |
$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.='Display shy extensions: '.t3lib_BEfunc::getFuncCheck(0,'SET[display_shy]',$this->MOD_SETTINGS['display_shy']);
|
||
}
|
||
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($this->CMD[doUpdate]==1) return $this->ter_doUpdate();
|
||
if(is_file(PATH_site.'typo3temp/extensions.xml.gz')) {
|
||
$tmp = $this->ter_doShow();
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_nle').': '.
|
||
t3lib_BEfunc::getFuncCheck(0, 'SET[display_installed]', $this->MOD_SETTINGS['display_installed']) . '<br/>';
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_dev').': '.
|
||
t3lib_BEfunc::getFuncCheck(0, 'SET[display_devupd]', $this->MOD_SETTINGS['display_devupd']) . '<br/>';
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_files').': '.
|
||
t3lib_BEfunc::getFuncCheck(0, 'SET[display_files]', $this->MOD_SETTINGS['display_files']);
|
||
$content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_upd_ext'), $tmp, 0, 1);
|
||
}
|
||
$tmp = '<input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:button_get_vers').'" '.
|
||
'onclick="document.location=\'index.php?SET[function]=5&CMD[doUpdate]=1\';return false;" />';
|
||
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')).')';
|
||
}
|
||
$tmp .= '<br/><br/>';
|
||
$tmp .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_priv_notc'), $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_privacy'));
|
||
$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>';
|
||
$diff = $this->MOD_SETTINGS['display_devupd'] ? 1 : 1000;
|
||
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], $diff))
|
||
{
|
||
$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);
|
||
}
|
||
function ter_doUpdate() {
|
||
global $LANG;
|
||
$tmp = $this->content;
|
||
$this->content = '';
|
||
$this->fetchMetaData('extensions');
|
||
$msg = $this->content;
|
||
$this->content = $tmp;
|
||
$tmp = '';
|
||
if(strpos($msg, 'Error') === false) {
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_succ').'<br/><br/>';
|
||
$tmp .= '<input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:button_show_ext').'" '.
|
||
'onclick="document.location=\'index.php?SET[function]=5\';return false;" />';
|
||
} else {
|
||
$tmp .= $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_fail_ter2');
|
||
}
|
||
$this->content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_vers_ret'), $tmp, 0, 1);
|
||
}
|
||
}
|
||
// Include extension?
|
typo3/sysext/lang/locallang_mod_tools_em.xml (Arbeitskopie) | ||
---|---|---|
<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">Display not loaded extensions too</label>
|
||
<label index="display_dev">Display dev version updates</label>
|
||
<label index="display_shy">Display shy extensions</label>
|
||
<label index="display_files">Display the list of changed files</label>
|
||
<label index="header_upd_ext">Updated extensions</label>
|
||
<label index="header_priv_notc">Privacy notice</label>
|
||
<label index="header_vers_ret">Version retrieval</label>
|
||
<label index="button_get_vers">Get version info from online repository</label>
|
||
<label index="button_show_ext">Show updated extensions</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">Loc:</label>
|
||
<label index="msg_succ">Update successful!</label>
|
||
<label index="msg_fail1">Update not successful. Could not write cache file %s</label>
|
||
<label index="msg_fail2">Error: Response from online repository is not an array!</label>
|
||
<label index="msg_fail_ter2">Error: Could not update MetaData.</label>
|
||
<label index="msg_warn_diff">A difference between the originally installed version and the current was detected!</label>
|
||
<label index="msg_privacy">When you interact with the online repository, server information may be sent and stored in the repository for statistics.</label>
|
||
<label index="msg_modified">Modified Files:</label>
|
||
<label index="note_last_update">last update</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|