Bug #22726 » 14490.diff
t3lib/class.t3lib_tceforms.php (Arbeitskopie) | ||
---|---|---|
// Wrapping all table rows for a particular record being edited:
|
||
$this->totalWrap='
|
||
<h2>###PAGE_TITLE###</h2>
|
||
<table class="typo3-TCEforms">'.
|
||
'<tr class="typo3-TCEforms-recHeaderRow bgColor2">
|
||
'<tr class="typo3-TCEforms-recHeaderRow">
|
||
<td colspan="2">###RECORD_ICON### <span class="typo3-TCEforms-recHeader">###TABLE_TITLE###</span> ###ID_NEW_INDICATOR### - ###RECORD_LABEL###</td>
|
||
</tr>'.
|
||
'|'.
|
||
... | ... | |
#t3lib_BEfunc::fixVersioningPid($table,$rec); // Kasper: Should not be used here because NEW records are not offline workspace versions...
|
||
$truePid = t3lib_BEfunc::getTSconfig_pidValue($table,$rec['uid'],$rec['pid']);
|
||
$prec = t3lib_BEfunc::getRecordWSOL('pages',$truePid,'title');
|
||
$rLabel = '<em>[PID: '.$truePid.'] ' . t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE) . '</em>';
|
||
$pageTitle = t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE);
|
||
$rLabel = '<em>[PID: '.$truePid.'] ' . $pageTitle . '</em>';
|
||
} else {
|
||
$newLabel = ' <span class="typo3-TCEforms-recUid">['.$rec['uid'].']</span>';
|
||
$rLabel = t3lib_BEfunc::getRecordTitle($table, $rec, TRUE, FALSE);
|
||
$prec = t3lib_BEfunc::getRecordWSOL('pages',$rec['pid'],'title');
|
||
$pageTitle = t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE);
|
||
}
|
||
foreach ($arr as $k => $v) {
|
||
// Make substitutions:
|
||
$arr[$k] = str_replace('###PAGE_TITLE###', $pageTitle, $arr[$k]);
|
||
$arr[$k] = str_replace('###ID_NEW_INDICATOR###', $newLabel, $arr[$k]);
|
||
$arr[$k] = str_replace('###RECORD_LABEL###',$rLabel,$arr[$k]);
|
||
$arr[$k] = str_replace('###TABLE_TITLE###',htmlspecialchars($this->sL($TCA[$table]['ctrl']['title'])),$arr[$k]);
|
t3lib/class.t3lib_clipboard.php (Arbeitskopie) | ||
---|---|---|
if (!count($lines)) {
|
||
$lines[]='
|
||
<tr>
|
||
<td class="bgColor4"><img src="clear.gif" width="56" height="1" alt="" /></td>
|
||
<td colspan="2" class="bgColor4" nowrap="nowrap" width="95%"> <em>('.$this->clLabel('clipNoEl').')</em> </td>
|
||
<td><img src="clear.gif" width="56" height="1" alt="" /></td>
|
||
<td colspan="2" nowrap="nowrap" width="95%"> <em>(' . $this->clLabel('clipNoEl') . ')</em> </td>
|
||
</tr>';
|
||
}
|
||
t3lib/class.t3lib_compressor.php (Arbeitskopie) | ||
---|---|---|
foreach ($matches[2] as $matchCount => $match) {
|
||
// remove '," or white-spaces around
|
||
$match = preg_replace('/[\"\'\s]/', '', $match);
|
||
$newPath = t3lib_div::resolveBackPath('../../' . TYPO3_mainDir . $oldDir . $match);
|
||
$contents = str_replace($matches[1][$matchCount], '(\'' . $newPath . '\')', $contents);
|
||
// we must not rewrite data uris (see RFC 2397)
|
||
if (strpos($match, ':') === FALSE) {
|
||
$newPath = t3lib_div::resolveBackPath('../../' . TYPO3_mainDir . $oldDir . $match);
|
||
$contents = str_replace($matches[1][$matchCount], '(\'' . $newPath . '\')', $contents);
|
||
}
|
||
}
|
||
return $contents;
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_tsparser_ext.php (Arbeitskopie) | ||
---|---|---|
$A_E = '';
|
||
}
|
||
$HTML .= ($first ? '' : '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/ol/' . $PM . $BTM . '.gif" width="18" height="16" align="top" border="0" />') .
|
||
$icon .
|
||
$icon .
|
||
$A_B . t3lib_div::fixed_lgd_cs($row['title'], $GLOBALS['BE_USER']->uc['titleLen']) . $A_E . ' ';
|
||
$RL = $this->ext_getRootlineNumber($row['pid']);
|
||
$keyArray[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
|
||
$keyArray[] = '<tr class="' . ($i++ % 2 == 0 ? '' : 'bgColor6') . '">
|
||
<td nowrap>' . $HTML . '</td>
|
||
<td align="center" class="bgColor5">' . ($row['root'] ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : '') . ' </td>
|
||
<td align="center">' . ($row['clConf'] ? t3lib_iconWorks::getSpriteIcon('status-status-checked') :'') . ' ' . '</td>
|
typo3/class.webpagetree.php (Arbeitskopie) | ||
---|---|---|
$PM = t3lib_div::_GP('PM');
|
||
if(($PMpos = strpos($PM, '#')) !== false) { $PM = substr($PM, 0, $PMpos); }
|
||
$PM = explode('_', $PM);
|
||
if((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) && is_array($PM) && count($PM)==4) {
|
||
if((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) && is_array($PM) && count($PM) == 4 && $PM[2] != 0) {
|
||
if($PM[1]) {
|
||
$expandedPageUid = $PM[2];
|
||
$ajaxOutput = '';
|
||
... | ... | |
// Set first:
|
||
$this->bank = $idx;
|
||
$isOpen = $this->stored[$idx][$uid] || $this->expandFirst;
|
||
$isOpen = $this->stored[$idx][$uid] || $this->expandFirst || $uid === '0';
|
||
// Save ids while resetting everything else.
|
||
$curIds = $this->ids;
|
||
... | ... | |
// Set PM icon for root of mount:
|
||
$cmd = $this->bank.'_'.($isOpen? "0_" : "1_").$uid.'_'.$this->treeName;
|
||
$icon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($isOpen? 'minus' :'plus' ) . 'only.gif').' alt="" />';
|
||
$firstHtml = $this->PMiconATagWrap($icon,$cmd,!$isOpen);
|
||
// only, if not for uid 0
|
||
if ($uid) {
|
||
$icon = '<img' . t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/' . ($isOpen ? 'minus' :'plus' ) . 'only.gif') . ' alt="" />';
|
||
$firstHtml = $this->PMiconATagWrap($icon, $cmd, !$isOpen);
|
||
}
|
||
// Preparing rootRec for the mount
|
||
if ($uid) {
|
typo3/class.browse_links.php (Arbeitskopie) | ||
---|---|---|
// Show element:
|
||
if ($pDim) { // Image...
|
||
$lines[]='
|
||
<tr class="bgColor4">
|
||
<tr>
|
||
<td nowrap="nowrap">'.$filenameAndIcon.' </td>
|
||
<td>'.$ATag.'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/plusbullet2.gif','width="18" height="16"').' title="'.$LANG->getLL('addToList',1).'" alt="" />'.$ATag_e.'</td>
|
||
<td nowrap="nowrap">'.($ATag2.'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/zoom2.gif','width="12" height="12"').' title="'.$LANG->getLL('info',1).'" alt="" /> '.$LANG->getLL('info',1).$ATag2_e).'</td>
|
||
... | ... | |
</tr>';
|
||
} else {
|
||
$lines[]='
|
||
<tr class="bgColor4">
|
||
<tr>
|
||
<td nowrap="nowrap">'.$filenameAndIcon.' </td>
|
||
<td>'.$ATag.'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/plusbullet2.gif','width="18" height="16"').' title="'.$LANG->getLL('addToList',1).'" alt="" />'.$ATag_e.'</td>
|
||
<td nowrap="nowrap">'.($ATag2.'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/zoom2.gif','width="12" height="12"').' title="'.$LANG->getLL('info',1).'" alt="" /> '.$LANG->getLL('info',1).$ATag2_e).'</td>
|
||
... | ... | |
<!--
|
||
File listing
|
||
-->
|
||
<table border="0" cellpadding="0" cellspacing="1" id="typo3-fileList">
|
||
<table cellpadding="0" cellspacing="0" id="typo3-fileList">
|
||
'.implode('',$lines).'
|
||
</table>';
|
||
}
|
typo3/class.db_list.inc (Arbeitskopie) | ||
---|---|---|
<!--
|
||
Search box:
|
||
-->
|
||
<table border="0" cellpadding="0" cellspacing="0" class="bgColor4" id="typo3-dblist-search">
|
||
<table border="0" cellpadding="0" cellspacing="0" id="typo3-dblist-search">
|
||
<tr>
|
||
<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.enterSearchString',1).'<input type="text" name="search_field" value="'.htmlspecialchars($this->searchString).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(10).' /></td>
|
||
<td>'.$lMenu.'</td>
|
typo3/alt_main.php (Arbeitskopie) | ||
---|---|---|
// Internal, static:
|
||
var $leftMenuFrameW = 130;
|
||
var $selMenuFrame = 130;
|
||
var $topFrameH = 32;
|
||
var $shortcutFrameH = 30;
|
||
... | ... | |
if ($TBE_STYLES['dims']['leftMenuFrameW']) $this->leftMenuFrameW = $TBE_STYLES['dims']['leftMenuFrameW'];
|
||
if ($TBE_STYLES['dims']['topFrameH']) $this->topFrameH = $TBE_STYLES['dims']['topFrameH'];
|
||
if ($TBE_STYLES['dims']['shortcutFrameH']) $this->shortcutFrameH = $TBE_STYLES['dims']['shortcutFrameH'];
|
||
if ($TBE_STYLES['dims']['selMenuFrame']) $this->selMenuFrame = $TBE_STYLES['dims']['selMenuFrame'];
|
||
}
|
||
/**
|
||
... | ... | |
$shortcutFrame['frameDef']='<frame name="shortcutFrame" src="alt_shortcut.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />';
|
||
}
|
||
// XHTML notice: ' framespacing="0" frameborder="0" border="0"' in FRAMESET elements breaks compatibility with XHTML-frames, but HOW ELSE can I control the visual appearance?
|
||
if ($GLOBALS['BE_USER']->uc['noMenuMode']) {
|
||
$this->content.= '
|
||
<frameset rows="'.$this->topFrameH.',*'.$shortcutFrame['rowH'].'" framespacing="0" frameborder="0" border="0">
|
||
'.(!strcmp($BE_USER->uc['noMenuMode'],'icons') ? '
|
||
<frameset cols="'.$this->leftMenuFrameW.',*" framespacing="0" frameborder="0" border="0">
|
||
'.$fr_toplogo.'
|
||
'.$fr_topmenu.'
|
||
</frameset>' : '
|
||
<frameset cols="'.$this->leftMenuFrameW.','.$this->selMenuFrame.',*" framespacing="0" frameborder="0" border="0">
|
||
'.$fr_toplogo.'
|
||
<frame name="menu" src="alt_menu_sel.php" scrolling="no" noresize="noresize" />
|
||
'.$fr_topmenu.'
|
||
</frameset>').'
|
||
'.$fr_content.'
|
||
'.$shortcutFrame['frameDef'].'
|
||
$this->content .= '
|
||
<frameset rows="' . $this->topFrameH . ',*' . $shortcutFrame['rowH'] .'" framespacing="0" frameborder="0" border="0">
|
||
<frameset cols="' . $this->leftMenuFrameW . ',*" framespacing="0" frameborder="0" border="0">
|
||
' . $fr_toplogo . '
|
||
' . $fr_topmenu . '
|
||
</frameset>
|
||
';
|
||
} else {
|
||
$this->content.='
|
||
<frameset rows="'.$this->topFrameH.',*'.$shortcutFrame['rowH'].'" framespacing="0" frameborder="0" border="0">
|
||
<frameset cols="'.$this->leftMenuFrameW.',*" framespacing="0" frameborder="0" border="0">
|
||
'.$fr_toplogo.'
|
||
'.$fr_topmenu.'
|
||
</frameset>
|
||
<frameset cols="'.$this->leftMenuFrameW.',*" framespacing="0" frameborder="0" border="0">
|
||
<frame name="menu" src="alt_menu.php" marginwidth="0" marginheight="0" scrolling="auto" noresize="noresize" />
|
||
'.$fr_content.'
|
||
</frameset>
|
||
'.$shortcutFrame['frameDef'].'
|
||
<frameset cols="' . $this->leftMenuFrameW . ',*" framespacing="0" frameborder="0" border="0">
|
||
<frame name="menu" src="alt_menu.php" marginwidth="0" marginheight="0" scrolling="auto" noresize="noresize" />
|
||
' . $fr_content . '
|
||
</frameset>
|
||
';
|
||
}
|
||
$this->content.='
|
||
' . $shortcutFrame['frameDef'] . '
|
||
</frameset>
|
||
</html>';
|
||
}
|
||
typo3/js/pagetreefiltermenu.js (Revision 0) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2010 Jigal van Hemert <jigal@xs4all.nl>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* class to handle the pagetree filter menu
|
||
*
|
||
* $Id$
|
||
*/
|
||
var PagetreeFilterMenu = Class.create({
|
||
/**
|
||
* registers for resize event listener and executes on DOM ready
|
||
*/
|
||
initialize: function() {
|
||
Ext.onReady(function() {
|
||
Ext.get('tree-toolbar-filter-item').on('click', this.toggleMenu);
|
||
}, this);
|
||
},
|
||
/**
|
||
* toggles the visibility of the filter
|
||
*/
|
||
toggleMenu: function(event) {
|
||
var toolbarItem = Ext.get('tree-toolbar-filter-item');
|
||
var treeFilterBox = Ext.get('treeFilterBox');
|
||
var treeFilterReset = Ext.get('treeFilterReset');
|
||
toolbarItem.blur();
|
||
if (toolbarItem.hasClass('active')) {
|
||
treeFilterBox.fadeOut();
|
||
treeFilterReset.fadeOut();
|
||
} else {
|
||
treeFilterBox.fadeIn();
|
||
}
|
||
toolbarItem.toggleClass('active');
|
||
}
|
||
});
|
||
var TYPO3BackendFilterMenu = new PagetreeFilterMenu();
|
typo3/show_item.php (Arbeitskopie) | ||
---|---|---|
$tableRows[] = '
|
||
<tr>
|
||
<td class="bgColor5">'.$GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($this->table,$name),1).'</td>
|
||
<td class="bgColor4">'.htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table,$name,$this->row[$name])).'</td>
|
||
<td>' . htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table, $name, $this->row[$name])) . '</td>
|
||
</tr>';
|
||
}
|
||
}
|
||
... | ... | |
'</tr>';
|
||
}
|
||
foreach($rows as $row) {
|
||
$infoData[] = '<tr class="bgColor4"">' .
|
||
$infoData[] = '<tr>' .
|
||
'<td>'.$row['tablename'].'</td>' .
|
||
'<td>'.$row['recuid'].'</td>' .
|
||
'<td>'.$row['field'].'</td>'.
|
||
... | ... | |
'</tr>';
|
||
}
|
||
foreach($rows as $row) {
|
||
$infoData[] = '<tr class="bgColor4"">' .
|
||
$infoData[] = '<tr>' .
|
||
'<td>'.$row['field'].'</td>'.
|
||
'<td>'.$row['flexpointer'].'</td>'.
|
||
'<td>'.$row['softref_key'].'</td>'.
|
typo3/class.file_list.inc (Arbeitskopie) | ||
---|---|---|
$theData[$v] = $theT;
|
||
}
|
||
}
|
||
$out.=$this->addelement(1, $levelUp, $theData, ' class="c-headLine"', '');
|
||
$out.=$iOut;
|
||
$out .= '<thead>' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '') . '</thead>';
|
||
$out .= '<tbody>' . $iOut . '</tbody>';
|
||
// half line is drawn
|
||
... | ... | |
<!--
|
||
File list table:
|
||
-->
|
||
<table border="0" cellpadding="0" cellspacing="1" id="typo3-filelist">
|
||
<table cellpadding="0" cellspacing="0" id="typo3-filelist">
|
||
'.$out.'
|
||
</table>';
|
||
}
|
||
... | ... | |
break;
|
||
}
|
||
}
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : 'bgColor4') . '"';
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : '') . '"';
|
||
$out .= $this->addelement(1, $theIcon, $theData, $altRows);
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
if ($this->dirCounter % 2 == 0) {
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : 'bgColor4') . '"';
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor6' : '') . '"';
|
||
} else {
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '"';
|
||
$altRows = 'class="' . ($i++ % 2 == 0 ? '' : 'bgColor6') . '"';
|
||
}
|
||
$out .= $this->addelement(1, $theIcon, $theData, $altRows);
|
typo3/stylesheets/structure/topbar.css (Arbeitskopie) | ||
---|---|---|
- - - - - - - - - - - - - - - - - - - - - */
|
||
#typo3-topbar {
|
||
height: 25px;
|
||
height: 42px;
|
||
}
|
||
#typo3-logo {
|
typo3/backend.php (Arbeitskopie) | ||
---|---|---|
protected $jsFiles;
|
||
protected $jsFilesAfterInline;
|
||
protected $toolbarItems;
|
||
private $menuWidthDefault = 160; // intentionally private as nobody should modify defaults
|
||
private $menuWidthDefault = 190; // intentionally private as nobody should modify defaults
|
||
protected $menuWidth;
|
||
/**
|
||
... | ... | |
$icon = t3lib_iconWorks::getSpriteIcon('status-user-'. ($BE_USER->isAdmin() ? 'admin' : 'backend'));
|
||
$label = $GLOBALS['BE_USER']->user['realName'] ?
|
||
$BE_USER->user['realName'].' ['.$BE_USER->user['username'].']' :
|
||
$BE_USER->user['realName'] . ' (' . $BE_USER->user['username'] . ')' :
|
||
$BE_USER->user['username'];
|
||
// Link to user setup if it's loaded and user has access
|
typo3/alt_db_navframe.php (Arbeitskopie) | ||
---|---|---|
$this->doc->getDragDropCode('pages');
|
||
$this->doc->getContextMenuCode();
|
||
$this->doc->getPageRenderer()->loadScriptaculous('effects');
|
||
$this->doc->getPageRenderer()->loadExtJS();
|
||
$this->doc->getPageREnderer()->addJsFile('js/pagetreefiltermenu.js');
|
||
$this->doc->JScode .= $this->doc->wrapScriptTags(
|
||
($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
|
||
// setting prefs for pagetree and drag & drop
|
||
... | ... | |
'csh' => '',
|
||
'new_page' => '',
|
||
'refresh' => '',
|
||
'filter' => '',
|
||
);
|
||
// New Page
|
||
... | ... | |
// CSH
|
||
$buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH'], '', TRUE));
|
||
// Filter
|
||
if ($this->hasFilterBox) {
|
||
$buttons['filter'] = '<a href="#" id="tree-toolbar-filter-item"><img' . t3lib_iconWorks::skinImg('', 'gfx/filter.png') . ' title="' . $LANG->sL('LLL:EXT:cms/layout/locallang.xml:labels.filter', 1) . '" alt="" /></a></span>';
|
||
}
|
||
return $buttons;
|
||
}
|
||
typo3/class.alt_menu_functions.inc (Arbeitskopie) | ||
---|---|---|
// Code for "About modules"
|
||
$descrCode.='
|
||
<tr class="c-mainitem bgColor4">
|
||
<tr class="c-mainitem">
|
||
<td colspan="3">'.$imageCode.$label.'</td>
|
||
</tr>';
|
||
typo3/mod/tools/em/class.em_index.php.orig (Revision 0) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
|
||
* (c) 2005-2009 Karsten Dambekalns <karsten@typo3.org>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* Module: Extension manager
|
||
*
|
||
* $Id: class.em_index.php 7644 2010-05-20 11:25:24Z lolli $
|
||
*
|
||
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
|
||
* @author Karsten Dambekalns <karsten@typo3.org>
|
||
*/
|
||
/**
|
||
* [CLASS/FUNCTION INDEX of SCRIPT]
|
||
*
|
||
*
|
||
*
|
||
* 194: class SC_mod_tools_em_index extends t3lib_SCbase
|
||
*
|
||
* SECTION: Standard module initialization
|
||
* 337: function init()
|
||
* 417: function handleExternalFunctionValue($MM_key='function', $MS_value=NULL)
|
||
* 431: function menuConfig()
|
||
* 508: function main()
|
||
* 584: function printContent()
|
||
*
|
||
* SECTION: Function Menu Applications
|
||
* 609: function extensionList_loaded()
|
||
* 664: function extensionList_installed()
|
||
* 736: function extensionList_import()
|
||
* 903: function alterSettings()
|
||
*
|
||
* SECTION: Command Applications (triggered by GET var)
|
||
* 1005: function importExtInfo($extKey, $version='')
|
||
* 1062: function fetchMetaData($metaType)
|
||
* 1125: function getMirrorURL()
|
||
* 1158: function installExtension($extKey, $version=null, $mode=EM_INSTALL_VERSION_MIN)
|
||
* 1279: function importExtFromRep($extKey,$version,$loc,$uploadFlag=0,$dontDelete=0,$directInput='')
|
||
* 1425: function showExtDetails($extKey)
|
||
*
|
||
* SECTION: Application Sub-functions (HTML parts)
|
||
* 1737: function updatesForm($extKey,$extInfo,$notSilent=0,$script='',$addFields='')
|
||
* 1768: function extDumpTables($extKey,$extInfo)
|
||
* 1835: function getFileListOfExtension($extKey,$conf)
|
||
* 1889: function extDelete($extKey,$extInfo)
|
||
* 1920: function extUpdateEMCONF($extKey,$extInfo)
|
||
* 1940: function extBackup($extKey,$extInfo)
|
||
* 1987: function extBackup_dumpDataTablesLine($tablesArray,$extKey)
|
||
* 2015: function extInformationArray($extKey,$extInfo,$remote=0)
|
||
* 2097: function extInformationArray_dbReq($techInfo,$tableHeader=0)
|
||
* 2110: function extInformationArray_dbInst($dbInst,$current)
|
||
* 2129: function getRepositoryUploadForm($extKey,$extInfo)
|
||
*
|
||
* SECTION: Extension list rendering
|
||
* 2190: function extensionListRowHeader($trAttrib,$cells,$import=0)
|
||
* 2251: function extensionListRow($extKey,$extInfo,$cells,$bgColorClass='',$inst_list=array(),$import=0,$altLinkUrl='')
|
||
*
|
||
* SECTION: Output helper functions
|
||
* 2367: function wrapEmail($str,$email)
|
||
* 2380: function helpCol($key)
|
||
* 2396: function labelInfo($str)
|
||
* 2408: function extensionTitleIconHeader($extKey,$extInfo,$align='top')
|
||
* 2423: function removeButton()
|
||
* 2432: function installButton()
|
||
* 2441: function noImportMsg()
|
||
* 2454: function depToString($dep,$type='depends')
|
||
* 2473: function stringToDep($dep)
|
||
*
|
||
* SECTION: Read information about all available extensions
|
||
* 2503: function getInstalledExtensions()
|
||
* 2530: function getInstExtList($path,&$list,&$cat,$type)
|
||
* 2561: function fixEMCONF($emConf)
|
||
* 2600: function splitVersionRange($ver)
|
||
* 2616: function prepareImportExtList()
|
||
* 2660: function setCat(&$cat,$listArrayPart,$extKey)
|
||
*
|
||
* SECTION: Extension analyzing (detailed information)
|
||
* 2710: function makeDetailedExtensionAnalysis($extKey,$extInfo,$validity=0)
|
||
* 2892: function getClassIndexLocallangFiles($absPath,$table_class_prefix,$extKey)
|
||
* 2962: function modConfFileAnalysis($confFilePath)
|
||
* 2990: function serverExtensionMD5Array($extKey,$conf)
|
||
* 3015: function findMD5ArrayDiff($current,$past)
|
||
*
|
||
* SECTION: File system operations
|
||
* 3047: function createDirsInPath($dirs,$extDirPath)
|
||
* 3065: function removeExtDirectory($removePath,$removeContentOnly=0)
|
||
* 3128: function clearAndMakeExtensionDir($importedData,$type,$dontDelete=0)
|
||
* 3182: function removeCacheFiles()
|
||
* 3192: function extractDirsFromFileList($files)
|
||
* 3218: function getExtPath($extKey,$type)
|
||
*
|
||
* SECTION: Writing to "conf.php" and "localconf.php" files
|
||
* 3252: function writeTYPO3_MOD_PATH($confFilePath,$type,$mP)
|
||
* 3289: function writeNewExtensionList($newExtList)
|
||
* 3312: function writeTsStyleConfig($extKey,$arr)
|
||
* 3334: function updateLocalEM_CONF($extKey,$extInfo)
|
||
*
|
||
* SECTION: Compiling upload information, emconf-file etc.
|
||
* 3376: function construct_ext_emconf_file($extKey,$EM_CONF)
|
||
* 3407: function arrayToCode($array, $level=0)
|
||
* 3433: function makeUploadArray($extKey,$conf)
|
||
* 3502: function getSerializedLocalLang($file,$content)
|
||
*
|
||
* SECTION: Managing dependencies, conflicts, priorities, load order of extension keys
|
||
* 3538: function addExtToList($extKey,$instExtInfo)
|
||
* 3569: function checkDependencies($extKey, $conf, $instExtInfo)
|
||
* 3709: function removeExtFromList($extKey,$instExtInfo)
|
||
* 3746: function removeRequiredExtFromListArr($listArr)
|
||
* 3761: function managesPriorities($listArr,$instExtInfo)
|
||
*
|
||
* SECTION: System Update functions (based on extension requirements)
|
||
* 3813: function checkClearCache($extInfo)
|
||
* 3840: function checkUploadFolder($extKey,$extInfo)
|
||
* 3925: function checkDBupdates($extKey,$extInfo,$infoOnly=0)
|
||
* 4022: function forceDBupdates($extKey, $extInfo)
|
||
* 4080: function tsStyleConfigForm($extKey,$extInfo,$output=0,$script='',$addFields='')
|
||
*
|
||
* SECTION: Dumping database (MySQL compliant)
|
||
* 4175: function dumpTableAndFieldStructure($arr)
|
||
* 4200: function dumpStaticTables($tableList)
|
||
* 4229: function dumpHeader()
|
||
* 4246: function dumpTableHeader($table,$fieldKeyInfo,$dropTableIfExists=0)
|
||
* 4288: function dumpTableContent($table,$fieldStructure)
|
||
* 4323: function getTableAndFieldStructure($parts)
|
||
*
|
||
* SECTION: TER Communication functions
|
||
* 4373: function uploadExtensionToTER($em)
|
||
*
|
||
* SECTION: Various helper functions
|
||
* 4411: function listOrderTitle($listOrder,$key)
|
||
* 4436: function makeVersion($v,$mode)
|
||
* 4448: function renderVersion($v,$raise='')
|
||
* 4485: function ulFolder($extKey)
|
||
* 4494: function importAtAll()
|
||
* 4505: function importAsType($type,$lockType='')
|
||
* 4527: function deleteAsType($type)
|
||
* 4548: function versionDifference($v1,$v2,$div=1)
|
||
* 4560: function first_in_array($str,$array,$caseInsensitive=FALSE)
|
||
* 4578: function includeEMCONF($path,$_EXTKEY)
|
||
* 4593: function searchExtension($extKey,$row)
|
||
*
|
||
* TOTAL FUNCTIONS: 90
|
||
* (This index is automatically created/updated by the extension "extdeveval")
|
||
*
|
||
*/
|
||
// Include classes needed:
|
||
require_once('class.em_xmlhandler.php');
|
||
require_once('class.em_terconnection.php');
|
||
require_once('class.em_unzip.php');
|
||
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_tools_em.xml');
|
||
// from tx_ter by Robert Lemke
|
||
define('TX_TER_RESULT_EXTENSIONSUCCESSFULLYUPLOADED', '10504');
|
||
define('EM_INSTALL_VERSION_MIN', 1);
|
||
define('EM_INSTALL_VERSION_MAX', 2);
|
||
define('EM_INSTALL_VERSION_STRICT', 3);
|
||
/**
|
||
* Module: Extension manager
|
||
*
|
||
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
|
||
* @author Karsten Dambekalns <karsten@typo3.org>
|
||
* @package TYPO3
|
||
* @subpackage core
|
||
*/
|
||
class SC_mod_tools_em_index extends t3lib_SCbase {
|
||
// Internal, static:
|
||
var $versionDiffFactor = 1; // This means that version difference testing for import is detected for sub-versions only, not dev-versions. Default: 1000
|
||
var $systemInstall = 0; // If "1" then installs in the sysext directory is allowed. Default: 0
|
||
var $requiredExt = ''; // List of required extension (from TYPO3_CONF_VARS)
|
||
var $maxUploadSize = 31457280; // Max size in bytes of extension upload to repository
|
||
var $kbMax = 500; // Max size in kilobytes for files to be edited.
|
||
var $doPrintContent = true; // If set (default), the function printContent() will echo the content which was collected in $this->content. You can set this to FALSE in order to echo content from elsewhere, fx. when using outbut buffering
|
||
var $listingLimit = 500; // List that many extension maximally at one time (fixing memory problems)
|
||
var $listingLimitAuthor = 250; // List that many extension maximally at one time (fixing memory problems)
|
||
/**
|
||
* Internal variable loaded with extension categories (for display/listing). Should reflect $categories above
|
||
* Dynamic var.
|
||
*/
|
||
var $defaultCategories = Array(
|
||
'cat' => Array (
|
||
'be' => array(),
|
||
'module' => array(),
|
||
'fe' => array(),
|
||
'plugin' => array(),
|
||
'misc' => array(),
|
||
'services' => array(),
|
||
'templates' => array(),
|
||
'example' => array(),
|
||
'doc' => array()
|
||
)
|
||
);
|
||
var $categories = array(); // Extension Categories (static var); see init()
|
||
var $states = array(); // Extension States; see init()
|
||
/**
|
||
* Colors for extension states
|
||
*/
|
||
var $stateColors = Array (
|
||
'alpha' => '#d12438',
|
||
'beta' => '#97b17e',
|
||
'stable' => '#3bb65c',
|
||
'experimental' => '#007eba',
|
||
'test' => '#979797',
|
||
'obsolete' => '#000000',
|
||
'excludeFromUpdates' => '#cf7307'
|
||
);
|
||
/**
|
||
* "TYPE" information; labels, paths, description etc. See init()
|
||
*/
|
||
var $typeLabels = array();
|
||
var $typeDescr = array();
|
||
var $typePaths = Array(); // Also static, set in init()
|
||
var $typeBackPaths = Array(); // Also static, set in init()
|
||
var $typeRelPaths = Array (
|
||
'S' => 'sysext/',
|
||
'G' => 'ext/',
|
||
'L' => '../typo3conf/ext/',
|
||
);
|
||
var $detailCols = Array (
|
||
0 => 2,
|
||
1 => 5,
|
||
2 => 6,
|
||
3 => 6,
|
||
4 => 4,
|
||
5 => 1
|
||
);
|
||
var $fe_user = array(
|
||
'username' => '',
|
||
'password' => '',
|
||
);
|
||
var $privacyNotice; // Set in init()
|
||
var $securityHint; // Set in init()
|
||
var $editTextExtensions = 'html,htm,txt,css,tmpl,inc,php,sql,conf,cnf,pl,pm,sh,xml,ChangeLog';
|
||
var $nameSpaceExceptions = 'beuser_tracking,design_components,impexp,static_file_edit,cms,freesite,quickhelp,classic_welcome,indexed_search,sys_action,sys_workflows,sys_todos,sys_messages,direct_mail,sys_stat,tt_address,tt_board,tt_calender,tt_guest,tt_links,tt_news,tt_poll,tt_rating,tt_products,setup,taskcenter,tsconfig_help,context_help,sys_note,tstemplate,lowlevel,install,belog,beuser,phpmyadmin,aboutmodules,imagelist,setup,taskcenter,sys_notepad,viewpage,adodb';
|
||
// Default variables for backend modules
|
||
var $MCONF = array(); // Module configuration
|
||
var $MOD_MENU = array(); // Module menu items
|
||
var $MOD_SETTINGS = array(); // Module session settings
|
||
/**
|
||
* Document Template Object
|
||
*
|
||
* @var noDoc
|
||
*/
|
||
var $doc;
|
||
var $content; // Accumulated content
|
||
var $inst_keys = array(); // Storage of installed extensions
|
||
var $gzcompress = 0; // Is set true, if system support compression.
|
||
/**
|
||
* instance of TER connection handler
|
||
*
|
||
* @var SC_mod_tools_em_terconnection
|
||
*/
|
||
var $terConnection;
|
||
/**
|
||
* XML handling class for the TYPO3 Extension Manager
|
||
*
|
||
* @var SC_mod_tools_em_xmlhandler
|
||
*/
|
||
var $xmlhandler;
|
||
var $JScode; // JavaScript code to be forwared to $this->doc->JScode
|
||
// GPvars:
|
||
var $CMD = array(); // CMD array
|
||
var $listRemote; // If set, connects to remote repository
|
||
var $lookUpStr; // Search string when listing local extensions
|
||
/*********************************
|
||
*
|
||
* Standard module initialization
|
||
*
|
||
*********************************/
|
||
/**
|
||
* Standard init function of a module.
|
||
*
|
||
* @return void
|
||
*/
|
||
function init() {
|
||
global $BE_USER,$LANG,$BACK_PATH,$TYPO3_CONF_VARS;
|
||
/**
|
||
* Extension Categories (static var)
|
||
* Content must be redundant with the same internal variable as in class.tx_extrep.php!
|
||
*/
|
||
$this->categories = array(
|
||
'be' => $GLOBALS['LANG']->getLL('category_BE'),
|
||
'module' => $GLOBALS['LANG']->getLL('category_BE_modules'),
|
||
'fe' => $GLOBALS['LANG']->getLL('category_FE'),
|
||
'plugin' => $GLOBALS['LANG']->getLL('category_FE_plugins'),
|
||
'misc' => $GLOBALS['LANG']->getLL('category_miscellanous'),
|
||
'services' => $GLOBALS['LANG']->getLL('category_services'),
|
||
'templates' => $GLOBALS['LANG']->getLL('category_templates'),
|
||
'example' => $GLOBALS['LANG']->getLL('category_examples'),
|
||
'doc' => $GLOBALS['LANG']->getLL('category_documentation')
|
||
);
|
||
/**
|
||
* Extension States
|
||
* Content must be redundant with the same internal variable as in class.tx_extrep.php!
|
||
*/
|
||
$this->states = array(
|
||
'alpha' => $GLOBALS['LANG']->getLL('state_alpha'),
|
||
'beta' => $GLOBALS['LANG']->getLL('state_beta'),
|
||
'stable' => $GLOBALS['LANG']->getLL('state_stable'),
|
||
'experimental' => $GLOBALS['LANG']->getLL('state_experimental'),
|
||
'test' => $GLOBALS['LANG']->getLL('state_test'),
|
||
'obsolete' => $GLOBALS['LANG']->getLL('state_obsolete'),
|
||
'excludeFromUpdates' => $GLOBALS['LANG']->getLL('state_exclude_from_updates')
|
||
);
|
||
/**
|
||
* "TYPE" information; labels, paths, description etc.
|
||
*/
|
||
$this->typeLabels = array(
|
||
'S' => $GLOBALS['LANG']->getLL('type_system'),
|
||
'G' => $GLOBALS['LANG']->getLL('type_global'),
|
||
'L' => $GLOBALS['LANG']->getLL('type_local'),
|
||
);
|
||
$this->typeDescr = array(
|
||
'S' => $GLOBALS['LANG']->getLL('descr_system'),
|
||
'G' => $GLOBALS['LANG']->getLL('descr_global'),
|
||
'L' => $GLOBALS['LANG']->getLL('descr_local'),
|
||
);
|
||
// Setting paths of install scopes:
|
||
$this->typePaths = Array (
|
||
'S' => TYPO3_mainDir.'sysext/',
|
||
'G' => TYPO3_mainDir.'ext/',
|
||
'L' => 'typo3conf/ext/'
|
||
);
|
||
$this->typeBackPaths = Array (
|
||
'S' => '../../../',
|
||
'G' => '../../../',
|
||
'L' => '../../../../'.TYPO3_mainDir
|
||
);
|
||
$this->privacyNotice = $GLOBALS['LANG']->getLL('privacy_notice');
|
||
$securityMessage = sprintf($GLOBALS['LANG']->getLL('security_descr'),
|
||
'<a href="http://typo3.org/teams/security/" target="_blank">', '</a>'
|
||
);
|
||
$flashMessage = t3lib_div::makeInstance(
|
||
't3lib_FlashMessage',
|
||
$securityMessage,
|
||
$GLOBALS['LANG']->getLL('security_header'),
|
||
t3lib_FlashMessage::INFO
|
||
);
|
||
$this->securityHint = $flashMessage->render();
|
||
$this->excludeForPackaging = $GLOBALS['TYPO3_CONF_VARS']['EXT']['excludeForPackaging'];
|
||
// Setting module configuration:
|
||
$this->MCONF = $GLOBALS['MCONF'];
|
||
// Setting GPvars:
|
||
$this->CMD = is_array(t3lib_div::_GP('CMD')) ? t3lib_div::_GP('CMD') : array();
|
||
$this->lookUpStr = trim(t3lib_div::_GP('lookUp'));
|
||
$this->listRemote = t3lib_div::_GP('ter_connect');
|
||
$this->listRemote_search = trim(t3lib_div::_GP('ter_search'));
|
||
// Configure menu
|
||
$this->menuConfig();
|
||
// Setting internal static:
|
||
if ($TYPO3_CONF_VARS['EXT']['allowSystemInstall']) $this->systemInstall = 1;
|
||
$this->requiredExt = t3lib_div::trimExplode(',',$TYPO3_CONF_VARS['EXT']['requiredExt'],1);
|
||
// Initialize helper object
|
||
$this->terConnection = t3lib_div::makeInstance('SC_mod_tools_em_terconnection');
|
||
$this->terConnection->emObj = $this;
|
||
$this->terConnection->wsdlURL = $TYPO3_CONF_VARS['EXT']['em_wsdlURL'];
|
||
$this->xmlhandler = t3lib_div::makeInstance('SC_mod_tools_em_xmlhandler');
|
||
$this->xmlhandler->emObj = $this;
|
||
$this->xmlhandler->useUnchecked = $this->MOD_SETTINGS['display_unchecked'];
|
||
$this->xmlhandler->useObsolete = $this->MOD_SETTINGS['display_obsolete'];
|
||
// Initialize Document Template object:
|
||
$this->doc = t3lib_div::makeInstance('template');
|
||
$this->doc->backPath = $BACK_PATH;
|
||
$this->doc->setModuleTemplate('templates/em_index.html');
|
||
// JavaScript
|
||
$this->doc->JScode = $this->doc->wrapScriptTags('
|
||
script_ended = 0;
|
||
function jumpToUrl(URL) { //
|
||
window.location.href = URL;
|
||
}
|
||
');
|
||
// Reload left frame menu
|
||
if ($this->CMD['refreshMenu']) {
|
||
$this->doc->JScode .= $this->doc->wrapScriptTags('
|
||
if(top.refreshMenu) {
|
||
top.refreshMenu();
|
||
} else {
|
||
top.TYPO3ModuleMenu.refreshMenu();
|
||
}
|
||
');
|
||
}
|
||
// Descriptions:
|
||
$this->descrTable = '_MOD_'.$this->MCONF['name'];
|
||
if ($BE_USER->uc['edit_showFieldHelp']) {
|
||
$LANG->loadSingleTableDescription($this->descrTable);
|
||
}
|
||
// Setting username/password etc. for upload-user:
|
||
$this->fe_user['username'] = $this->MOD_SETTINGS['fe_u'];
|
||
$this->fe_user['password'] = $this->MOD_SETTINGS['fe_p'];
|
||
parent::init();
|
||
$this->handleExternalFunctionValue('singleDetails');
|
||
}
|
||
/**
|
||
* This function is a copy of the same function in t3lib_SCbase with one modification:
|
||
* In contrast to t3lib_SCbase::handleExternalFunctionValue() this function merges the $this->extClassConf array
|
||
* instead of overwriting it. That was necessary for including the Kickstarter as a submodule into the 'singleDetails'
|
||
* selectorbox as well as in the main 'function' selectorbox.
|
||
*
|
||
* @param string Mod-setting array key
|
||
* @param string Mod setting value, overriding the one in the key
|
||
* @return void
|
||
* @see t3lib_SCbase::handleExternalFunctionValue()
|
||
*/
|
||
function handleExternalFunctionValue($MM_key='function', $MS_value=NULL) {
|
||
$MS_value = is_null($MS_value) ? $this->MOD_SETTINGS[$MM_key] : $MS_value;
|
||
$externalItems = $this->getExternalItemConfig($this->MCONF['name'],$MM_key,$MS_value);
|
||
if (is_array($externalItems)) $this->extClassConf = array_merge($externalItems,is_array($this->extClassConf)?$this->extClassConf:array());
|
||
if (is_array($this->extClassConf) && $this->extClassConf['path']) {
|
||
$this->include_once[]=$this->extClassConf['path'];
|
||
}
|
||
}
|
||
/**
|
||
* Configuration of which mod-menu items can be used
|
||
*
|
||
* @return void
|
||
*/
|
||
function menuConfig() {
|
||
global $BE_USER, $TYPO3_CONF_VARS;
|
||
// MENU-ITEMS:
|
||
$this->MOD_MENU = array(
|
||
'function' => array(
|
||
0 => $GLOBALS['LANG']->getLL('menu_loaded_extensions'),
|
||
1 => $GLOBALS['LANG']->getLL('menu_install_extensions'),
|
||
2 => $GLOBALS['LANG']->getLL('menu_import_extensions'),
|
||
4 => $GLOBALS['LANG']->getLL('menu_translation_handling'),
|
||
3 => $GLOBALS['LANG']->getLL('menu_settings'),
|
||
5 => $GLOBALS['LANG']->getLL('menu_extension_updates'),
|
||
),
|
||
'listOrder' => array(
|
||
'cat' => $GLOBALS['LANG']->getLL('list_order_category'),
|
||
'author_company' => $GLOBALS['LANG']->getLL('list_order_author'),
|
||
'state' => $GLOBALS['LANG']->getLL('list_order_state'),
|
||
'type' => $GLOBALS['LANG']->getLL('list_order_type'),
|
||
),
|
||
'display_details' => array(
|
||
1 => $GLOBALS['LANG']->getLL('show_details'),
|
||
0 => $GLOBALS['LANG']->getLL('show_description'),
|
||
2 => $GLOBALS['LANG']->getLL('show_more_details'),
|
||
3 => $GLOBALS['LANG']->getLL('show_technical'),
|
||
4 => $GLOBALS['LANG']->getLL('show_validating'),
|
||
5 => $GLOBALS['LANG']->getLL('show_changed'),
|
||
),
|
||
'display_shy' => '',
|
||
'display_own' => '',
|
||
'display_unchecked' => '',
|
||
'display_obsolete' => '',
|
||
'display_installed' => '',
|
||
'display_files' => '',
|
||
'singleDetails' => array(
|
||
'info' => $GLOBALS['LANG']->getLL('details_info'),
|
||
'edit' => $GLOBALS['LANG']->getLL('details_edit'),
|
||
'backup' => $GLOBALS['LANG']->getLL('details_backup_delete'),
|
||
'dump' => $GLOBALS['LANG']->getLL('details_dump_db'),
|
||
'upload' => $GLOBALS['LANG']->getLL('details_upload'),
|
||
'updateModule' => $GLOBALS['LANG']->getLL('details_update'),
|
||
),
|
||
'fe_u' => '',
|
||
'fe_p' => '',
|
||
'mirrorListURL' => '',
|
||
'rep_url' => '',
|
||
'extMirrors' => '',
|
||
'selectedMirror' => '',
|
||
'selectedLanguages' => ''
|
||
);
|
||
$this->MOD_MENU['singleDetails'] = $this->mergeExternalItems($this->MCONF['name'],'singleDetails',$this->MOD_MENU['singleDetails']);
|
||
// page/be_user TSconfig settings and blinding of menu-items
|
||
if (!$BE_USER->getTSConfigVal('mod.'.$this->MCONF['name'].'.allowTVlisting')) {
|
||
unset($this->MOD_MENU['display_details'][3]);
|
||
unset($this->MOD_MENU['display_details'][4]);
|
||
unset($this->MOD_MENU['display_details'][5]);
|
||
}
|
||
// CLEANSE SETTINGS
|
||
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
|
||
if ($this->MOD_SETTINGS['function']==2) {
|
||
// If listing from online repository, certain items are removed though:
|
||
unset($this->MOD_MENU['listOrder']['type']);
|
||
unset($this->MOD_MENU['display_details'][2]);
|
||
unset($this->MOD_MENU['display_details'][3]);
|
||
unset($this->MOD_MENU['display_details'][4]);
|
||
unset($this->MOD_MENU['display_details'][5]);
|
||
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
|
||
}
|
||
parent::menuConfig();
|
||
}
|
||
/**
|
||
* Main function for Extension Manager module.
|
||
*
|
||
* @return void
|
||
*/
|
||
function main() {
|
||
global $BE_USER,$LANG,$TYPO3_CONF_VARS;
|
||
if (empty($this->MOD_SETTINGS['mirrorListURL'])) $this->MOD_SETTINGS['mirrorListURL'] = $TYPO3_CONF_VARS['EXT']['em_mirrorListURL'];
|
||
// Starting page:
|
||
$this->content.=$this->doc->header($GLOBALS['LANG']->getLL('header'));
|
||
$this->content.=$this->doc->spacer(5);
|
||
// Command given which is executed regardless of main menu setting:
|
||
if ($this->CMD['showExt']) { // Show details for a single extension
|
||
$this->showExtDetails($this->CMD['showExt']);
|
||
} elseif ($this->CMD['requestInstallExtensions']) { // Show details for a single extension
|
||
$this->requestInstallExtensions($this->CMD['requestInstallExtensions']);
|
||
} elseif ($this->CMD['importExt'] || $this->CMD['uploadExt']) { // Imports an extension from online rep.
|
||
$err = $this->importExtFromRep($this->CMD['importExt'],$this->CMD['extVersion'],$this->CMD['loc'],$this->CMD['uploadExt']);
|
||
if ($err) {
|
||
$this->content.=$this->doc->section('',$GLOBALS['TBE_TEMPLATE']->rfw($err));
|
||
}
|
||
if(!$err && $this->CMD['importExt']) {
|
||
$this->installTranslationsForExtension($this->CMD['importExt'], $this->getMirrorURL());
|
||
}
|
||
} elseif ($this->CMD['importExtInfo']) { // Gets detailed information of an extension from online rep.
|
||
$this->importExtInfo($this->CMD['importExtInfo'],$this->CMD['extVersion']);
|
||
} else { // No command - we show what the menu setting tells us:
|
||
if (t3lib_div::inList('0,1,2',$this->MOD_SETTINGS['function'])) {
|
||
$menu .= ' ' . $GLOBALS['LANG']->getLL('group_by') . ' ' . t3lib_BEfunc::getFuncMenu(0, 'SET[listOrder]', $this->MOD_SETTINGS['listOrder'], $this->MOD_MENU['listOrder']) .
|
||
' ' . $GLOBALS['LANG']->getLL('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,5',$this->MOD_SETTINGS['function'])) {
|
||
$menu.='<label for="checkDisplayShy">' . $GLOBALS['LANG']->getLL('display_shy') . '</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'])) {
|
||
$menu.='<label for="checkDisplayOwn">' . $GLOBALS['LANG']->getLL('only_my_ext') . '</label> ' . t3lib_BEfunc::getFuncCheck(0, 'SET[display_own]', $this->MOD_SETTINGS['display_own'], '', '', 'id="checkDisplayOwn"');
|
||
}
|
||
if (t3lib_div::inList('0,1,2',$this->MOD_SETTINGS['function'])) {
|
||
$menu.=' <label for="checkDisplayObsolete">' . $GLOBALS['LANG']->getLL('show_obsolete') . '</label> ' . t3lib_BEfunc::getFuncCheck(0, 'SET[display_obsolete]', $this->MOD_SETTINGS['display_obsolete'], '', '', 'id="checkDisplayObsolete"');
|
||
}
|
||
$this->content.=$this->doc->section('','<form action="index.php" method="post" name="pageform"><span class="nobr">' . ($menu ? $menu : ' ') . '</span></form>');
|
||
$this->content.=$this->doc->spacer(10);
|
||
switch((string)$this->MOD_SETTINGS['function']) {
|
||
case '0':
|
||
// Lists loaded (installed) extensions
|
||
$this->extensionList_loaded();
|
||
break;
|
||
case '1':
|
||
// Lists the installed (available) extensions
|
||
$this->extensionList_installed();
|
||
break;
|
||
case '2':
|
||
// Lists the extensions available from online rep.
|
||
$this->extensionList_import();
|
||
break;
|
||
case '3':
|
||
// Shows the settings screen
|
||
$this->alterSettings();
|
||
break;
|
||
case '4':
|
||
// 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->checkForUpdates();
|
||
break;
|
||
default:
|
||
$this->extObjContent();
|
||
break;
|
||
}
|
||
}
|
||
// closing any form?
|
||
$formTags = substr_count($this->content, '<form') + substr_count($this->content, '</form');
|
||
if ($formTags % 2 > 0) {
|
||
$this->content .= '</form>';
|
||
}
|
||
// 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');
|
||
$this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
|
||
$this->content.= $this->doc->endPage();
|
||
$this->content = $this->doc->insertStylesAndJS($this->content);
|
||
}
|
||
/**
|
||
* Print module content. Called as last thing in the global scope.
|
||
*
|
||
* @return void
|
||
*/
|
||
function printContent() {
|
||
if ($this->doPrintContent) {
|
||
echo $this->content;
|
||
}
|
||
}
|
||
/**
|
||
* Create the function menu
|
||
*
|
||
* @return string HTML of the function menu
|
||
*/
|
||
protected function getFuncMenu() {
|
||
$funcMenu = '';
|
||
if(!$this->CMD['showExt'] && !$this->CMD['requestInstallExtensions'] && !$this->CMD['importExt'] && !$this->CMD['uploadExt'] && !$this->CMD['importExtInfo']) {
|
||
$funcMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
|
||
} 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;
|
||
}
|
||
/**
|
||
* Create the panel of buttons for submitting the form or otherwise perform operations.
|
||
*
|
||
* @return array all available buttons as an assoc. array
|
||
*/
|
||
protected function getButtons() {
|
||
$buttons = array(
|
||
'csh' => '',
|
||
'back' => '',
|
||
'shortcut' => ''
|
||
);
|
||
// 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']);
|
||
}
|
||
// Back
|
||
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="' . $GLOBALS['LANG']->getLL('go_back') . '" class="absmiddle" alt="" /></a>';
|
||
}
|
||
return $buttons;
|
||
}
|
||
/*********************************
|
||
*
|
||
* Function Menu Applications
|
||
*
|
||
*********************************/
|
||
/**
|
||
* Listing of loaded (installed) extensions
|
||
*
|
||
* @return void
|
||
*/
|
||
function extensionList_loaded() {
|
||
global $TYPO3_LOADED_EXT;
|
||
list($list,$cat) = $this->getInstalledExtensions();
|
||
// Loaded extensions
|
||
$content = '';
|
||
$lines = array();
|
||
// Available extensions
|
||
if (is_array($cat[$this->MOD_SETTINGS['listOrder']])) {
|
||
$content='';
|
||
$lines=array();
|
||
$lines[] = $this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="1" height="1" alt="" /></td>'));
|
||
foreach($cat[$this->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
|
||
natcasesort($extEkeys);
|
||
$extensions = array();
|
||
foreach ($extEkeys as $extKey => $value) {
|
||
if (array_key_exists($extKey,$TYPO3_LOADED_EXT) && ($this->MOD_SETTINGS['display_shy'] || !$list[$extKey]['EM_CONF']['shy']) && $this->searchExtension($extKey,$list[$extKey])) {
|
||
if (in_array($extKey, $this->requiredExt)) {
|
||
$loadUnloadLink = '<strong>' . $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('extension_required_short')) . '</strong>';
|
||
} else {
|
||
$loadUnloadLink = '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1').'">'.$this->removeButton().'</a>';
|
||
}
|
||
$extensions[] = $this->extensionListRow($extKey,$list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'));
|
||
}
|
||
}
|
||
if(count($extensions)) {
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/sysf.gif', 'width="18" height="16"').' align="top" alt="" /><strong>'.htmlspecialchars($this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName)).'</strong></td></tr>';
|
||
$lines[] = implode(LF,$extensions);
|
||
}
|
||
}
|
||
}
|
||
$content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'loaded', $GLOBALS['BACK_PATH'],'');
|
||
$content.= '<form action="index.php" method="post" name="lookupform">';
|
||
$content.= '<label for="lookUp">' . $GLOBALS['LANG']->getLL('look_up') . '</label> <input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->lookUpStr) . '" /><input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" /><br /><br />';
|
||
$content.= '</form>
|
||
<!-- Loaded Extensions List -->
|
||
<table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
|
||
$this->content.=$this->doc->section($GLOBALS['LANG']->getLL('loaded_exts'),$content,0,1);
|
||
}
|
||
/**
|
||
* Listing of available (installed) extensions
|
||
*
|
||
* @return void
|
||
*/
|
||
function extensionList_installed() {
|
||
global $TYPO3_LOADED_EXT;
|
||
list($list,$cat)=$this->getInstalledExtensions();
|
||
// Available extensions
|
||
if (is_array($cat[$this->MOD_SETTINGS['listOrder']])) {
|
||
$content='';
|
||
$lines=array();
|
||
$lines[]=$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'));
|
||
$allKeys=array();
|
||
foreach($cat[$this->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
|
||
if(!$this->MOD_SETTINGS['display_obsolete'] && $catName=='obsolete') continue;
|
||
$allKeys[]='';
|
||
$allKeys[]='TYPE: '.$catName;
|
||
natcasesort($extEkeys);
|
||
$extensions = array();
|
||
foreach ($extEkeys as $extKey => $value) {
|
||
$allKeys[]=$extKey;
|
||
if ((!$list[$extKey]['EM_CONF']['shy'] || $this->MOD_SETTINGS['display_shy']) &&
|
||
($list[$extKey]['EM_CONF']['state']!='obsolete' || $this->MOD_SETTINGS['display_obsolete'])
|
||
&& $this->searchExtension($extKey,$list[$extKey])) {
|
||
$loadUnloadLink = t3lib_extMgm::isLoaded($extKey)?
|
||
'<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->removeButton().'</a>':
|
||
'<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->installButton().'</a>';
|
||
if (in_array($extKey,$this->requiredExt)) {
|
||
$loadUnloadLink = '<strong>' . $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('extension_required_short')) . '</strong>';
|
||
}
|
||
$theRowClass = t3lib_extMgm::isLoaded($extKey)? 'em-listbg1' : 'em-listbg2';
|
||
$extensions[]=$this->extensionListRow($extKey,$list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'),$theRowClass);
|
||
}
|
||
}
|
||
if(count($extensions)) {
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/sysf.gif', 'width="18" height="16"').'align="top" alt="" /><strong>'.htmlspecialchars($this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName)).'</strong></td></tr>';
|
||
$lines[] = implode(LF,$extensions);
|
||
}
|
||
}
|
||
$content.='
|
||
<!--
|
||
EXTENSION KEYS:
|
||
'.trim(implode(LF,$allKeys)).'
|
||
-->
|
||
';
|
||
$content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'avail', $GLOBALS['BACK_PATH'], '|<br />');
|
||
$content.= sprintf($GLOBALS['LANG']->getLL('how_to_install'), $this->installButton()) . ' <br />' .
|
||
sprintf($GLOBALS['LANG']->getLL('how_to_uninstall'), $this->removeButton()). ' <br /><br />';
|
||
$content .= '<form action="index.php" method="post" name="lookupform">';
|
||
$content .= '<label for="lookUp">' . $GLOBALS['LANG']->getLL('look_up') . '</label> <input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->lookUpStr) . '" /><input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" /></form><br /><br />';
|
||
$content.= $this->securityHint.'<br /><br />';
|
||
$content.= '<table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
|
||
$this->content.=$this->doc->section(sprintf($GLOBALS['LANG']->getLL('available_extensions'), $this->MOD_MENU['listOrder'][$this->MOD_SETTINGS['listOrder']]),$content,0,1);
|
||
}
|
||
}
|
||
/**
|
||
* Listing remote extensions from online repository
|
||
*
|
||
* @return void
|
||
*/
|
||
function extensionList_import() {
|
||
global $TYPO3_LOADED_EXT;
|
||
$content='';
|
||
// Listing from online repository:
|
||
if ($this->listRemote) {
|
||
list($inst_list,) = $this->getInstalledExtensions();
|
||
$this->inst_keys = array_flip(array_keys($inst_list));
|
||
$this->detailCols[1]+=6;
|
||
// see if we have an extensionlist at all
|
||
$this->extensionCount = $this->xmlhandler->countExtensions();
|
||
if (!$this->extensionCount) {
|
||
$content .= $this->fetchMetaData('extensions');
|
||
}
|
||
if($this->MOD_SETTINGS['listOrder']=='author_company') {
|
||
$this->listingLimit = $this->listingLimitAuthor;
|
||
}
|
||
$this->pointer = intval(t3lib_div::_GP('pointer'));
|
||
$offset = $this->listingLimit*$this->pointer;
|
||
if($this->MOD_SETTINGS['display_own'] && strlen($this->fe_user['username'])) {
|
||
$this->xmlhandler->searchExtensionsXML($this->listRemote_search, $this->fe_user['username'], $this->MOD_SETTINGS['listOrder']);
|
||
} else {
|
||
$this->xmlhandler->searchExtensionsXML($this->listRemote_search, '', $this->MOD_SETTINGS['listOrder'], false, false, $offset, $this->listingLimit);
|
||
}
|
||
if (count($this->xmlhandler->extensionsXML)) {
|
||
list($list,$cat) = $this->prepareImportExtList(true);
|
||
// Available extensions
|
||
if (is_array($cat[$this->MOD_SETTINGS['listOrder']])) {
|
||
$lines=array();
|
||
$lines[]=$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'),1);
|
||
foreach($cat[$this->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
|
||
if (count($extEkeys)) {
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
|
||
$lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/sysf.gif', 'width="18" height="16"').'align="top" alt="" /><strong>'.htmlspecialchars($this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName)).'</strong></td></tr>';
|
||
natcasesort($extEkeys);
|
||
foreach ($extEkeys as $extKey => $value) {
|
||
$version = array_keys($list[$extKey]['versions']);
|
||
$version = end($version);
|
||
$ext = $list[$extKey]['versions'][$version];
|
||
$ext['downloadcounter_all'] = $list[$extKey]['downloadcounter'];
|
||
$ext['_ICON'] = $list[$extKey]['_ICON'];
|
||
$loadUnloadLink='';
|
||
if ($inst_list[$extKey]['type']!='S' && (!isset($inst_list[$extKey]) || $this->versionDifference($version,$inst_list[$extKey]['EM_CONF']['version'],$this->versionDiffFactor))) {
|
||
if (isset($inst_list[$extKey])) {
|
||
// update
|
||
if ($inst_list[$extKey]['EM_CONF']['state'] != 'excludeFromUpdates') {
|
||
$loc= ($inst_list[$extKey]['type']=='G'?'G':'L');
|
||
$aUrl = 'index.php?CMD[importExt]='.$extKey.'&CMD[extVersion]='.$version.'&CMD[loc]='.$loc;
|
||
$loadUnloadLink .= '<a href="' . htmlspecialchars($aUrl) . '"><img src="' . $GLOBALS['BACK_PATH'] . 'gfx/import_update.gif" width="12" height="12" title="' . sprintf($GLOBALS['LANG']->getLL('do_update'), ($loc == 'G' ? $GLOBALS['LANG']->getLL('global') : $GLOBALS['LANG']->getLL('local'))) . '" alt="" /></a>';
|
||
} else {
|
||
// extension is marked as "excludeFromUpdates"
|
||
$loadUnloadLink .= '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/icon_warning.gif" width="18" height="16" title="' . $GLOBALS['LANG']->getLL('excluded_from_updates') . '" alt="" />';
|
||
}
|
||
} else {
|
||
// import
|
||
$aUrl = 'index.php?CMD[importExt]='.$extKey.'&CMD[extVersion]='.$version.'&CMD[loc]=L';
|
||
$loadUnloadLink .= '<a href="' . htmlspecialchars($aUrl) . '"><img src="' . $GLOBALS['BACK_PATH'] . 'gfx/import.gif" width="12" height="12" title="' . $GLOBALS['LANG']->getLL('import_to_local_dir') . '" alt="" /></a>';
|
||
}
|
||
} else {
|
||
$loadUnloadLink = ' ';
|
||
}
|
||
if (isset($inst_list[$extKey])) {
|
||
$theRowClass = t3lib_extMgm::isLoaded($extKey) ? 'em-listbg1' : 'em-listbg2';
|
||
} else {
|
||
$theRowClass = 'em-listbg3';
|
||
}
|
||
$lines[]=$this->extensionListRow($extKey,$ext,array('<td class="bgColor">'.$loadUnloadLink.'</td>'),$theRowClass,$inst_list,1,'index.php?CMD[importExtInfo]='.rawurlencode($extKey));
|
||
unset($list[$extKey]);
|
||
}
|
||
}
|
||
}
|
||
unset($list);
|
||
// CSH:
|
||
$content .= t3lib_BEfunc::cshItem('_MOD_tools_em', 'import_ter', $GLOBALS['BACK_PATH'], '|<br />');
|
||
$onsubmit = "window.location.href='index.php?ter_connect=1&ter_search='+escape(this.elements['lookUp'].value);return false;";
|
||
$content .= '<form action="index.php" method="post" onsubmit="' . htmlspecialchars($onsubmit) .
|
||
'"><label for="lookUp">' .
|
||
sprintf($GLOBALS['LANG']->getLL('list_or_look_up'),
|
||
($this->MOD_SETTINGS['display_unchecked'] ?
|
||
'<strong style="color:#900;">' . $GLOBALS['LANG']->getLL('list_or_look_up_all') . '</strong>'
|
||
: '<strong style="color:#090;">' . $GLOBALS['LANG']->getLL('list_or_look_up_reviewed') . '</strong>'
|
||
)
|
||
) .
|
||
'</label><br />
|
||
<input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->listRemote_search) .
|
||
'" /> <input type="submit" value="' . $GLOBALS['LANG']->getLL('look_up_button') . '" /></form><br /><br />';
|
||
$content .= $this->browseLinks();
|
||
$content.= '
|
||
<!-- TER Extensions list -->
|
||
<table border="0" cellpadding="2" cellspacing="1">'.implode(LF,$lines).'</table>';
|
||
$content .= '<br />'.$this->browseLinks();
|
||
$content.= '<br /><br />'.$this->securityHint;
|
||
$content .= '<br /><br /><strong>' . $GLOBALS['LANG']->getLL('privacy_notice_header') .
|
||
'</strong><br /> ' . $this->privacyNotice;
|
||
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('extensions_repository_group_by') . ' ' .
|
||
$this->MOD_MENU['listOrder'][$this->MOD_SETTINGS['listOrder']], $content, 0, 1);
|
||
// Plugins which are NOT uploaded to repository but present on this server.
|
||
$content='';
|
||
$lines=array();
|
||
if (count($this->inst_keys)) {
|
||
foreach ($this->inst_keys as $extKey => $value) {
|
||
$this->xmlhandler->searchExtensionsXMLExact($extKey, '', '', true);
|
||
if((strlen($this->listRemote_search) && !stristr($extKey,$this->listRemote_search)) || isset($this->xmlhandler->extensionsXML[$extKey])) continue;
|
||
$loadUnloadLink = t3lib_extMgm::isLoaded($extKey)?
|
||
'<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->removeButton().'</a>':
|
||
'<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->installButton().'</a>';
|
||
if (in_array($extKey,$this->requiredExt)) {
|
||
$loadUnloadLink = '<strong>' .$GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('extension_required_short')) . '</strong>';
|
||
}
|
||
$lines[]=$this->extensionListRow($extKey,$inst_list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'),t3lib_extMgm::isLoaded($extKey)?'em-listbg1':'em-listbg2');
|
||
}
|
||
}
|
||
if(count($lines)) {
|
||
$content .= $GLOBALS['LANG']->getLL('list_of_local_extensions') .
|
||
'<br />' . $GLOBALS['LANG']->getLL('might_be_user_defined') . '<br /><br />';
|
||
$content.= '<table border="0" cellpadding="2" cellspacing="1">'.
|
||
$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>')).
|
||
implode('',$lines).'</table>';
|
||
$this->content.=$this->doc->spacer(20);
|
||
$this->content.=$this->doc->section($GLOBALS['LANG']->getLL('only_on_this_server'), $content, 0, 1);
|
||
}
|
||
}
|
||
} else {
|
||
$content .= t3lib_BEfunc::cshItem('_MOD_tools_em', 'import_ter', $GLOBALS['BACK_PATH'], '|<br />');
|
||
$onsubmit = "window.location.href='index.php?ter_connect=1&ter_search='+escape(this.elements['lookUp'].value);return false;";
|
||
$content .= '<form action="index.php" method="post" onsubmit="' . htmlspecialchars($onsubmit) .
|
||
'"><label for="lookUp">' .
|
||
sprintf($GLOBALS['LANG']->getLL('list_or_look_up'),
|
||
($this->MOD_SETTINGS['display_unchecked'] ?
|
||
'<strong style="color:#900;">' . $GLOBALS['LANG']->getLL('list_or_look_up_all') . '</strong>'
|
||
: '<strong style="color:#090;">' . $GLOBALS['LANG']->getLL('list_or_look_up_reviewed') . '</strong>'
|
||
)
|
||
) .
|
||
'</label><br />
|
||
<input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->listRemote_search) .
|
||
'" /> <input type="submit" value="' . $GLOBALS['LANG']->getLL('look_up_button') . '" /></form><br /><br />';
|
||
$content .= '<p><strong>' . $GLOBALS['LANG']->getLL('no_matching_extensions') . '</strong></p>';
|