Feature #19698 » 9944_v2.diff
typo3/mod/tools/em/class.em_index.php (working copy) | ||
---|---|---|
if (count($this->inst_keys)) {
|
||
reset($this->inst_keys);
|
||
while(list($extKey)=each($this->inst_keys)) {
|
||
$this->xmlhandler->searchExtensionsXML($extKey, '', '', true);
|
||
$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)?
|
||
... | ... | |
$content = '<form action="index.php" method="post" name="pageform">';
|
||
// Fetch remote data:
|
||
$this->xmlhandler->searchExtensionsXML($extKey, '', '', true, true);
|
||
$this->xmlhandler->searchExtensionsXMLExact($extKey, '', '', true, true);
|
||
list($fetchData,) = $this->prepareImportExtList(true);
|
||
$versions = array_keys($fetchData[$extKey]['versions']);
|
||
... | ... | |
if (!$this->xmlhandler->countExtensions()) {
|
||
$this->fetchMetaData('extensions');
|
||
}
|
||
$this->xmlhandler->searchExtensionsXML($extKey, '', '', true);
|
||
$this->xmlhandler->searchExtensionsXMLExact($extKey, '', '', true);
|
||
// check if extension can be fetched
|
||
if(isset($this->xmlhandler->extensionsXML[$extKey])) {
|
||
... | ... | |
} else return 'Wrong file format. No data recognized, '.$fetchData;
|
||
} else return 'No file uploaded! Probably the file was too large for PHPs internal limit for uploadable files.';
|
||
} else {
|
||
$this->xmlhandler->searchExtensionsXML($extKey, '', '', true, true);
|
||
$this->xmlhandler->searchExtensionsXMLExact($extKey, '', '', true, true);
|
||
// Fetch extension from TER:
|
||
if(!strlen($version)) {
|
||
... | ... | |
'</tr>';
|
||
foreach ($extList[0] as $name => $data) {
|
||
$this->xmlhandler->searchExtensionsXML($name, '', '', false, true);
|
||
$this->xmlhandler->searchExtensionsXMLExact($name, '', '', false, true);
|
||
if (!is_array($this->xmlhandler->extensionsXML[$name])) {
|
||
continue;
|
||
}
|
typo3/mod/tools/em/class.em_xmlhandler.php (working copy) | ||
---|---|---|
/**
|
||
* Reduces the entries in $this->extensionsXML to the latest version per extension and removes entries not matching the search parameter
|
||
*
|
||
* @param string $search The list of extensions is reduced to entries matching this. If empty, the full list is returned.
|
||
* @param string $owner If set only extensions of that user are fetched
|
||
* @param string $order A field to order the result by
|
||
* @param boolean $allExt If set also unreviewed and obsolete extensions are shown
|
||
* @param boolean $allVer If set returns all version of an extension, otherwise only the last
|
||
* @param integer $offset Offset to return result from (goes into LIMIT clause)
|
||
* @param integer $limit Maximum number of entries to return (goes into LIMIT clause)
|
||
* @param string $search The list of extensions is reduced to entries matching this. If empty, the full list is returned.
|
||
* @param string $owner If set only extensions of that user are fetched
|
||
* @param string $order A field to order the result by
|
||
* @param boolean $allExt If set also unreviewed and obsolete extensions are shown
|
||
* @param boolean $allVer If set returns all version of an extension, otherwise only the last
|
||
* @param integer $offset Offset to return result from (goes into LIMIT clause)
|
||
* @param integer $limit Maximum number of entries to return (goes into LIMIT clause)
|
||
* @param boolean $exactMatch If set search is done for exact matches of extension keys only
|
||
* @return void
|
||
*/
|
||
function searchExtensionsXML($search, $owner='', $order='', $allExt=false, $allVer=false, $offset=0, $limit=500) {
|
||
function searchExtensionsXML($search, $owner='', $order='', $allExt=false, $allVer=false, $offset=0, $limit=500, $exactMatch=false) {
|
||
$where = '1=1';
|
||
if ($search) {
|
||
if ($search && $exactMatch) {
|
||
$where.= ' AND extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($search, 'cache_extensions');
|
||
} elseif($search) {
|
||
$where.= ' AND extkey LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($GLOBALS['TYPO3_DB']->escapeStrForLike($search, 'cache_extensions'), 'cache_extensions').'%\'';
|
||
}
|
||
if ($owner) {
|
||
... | ... | |
}
|
||
$GLOBALS['TYPO3_DB']->sql_free_result($res);
|
||
}
|
||
|
||
/**
|
||
* Reduces the entries in $this->extensionsXML to the latest version per extension and removes entries not matching the search parameter
|
||
* The extension key has to be a valid one as search is done for exact matches only.
|
||
*
|
||
* @param string $search The list of extensions is reduced to entries with exactely this extension key. If empty, the full list is returned.
|
||
* @param string $owner If set only extensions of that user are fetched
|
||
* @param string $order A field to order the result by
|
||
* @param boolean $allExt If set also unreviewed and obsolete extensions are shown
|
||
* @param boolean $allVer If set returns all version of an extension, otherwise only the last
|
||
* @param integer $offset Offset to return result from (goes into LIMIT clause)
|
||
* @param integer $limit Maximum number of entries to return (goes into LIMIT clause)
|
||
* @return void
|
||
*/
|
||
function searchExtensionsXMLExact($search, $owner='', $order='', $allExt=false, $allVer=false, $offset=0, $limit=500) {
|
||
$this->searchExtensionsXML($search, $owner, $order, $allExt, $allVer, $offset, $limit, true);
|
||
}
|
||
function countExtensions() {
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('extkey', 'cache_extensions', '1=1', 'extkey');
|
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »