Commit 717f540d authored by robert's avatar robert

See Changelog


git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/trunk@2451 735d13b6-9817-0410-8766-e36946ffe9aa
parent a8360835
05.03.2006 Robert Lemke <robert@typo3.org>
+ File downloads are now passed through a function which sends correct HTTP headers and nicer file names.
17.01.2006 Robert Lemke <robert@typo3.org>
~ Changed a lot ...
~ Converted locallang to XML
......
......@@ -185,7 +185,7 @@ class tx_terfe_common {
$extensionRecord[$key] = unserialize ($value);
break;
case 'lastuploaddate':
$extensionRecord[$key] = date ($this->getLL('general_dateandtimeformat'), $value);
$extensionRecord[$key] = strftime($this->getLL('general_dateandtimeformat'), $value);
break;
case 'versiondownloadcounter':
$extensionRecord[$key] = intval($extensionRecord['extensiondownloadcounter']).' / '.intval($value);
......@@ -271,25 +271,25 @@ class tx_terfe_common {
* following the format major.minor.dev (eg. 4.2.1) will be returned.
*
* @param string $extKey: Extension key
* @param boolean $ignoreReviewState: If set to TRUE, even unreviewed extension versions will be taken into account
* @return mixed The version number as a string or FALSE
* @access public
*/
public function db_getLatestVersionNumberOfExtension ($extensionKey) {
public function db_getLatestVersionNumberOfExtension ($extensionKey, $ignoreReviewState=FALSE) {
global $TYPO3_DB;
$res = $TYPO3_DB->exec_SELECTquery (
'version',
'tx_terfe_extensions',
'extensionkey="'.$TYPO3_DB->quoteStr($extensionKey, 'tx_terfe_extensions').'" AND reviewstate > 0'
'extensionkey="'.$TYPO3_DB->quoteStr($extensionKey, 'tx_terfe_extensions').'"' . ($ignoreReviewState ? '' : ' AND reviewstate > 0')
);
$latestVersion = FALSE;
$latestVersion = '0';
while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
if (version_compare($row['version'], $latestVersion, '>')) {
$latestVersion = $row['version'];
}
}
return $latestVersion;
}
return $latestVersion == '0' ? FALSE : $latestVersion;
}
/**
......@@ -396,6 +396,55 @@ class tx_terfe_common {
*
*********************************************************/
/**
* Renders the top tab menu which allows for selection of the different views.
*
* @param array $menuItems: Array of key values for the menu items
* @return string HTML output, enclosed in a DIV
* @access public
*/
public function getTopMenu($menuItems) {
// Render the top menu
$counter = 0;
foreach ($menuItems as $itemKey) {
$activeItemsArr[$counter] = $this->pObj->piVars['view'] == $itemKey;
$counter ++;
}
$counter = 0;
$topMenuItems = '';
foreach ($menuItems as $itemKey) {
$this->pObj->pi_linkTP('', array($this->pObj->prefixId.'[view]' => $itemKey), 1);
$link = '<a href="'.$this->pObj->cObj->lastTypoLinkUrl.'" '.($activeItemsArr[$counter] ? 'class="active"' : '').'>'.$this->pObj->pi_getLL('views_'.$itemKey,'',1).'</a>';
if ($activeItemsArr[$counter]) {
if ($counter > 0) {
$topMenuItems .= '<div><img src="fileadmin/templates/images/terfe-tabnav-act-left.gif" alt="" /></div>';
}
$topMenuItems .= $link.'
<div><img src="fileadmin/templates/images/terfe-tabnav-act-right.gif" alt="" /></div>
';
} else {
if ($counter > 0 && !$activeItemsArr[$counter-1]) {
$topMenuItems .= '<div><img src="fileadmin/templates/images/terfe-tabnav-right.gif" alt="" /></div>';
}
$topMenuItems .= $link;
}
$counter ++;
}
$topMenu = '
<div class="terfe-tabnav">
<div><img src="fileadmin/templates/images/terfe-tabnav-'.($activeItemsArr[0] ? 'act-' : '').'start.gif" alt="" /></div>
'.$topMenuItems.'
<div><img src="fileadmin/templates/images/terfe-tabnav-end.gif" alt="" /></div>
</div>
';
return $topMenu;
}
/**
* Renders dependency information for frontend output from the given
* depencies array
......@@ -545,7 +594,8 @@ class tx_terfe_common {
$tableRows = array ();
foreach ($filesArr as $fileName => $fileArr) {
if (t3lib_div::inList ('php,txt,tml,htm,xml,sql,asc,log,jpg,gif,png,css', strtolower (substr ($fileName, -3, 3)))) {
$downloadLink = $this->pObj->pi_linkTP_keepPIvars ($this->getLL('general_download','',1), array('downloadFile' => urlencode($fileName)), 1);
if (t3lib_div::inList ('php,txt,tmpl,htm,xml,sql,asc,log,jpg,gif,png,css', strtolower (substr ($fileName, -3, 3)))) {
$viewLink = $this->pObj->pi_linkTP_keepPIvars ($this->getLL('general_view','',1), array('viewFile' => urlencode($fileName)), 1);
} else {
$viewLink = '';
......@@ -555,8 +605,8 @@ class tx_terfe_common {
<td nowrap="nowrap">'.$this->csConvHSC ($fileName).'</td>
<td nowrap="nowrap">'.t3lib_div::formatSize($fileArr['size']).'</td>
<td nowrap="nowrap">'.$viewLink.'</td>
<td nowrap="nowrap">'.date($this->getLL('general_dateandtimeformat'), $fileArr['mtime']).'</td>
<td nowrap="nowrap"><a href="'.$tempDir.$fileArr['tempfilename'].'">'.$this->getLL('general_download','',1).'</a></td>
<td nowrap="nowrap">'.strftime($this->getLL('general_dateandtimeformat'), $fileArr['mtime']).'</td>
<td nowrap="nowrap">'.$downloadLink.'</td>
</tr>
';
}
......@@ -564,6 +614,13 @@ class tx_terfe_common {
$t3xDownloadURL = substr ($this->getExtensionVersionPathAndBaseName($extensionDetailsArr['extensionkey'], $extensionDetailsArr['version']).'.t3x', strlen(PATH_site));
$filePreview = '';
if (isset($this->pObj->piVars['downloadFile']) && is_array ($filesArr[urldecode($this->pObj->piVars['downloadFile'])])) {
$filename = basename(urldecode($this->pObj->piVars['downloadFile']));
$this->transferFile ($tempDir.basename($filesArr[urldecode($this->pObj->piVars['downloadFile'])]['tempfilename']), $filename);
unset ($this->pObj->piVars['downloadFile']);
return '';
}
if (isset($this->pObj->piVars['viewFile']) && is_array ($filesArr[urldecode($this->pObj->piVars['viewFile'])])) {
$filePreview = $this->getRenderedFilePreview ($tempDir.basename($filesArr[urldecode($this->pObj->piVars['viewFile'])]['tempfilename']));
}
......@@ -593,7 +650,7 @@ class tx_terfe_common {
public function getRenderedFilePreview ($pathAndFileName) {
$output = '<strong>'.htmlspecialchars(sprintf ($this->getLL('extension_filepreview',''), basename($pathAndFileName))).':</strong><br />';
if (t3lib_div::inList ('php,txt,xml,sql,log,css,tml,htm,asc', strtolower (substr ($pathAndFileName, -3, 3)))) {
if (t3lib_div::inList ('php,txt,xml,sql,log,css,tmpl,htm,asc', strtolower (substr ($pathAndFileName, -3, 3)))) {
ob_start();
highlight_file(PATH_site.$pathAndFileName);
$output .= ob_get_contents();
......@@ -609,10 +666,6 @@ class tx_terfe_common {
return $output;
}
/**
* Returns the image tag for an icon of an extension.
*
......@@ -624,11 +677,10 @@ class tx_terfe_common {
public function getIcon_extension($extensionKey, $version) {
$iconFileName = $this->getExtensionVersionPathAndBaseName($extensionKey, $version).'.gif';
if (@is_file($iconFileName)) {
$iconTag = '<img src="'.t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').substr($iconFileName, strlen(PATH_site)).'" alt="'.htmlspecialchars($extensionKey).'" />';
$iconTag = '<img src="'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').substr($iconFileName, strlen(PATH_site)).'" alt="'.htmlspecialchars($extensionKey).'" />';
} else {
$iconTag = '';
}
return $iconTag;
}
......@@ -641,9 +693,9 @@ class tx_terfe_common {
*/
public function getIcon_state ($state) {
if (t3lib_div::inList ($this->validStates, $state)) {
return '<img src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/state_'.$state.'.gif" width="109" height="17" alt="'.$this->getLL('extension_state_'.$state,'',1).'" title="'.$this->getLL('extension_state_'.$state,'',1).'" />';
return '<img src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/state_'.$state.'.gif" width="109" height="21" alt="'.$this->getLL('extension_state_'.$state,'',1).'" title="'.$this->getLL('extension_state_'.$state,'',1).'" />';
} else {
return '<img src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/state_na.gif" width="109" height="17" alt="" title="" />';
return '<img src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/state_na.gif" width="109" height="21" alt="" title="" />';
}
}
......@@ -698,6 +750,30 @@ class tx_terfe_common {
return unserialize ($dataUncompressed);
}
/**
* Transfers a file to the client browser.
* NOTE: This function must be called *before* any HTTP headers have been sent!
*
* @param string $fullPath: Full absolute path including filename which leads to the file to be transfered
* @param string $visibleFilename: File name which is visible for the user while downloading. If not set, the real file name will be used
* @return boolean TRUE if successful, FALSE if file did not exist. *
* @access protected
*/
protected function transferFile ($fullPath, $visibleFilename=NULL) {
if (!@file_exists($fullPath)) return FALSE;
$filename = basename($fullPath);
if (!isset($visibleFilename)) $visibleFilename = $filename;
header('Content-Disposition: attachment; filename='.$visibleFilename.'');
header('Content-type: x-application/octet-stream');
header('Content-Transfer-Encoding: binary');
header('Content-length:'.filesize($fullPath).'');
readfile($fullPath);
return TRUE;
}
......@@ -731,7 +807,11 @@ class tx_terfe_common {
// Transfer data from extensions.xml.gz to database:
$extensions = simplexml_load_string (@implode ('', @gzfile($this->repositoryDir.'extensions.xml.gz')));
if ($extensions === FALSE) return;
if ($extensions === FALSE) {
$debugArr = @gzfile($this->repositoryDir.'extensions.xml.gz');
@unlink (PATH_site.'typo3temp/tx_terfe/tx_terfe_updatedbextensionindex.lock');
return;
}
$TYPO3_DB->exec_DELETEquery ('tx_terfe_extensions', '1');
$TYPO3_DB->exec_DELETEquery ('tx_terfe_extensiondependencies', '1');
......@@ -797,7 +877,7 @@ class tx_terfe_common {
*/
protected function extensionIndex_wasModified () {
$oldMD5Hash = @file_get_contents (PATH_site.'typo3temp/tx_terfe/tx_terfe_extensionsmd5.txt');
$currentMD5Hash = @md5_file($this->repositoryDir.'extensions.xml.gz');
$currentMD5Hash = md5_file($this->repositoryDir.'extensions.xml.gz');
return ($oldMD5Hash != $currentMD5Hash);
}
......
# cat=basic//; type=string; label=WSDL URI:The official WSDL URI for the TER SOAP service
WSDLURI = http://typo3.org/wsdl/tx_ter.wsdl
WSDLURI = http://typo3.org/wsdl/tx_ter_wsdl.php
# cat=basic//; type=string; label=TER SOAP Service URI
SOAPServiceURI = http://repositories.typo3.org/ter/soap
......@@ -2,14 +2,15 @@
########################################################################
# Extension Manager/Repository config file for ext: "ter_fe"
#
# Auto generated 16-12-2005 00:20
#
#
# Auto generated 17-02-2006 15:51
#
# Manual updates:
# Only the data in the array - anything else is removed by next write
# Only the data in the array - anything else is removed by next write.
# "version" and "dependencies" must not be touched!
########################################################################
$EM_CONF[$_EXTKEY] = Array (
$EM_CONF[$_EXTKEY] = array(
'title' => 'TER Frontend',
'description' => 'Frontend for the TYPO3 Extension Repository',
'category' => 'fe',
......@@ -28,10 +29,19 @@ $EM_CONF[$_EXTKEY] = Array (
'clearCacheOnLoad' => 0,
'lockType' => '',
'author_company' => 'The TYPO3 Association',
'private' => '',
'download_password' => '',
'version' => '0.0.0', // Don't modify this! Managed automatically during upload to repository.
'_md5_values_when_last_written' => 'a:52:{s:8:".project";s:4:"e45a";s:9:"ChangeLog";s:4:"b757";s:21:"ext_conf_template.txt";s:4:"fcd1";s:12:"ext_icon.gif";s:4:"1cd6";s:17:"ext_localconf.php";s:4:"1725";s:14:"ext_tables.php";s:4:"d86f";s:14:"ext_tables.sql";s:4:"d02d";s:24:"ext_typoscript_setup.txt";s:4:"35fc";s:30:"flexform_ds_pluginmode_pi1.xml";s:4:"ec1e";s:30:"flexform_ds_pluginmode_pi2.xml";s:4:"79a4";s:13:"locallang.php";s:4:"e79a";s:16:"locallang_db.php";s:4:"ce48";s:14:"doc/manual.sxw";s:4:"fe2d";s:14:"pi1/ce_wiz.gif";s:4:"02b6";s:26:"pi1/class.tx_terfe_pi1.php";s:4:"4233";s:34:"pi1/class.tx_terfe_pi1_wizicon.php";s:4:"8221";s:13:"pi1/clear.gif";s:4:"cc11";s:17:"pi1/locallang.php";s:4:"039a";s:15:"pi1/CVS/Entries";s:4:"e230";s:18:"pi1/CVS/Repository";s:4:"2ab0";s:12:"pi1/CVS/Root";s:4:"a7f0";s:14:"pi2/ce_wiz.gif";s:4:"02b6";s:26:"pi2/class.tx_terfe_pi2.php";s:4:"7301";s:34:"pi2/class.tx_terfe_pi2_wizicon.php";s:4:"3d1e";s:13:"pi2/clear.gif";s:4:"cc11";s:17:"pi2/locallang.php";s:4:"12f8";s:15:"pi2/CVS/Entries";s:4:"2de4";s:18:"pi2/CVS/Repository";s:4:"f18b";s:12:"pi2/CVS/Root";s:4:"a7f0";s:22:"res/changepassword.gif";s:4:"8be0";s:14:"res/delete.gif";s:4:"46fc";s:13:"res/error.gif";s:4:"3dee";s:12:"res/info.gif";s:4:"eed4";s:19:"res/state_alpha.gif";s:4:"2842";s:18:"res/state_beta.gif";s:4:"9df8";s:26:"res/state_experimental.gif";s:4:"a039";s:16:"res/state_na.gif";s:4:"fb15";s:22:"res/state_obsolete.gif";s:4:"a69b";s:20:"res/state_stable.gif";s:4:"de1c";s:18:"res/state_test.gif";s:4:"f92e";s:19:"res/transferkey.gif";s:4:"ba35";s:15:"res/CVS/Entries";s:4:"77e1";s:18:"res/CVS/Repository";s:4:"8e57";s:12:"res/CVS/Root";s:4:"a7f0";s:11:"CVS/Entries";s:4:"e502";s:14:"CVS/Repository";s:4:"02e7";s:8:"CVS/Root";s:4:"a7f0";s:14:"pi3/ce_wiz.gif";s:4:"02b6";s:26:"pi3/class.tx_terfe_pi3.php";s:4:"3c02";s:34:"pi3/class.tx_terfe_pi3_wizicon.php";s:4:"fa7e";s:13:"pi3/clear.gif";s:4:"cc11";s:17:"pi3/locallang.php";s:4:"6870";}',
'version' => '0.0.0',
'_md5_values_when_last_written' => 'a:66:{s:9:"ChangeLog";s:4:"a36f";s:25:"class.tx_terfe_common.php";s:4:"4abe";s:21:"ext_conf_template.txt";s:4:"0902";s:12:"ext_icon.gif";s:4:"1cd6";s:17:"ext_localconf.php";s:4:"1725";s:14:"ext_tables.php";s:4:"4414";s:14:"ext_tables.sql";s:4:"d99a";s:24:"ext_typoscript_setup.txt";s:4:"35fc";s:30:"flexform_ds_pluginmode_pi1.xml";s:4:"ec1e";s:30:"flexform_ds_pluginmode_pi2.xml";s:4:"79a4";s:13:"locallang.xml";s:4:"01d3";s:20:"locallang_common.xml";s:4:"43d4";s:16:"locallang_db.xml";s:4:"1438";s:14:"doc/manual.sxw";s:4:"fe2d";s:15:"doc/CVS/Entries";s:4:"f1f2";s:18:"doc/CVS/Repository";s:4:"ebcc";s:12:"doc/CVS/Root";s:4:"a7f0";s:14:"pi1/ce_wiz.gif";s:4:"02b6";s:26:"pi1/class.tx_terfe_pi1.php";s:4:"bbf6";s:34:"pi1/class.tx_terfe_pi1_wizicon.php";s:4:"458c";s:30:"pi1/class.tx_terfe_ratings.php";s:4:"e4c2";s:13:"pi1/clear.gif";s:4:"cc11";s:17:"pi1/locallang.xml";s:4:"a2e4";s:15:"pi1/CVS/Entries";s:4:"a5c2";s:18:"pi1/CVS/Repository";s:4:"2ab0";s:12:"pi1/CVS/Root";s:4:"a7f0";s:14:"pi2/ce_wiz.gif";s:4:"02b6";s:26:"pi2/class.tx_terfe_pi2.php";s:4:"9b30";s:34:"pi2/class.tx_terfe_pi2_wizicon.php";s:4:"b97e";s:13:"pi2/clear.gif";s:4:"cc11";s:17:"pi2/locallang.xml";s:4:"63ff";s:15:"pi2/CVS/Entries";s:4:"cc3a";s:18:"pi2/CVS/Repository";s:4:"f18b";s:12:"pi2/CVS/Root";s:4:"a7f0";s:22:"res/changepassword.gif";s:4:"8be0";s:20:"res/comparefiles.gif";s:4:"4e40";s:14:"res/delete.gif";s:4:"46fc";s:13:"res/error.gif";s:4:"2611";s:16:"res/greenled.gif";s:4:"48a7";s:15:"res/greyled.gif";s:4:"3bd8";s:12:"res/info.gif";s:4:"d67e";s:14:"res/redled.gif";s:4:"c9cc";s:19:"res/state_alpha.gif";s:4:"f971";s:18:"res/state_beta.gif";s:4:"81f5";s:26:"res/state_experimental.gif";s:4:"1698";s:16:"res/state_na.gif";s:4:"fb15";s:22:"res/state_obsolete.gif";s:4:"6cd7";s:20:"res/state_stable.gif";s:4:"59f7";s:18:"res/state_test.gif";s:4:"f92e";s:19:"res/transferkey.gif";s:4:"ba35";s:15:"res/warning.gif";s:4:"3330";s:17:"res/yellowled.gif";s:4:"d927";s:15:"res/CVS/Entries";s:4:"e383";s:18:"res/CVS/Repository";s:4:"8e57";s:12:"res/CVS/Root";s:4:"a7f0";s:11:"CVS/Entries";s:4:"1f36";s:14:"CVS/Repository";s:4:"02e7";s:8:"CVS/Root";s:4:"a7f0";s:14:"pi3/ce_wiz.gif";s:4:"02b6";s:26:"pi3/class.tx_terfe_pi3.php";s:4:"d257";s:34:"pi3/class.tx_terfe_pi3_wizicon.php";s:4:"bf4f";s:13:"pi3/clear.gif";s:4:"cc11";s:17:"pi3/locallang.xml";s:4:"9a33";s:15:"pi3/CVS/Entries";s:4:"ad02";s:18:"pi3/CVS/Repository";s:4:"81c9";s:12:"pi3/CVS/Root";s:4:"a7f0";}',
'constraints' => array(
'depends' => array(
'cms' => '',
'lang' => '',
'captcha' => '',
),
'conflicts' => array(
),
'suggests' => array(
),
),
);
?>
\ No newline at end of file
......@@ -56,7 +56,7 @@
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="general_dateandtimeformat">d-m-y h:m</label>
<label index="general_dateandtimeformat">%d.%m.%Y - %H:%M</label>
<label index="general_back">Back</label>
<label index="general_view">View</label>
<label index="general_terdocnotinstalled">Documentation extension not installed</label>
......
This diff is collapsed.
......@@ -45,7 +45,7 @@ class tx_terfe_pi1_wizicon {
return $wizardItems;
}
function includeLocalLang() {
include(t3lib_extMgm::extPath('ter_fe').'locallang,xml');
# include(t3lib_extMgm::extPath('ter_fe').'locallang.xml');
return $LOCAL_LANG;
}
}
......
......@@ -51,12 +51,14 @@
<label index="views_popular">Popular</label>
<label index="views_search">Search</label>
<label index="views_fulllist">Full list</label>
<label index="views_unsupported">Unsupported</label>
<label index="views_unsupported">Unreviewed</label>
<label index="views_reviewed">Reviewed</label>
<label index="listview_new_introduction">These extensions have been added or updated during the last %s days:</label>
<label index="listview_popular_introduction">This list shows the 20 most popular extensions measured by all time download numbers.</label>
<label index="listview_fulllist_introduction">This is a list of all extension versions which have at least roughly been checked for possible security issues. Although we have taken great care in reviewing these extensions we cannot guarantee that all of them are secure.</label>
<label index="listview_popular_introduction">This list shows the 10 most popular extensions measured by all time download numbers.</label>
<label index="listview_fulllist_introduction">This is a list of all available extensions:</label>
<label index="listview_unsupported_introduction">The following list contains all extensions which have been uploaded recently and have not been reviewed yet or will never be imported into the official repository.</label>
<label index="listview_unsupported_introduction_warning">WARNING! These extensions have not been checked for security issues. It is not recommended using any of them in a production enviroment!</label>
<label index="listview_reviewed_introduction">This is a list of all extension versions which have at least roughly been checked for possible security issues. Although we have taken great care in reviewing these extensions we cannot guarantee that all of them are really secure.</label>
<label index="listview_search_searchbutton">Search</label>
<label index="listview_search_noresult">Sorry, your search had no results.</label>
<label index="extensioninfo_views_info">Info</label>
......
......@@ -2,7 +2,7 @@
/***************************************************************
* Copyright notice
*
* (c) 2005 Robert Lemke (robert@typo3.org)
* (c) 2005, 2006 Robert Lemke (robert@typo3.org)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......@@ -54,8 +54,6 @@ define (TX_TER_ERROR_GENERAL_NOUSERORPASSWORD, '101');
define (TX_TER_ERROR_GENERAL_USERNOTFOUND, '102');
define (TX_TER_ERROR_GENERAL_WRONGPASSWORD, '103');
define (TX_TER_ERROR_UPLOADEXTENSION_NOUPLOADPASSWORD, '200');
define (TX_TER_ERROR_UPLOADEXTENSION_WRONGUPLOADPASSWORD, '201');
define (TX_TER_ERROR_UPLOADEXTENSION_EXTENSIONDOESNTEXIST, '202');
define (TX_TER_ERROR_UPLOADEXTENSION_EXTENSIONCONTAINSNOFILES, '203');
define (TX_TER_ERROR_UPLOADEXTENSION_WRITEERRORWHILEWRITINGFILES, '204');
......@@ -77,6 +75,7 @@ define (TX_TER_RESULT_EXTENSIONKEYSUCCESSFULLYREGISTERED, '10503');
define (TX_TER_RESULT_EXTENSIONSUCCESSFULLYUPLOADED, '10504');
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('ter_fe').'class.tx_terfe_common.php');
/**
* Plugin Extension key management
......@@ -119,6 +118,11 @@ class tx_terfe_pi2 extends tslib_pibase {
$this->WSDLURI = $staticConfArr['WSDLURI'];
$this->SOAPServiceURI = $staticConfArr['SOAPServiceURI'];
}
$this->commonObj = new tx_terfe_common($this);
$this->commonObj->repositoryDir = $this->conf['repositoryDirectory'];
if (substr ($this->commonObj->repositoryDir, -1, 1) != '/') $this->commonObj->repositoryDir .= '/';
$this->commonObj->init();
}
/**
......@@ -133,6 +137,7 @@ class tx_terfe_pi2 extends tslib_pibase {
global $TSFE;
$this->init($conf);
if (!@is_dir ($this->commonObj->repositoryDir)) return 'TER_FE Error: Repository directory ('.$this->commonObj->repositoryDir.') does not exist!';
$userLoggedIn = is_array ($TSFE->fe_user->user);
$userIsAdmin = FALSE; // TODO: Admin mode not implemented yet
......@@ -174,7 +179,7 @@ class tx_terfe_pi2 extends tslib_pibase {
$content = '
<h2>'.$this->pi_getLL('general_extensionkeys', 1).'</h2>
<br />
'.$topMenu.'<br />
'.$this->commonObj->getTopMenu($menuItems).'<br />
<br />
'.$subContent.'
';
......@@ -262,7 +267,6 @@ class tx_terfe_pi2 extends tslib_pibase {
'extensionKey' => $extensionKey,
'title' => $TSFE->csConv(t3lib_div::GPVar('tx_terfe_pi2_extensionkey'), 'utf-8'),
'description' => $TSFE->csConv(t3lib_div::GPVar('tx_terfe_pi2_extensiondescription'), 'utf-8'),
'uploadPassword' => $TSFE->csConv(t3lib_div::GPVar('tx_terfe_pi2_extensionuploadpassword'), 'utf-8')
);
$result = $soapClientObj->registerExtensionKey($accountDataArr, $extensionKeyDataArr);
......@@ -317,11 +321,6 @@ class tx_terfe_pi2 extends tslib_pibase {
<td class="td-sub"><textarea name="tx_terfe_pi2_extensiondescription" rows="10" style="width:100%;"></textarea></td>
<td><em>'.$this->pi_getLL('registerkeys_extensiondescription_hint', '', 1).'</em></td>
</tr>
<tr>
<th class="th-sub" nowrap="nowrap">'.$this->pi_getLL('registerkeys_extensionuploadpassword', '', 1).':</th>
<td class="td-sub"><input type="password" name="tx_terfe_pi2_extensionuploadpassword" size="30" /></td>
<td><em>'.$this->pi_getLL('registerkeys_extensionuploadpassword_hint', '', 1).'</em></td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="text-align:right;"><input type="submit" value="'.$this->pi_getLL('registerkeys_doregister','',1).'" /></td>
......@@ -395,19 +394,6 @@ class tx_terfe_pi2 extends tslib_pibase {
}
}
break;
case 'changepassword':
$uploadPassword = t3lib_div::GPvar('tx_terfe_pi2_uploadpassword');
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
$resultArr = $soapClientObj->modifyExtensionKey($accountDataArr, array('extensionKey' => $extensionKey, 'uploadPassword' => $uploadPassword));
if (is_array ($resultArr)) {
switch ($resultArr['resultCode']) {
case TX_TER_RESULT_GENERAL_OK : $actionMessages = '<p>'.$iconInfo.' <strong>'.sprintf ($this->pi_getLL('managekeys_action_changeuploadpassword_success','',1), $extensionKey).'</strong></p><br />'; break;
default: $actionMessages = '<p>'.$iconError.' <strong>'.sprintf ($this->pi_getLL('general_errorcode','',1), $resultArr['resultCode']).'</strong></p><br />'; break;
}
}
break;
case 'deletekey':
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
......@@ -424,7 +410,6 @@ class tx_terfe_pi2 extends tslib_pibase {
// Create list of extension keys:
$filterOptionsArr = array ('username' => $TSFE->fe_user->user['username']);
$resultArr = $soapClientObj->getExtensionKeys($accountDataArr, $filterOptionsArr);
if (is_array ($resultArr) && $resultArr['simpleResult']['resultCode'] == TX_TER_RESULT_GENERAL_OK) {
$tableRows = array();
......@@ -439,27 +424,18 @@ class tx_terfe_pi2 extends tslib_pibase {
$numberOfVersions = $TYPO3_DB->sql_num_rows ($res);
$tableRows[] = '
<tr>
<td class="td-sub">'.$this->csConvHSC($extensionKeyArr['extensionkey']).'</td>
<td class="td-sub">'.$this->csConvHSC($extensionKeyArr['title']).'</td>
<td class="td-sub"><span title="'.$this->csConvHSC($extensionKeyArr['title']).'">'.$this->csConvHSC($extensionKeyArr['extensionkey']).'</span></td>
<td class="td-sub">
'.($numberOfVersions > 0 ? $numberOfVersions : '<em>'.$this->pi_getLL('general_none','',1).'</em>').'
</td>
<td class="td-sub" nowrap="nowrap">
<form action="'.$this->pi_linkTP_keepPIvars_url(array(),1).'" method="post" name="tx_terfe_pi2_register">
<input name="tx_terfe_pi2_targetusername" type="text" size="15" />
<input name="tx_terfe_pi2_targetusername" type="text" size="10" />
<input type="image" src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/transferkey.gif" alt="'.$this->pi_getLL('managekeys_action_transferkey','',1).'" title="'.$this->pi_getLL('managekeys_action_transferkey','',1).'" onFocus="blur()" />
<input name="tx_terfe_pi2_extensionkey" type="hidden" value="'.$extensionKeyArr['extensionkey'].'" />
<input name="tx_terfe_pi2_cmd" type="hidden" value="transferkey" />
</form>
</td>
<td class="td-sub" nowrap="nowrap">
<form action="'.$this->pi_linkTP_keepPIvars_url(array(),1).'" method="post" name="tx_terfe_pi2_register">
<input name="tx_terfe_pi2_newpassword" type="password" size="15" value="'.$this->pi_getLL('managekeys_newpassword','',1).'" />
<input type="image" src="'.t3lib_extMgm::siteRelPath('ter_fe').'res/changepassword.gif" alt="'.$this->pi_getLL('managekeys_action_changeuploadpassword','',1).'" title="'.$this->pi_getLL('managekeys_action_changeuploadpassword','',1).'" onFocus="blur()"/>
<input name="tx_terfe_pi2_extensionkey" type="hidden" value="'.$extensionKeyArr['extensionkey'].'" />
<input name="tx_terfe_pi2_cmd" type="hidden" value="changepassword" />
</form>
</td>
<td class="td-sub" nowrap="nowrap">
'. ($numberOfVersions == 0 ?
'<form action="'.$this->pi_linkTP_keepPIvars_url(array(),1).'" method="post" name="tx_terfe_pi2_register" onSubmit="return confirm(\''.sprintf($this->pi_getLL('managekeys_deleteareyousure','',1), $extensionKeyArr['extensionkey']).'\');">
......@@ -485,10 +461,8 @@ class tx_terfe_pi2 extends tslib_pibase {
<table>
<tr>
<th class="th-sub">'.$this->pi_getLL('registerkeys_extensionkey','',1).'</th>
<th class="th-sub">'.$this->pi_getLL('registerkeys_extensiontitle','',1).'</th>
<th class="th-sub">'.$this->pi_getLL('managekeys_uploads','',1).'</th>
<th class="th-sub">'.$this->pi_getLL('managekeys_transfer','',1).'</th>
<th class="th-sub">'.$this->pi_getLL('managekeys_changepassword','',1).'</th>
<th class="th-sub">'.$this->pi_getLL('managekeys_delete','',1).'</th>
</tr>
'.implode (chr(10),$tableRows).'
......
......@@ -45,7 +45,7 @@ class tx_terfe_pi2_wizicon {
return $wizardItems;
}
function includeLocalLang() {
include(t3lib_extMgm::extPath('ter_fe').'locallang,xml');
# include(t3lib_extMgm::extPath('ter_fe').'locallang,xml');
return $LOCAL_LANG;
}
}
......
......@@ -22,8 +22,6 @@
<label index="registerkeys_extensiontitle_hint"></label>
<label index="registerkeys_extensiondescription"></label>
<label index="registerkeys_extensiondescription_hint"></label>
<label index="registerkeys_extensionuploadpassword"></label>
<label index="registerkeys_extensionuploadpassword_hint"></label>
<label index="registerkeys_checkvalidity"></label>
<label index="registerkeys_doregister"></label>
<label index="registerkeys_extensionkeynotvalid"></label>
......@@ -52,8 +50,6 @@
<label index="managekeys_action_transferkey_usernotfound"></label>
<label index="managekeys_action_deletekey"></label>
<label index="managekeys_action_deletekey_success"></label>
<label index="managekeys_action_changeuploadpassword"></label>
<label index="managekeys_action_changeuploadpassword_success"></label>
<label index="managekeys_uploads"></label>
<label index="adminkeys_needlogin"></label>
<label index="adminkeys_needadminrights"></label>
......@@ -79,8 +75,6 @@
<label index="registerkeys_extensiontitle_hint">(required) name your extension with a title</label>
<label index="registerkeys_extensiondescription">Description</label>
<label index="registerkeys_extensiondescription_hint">Please make a short and clear statement about what this extension is about</label>
<label index="registerkeys_extensionuploadpassword">Upload password</label>
<label index="registerkeys_extensionuploadpassword_hint">The upload password is used when you want to update the repository with new versions of your extension. No password = no upload possible</label>
<label index="registerkeys_checkvalidity">check validity</label>
<label index="registerkeys_doregister">register key</label>
<label index="registerkeys_extensionkeynotvalid">Extension key not valid</label>
......@@ -99,9 +93,8 @@
<label index="registerkeys_rules_length">An extension key must have minimum 3, maximum 30 characters (not counting underscores)</label>
<label index="managekeys_needlogin">You have to be logged in in order to manage extension keys.</label>
<label index="managekeys_title">Manage your extension keys</label>
<label index="managekeys_introduction">Here you can transfer an extension key to a different TYPO3.org user, change your upload password or delete non-used extension keys. Please note that you can only delete a key if you never uploaded a version to the repository which uses that key.</label>
<label index="managekeys_introduction">Here you can transfer an extension key to a different TYPO3.org user or delete non-used extension keys. Please note that you can only delete a key if you never uploaded a version to the repository which uses that key.</label>
<label index="managekeys_transfer">Transfer to user</label>
<label index="managekeys_changepassword">Change password</label>
<label index="managekeys_delete">Delete</label>
<label index="managekeys_deleteareyousure">Are you sure you want to delete the extension key &quot;%s&quot; ?</label>
<label index="managekeys_action_transferkey">Transfer key to other user</label>
......@@ -109,8 +102,6 @@
<label index="managekeys_action_transferkey_usernotfound">Your key &quot;%s&quot; could not be transferred because user &quot;%s&quot; does not exist!</label>
<label index="managekeys_action_deletekey">Delete this key</label>
<label index="managekeys_action_deletekey_success">The extension key &quot;%s&quot; has been successfully deleted.</label>
<label index="managekeys_action_changeuploadpassword">Change upload password</label>
<label index="managekeys_action_changeuploadpassword_success">The upload password of your key &quot;%s&quot; has been updated.</label>
<label index="managekeys_uploads">Upl.</label>
<label index="adminkeys_needlogin">You have to be logged in in order to administrate extension keys.</label>
<label index="adminkeys_needadminrights">You need administrative rights in in order to administrate extension keys.</label>
......@@ -267,8 +258,6 @@
<label index="registerkeys_extensiontitle_hint" type="integer">252399373</label>
<label index="registerkeys_extensiondescription" type="integer">190479069</label>
<label index="registerkeys_extensiondescription_hint" type="integer">58203584</label>
<label index="registerkeys_extensionuploadpassword" type="integer">205548839</label>
<label index="registerkeys_extensionuploadpassword_hint" type="integer">243477362</label>
<label index="registerkeys_checkvalidity" type="integer">230787153</label>
<label index="registerkeys_doregister" type="integer">11954897</label>
<label index="registerkeys_extensionkeynotvalid" type="integer">160095203</label>
......@@ -297,8 +286,6 @@
<label index="managekeys_action_transferkey_usernotfound" type="integer">220991059</label>
<label index="managekeys_action_deletekey" type="integer">195228678</label>
<label index="managekeys_action_deletekey_success" type="integer">125878874</label>
<label index="managekeys_action_changeuploadpassword" type="integer">227414396</label>
<label index="managekeys_action_changeuploadpassword_success" type="integer">84782222</label>
<label index="managekeys_uploads" type="integer">158949079</label>
<label index="adminkeys_needlogin" type="integer">119967979</label>
<label index="adminkeys_needadminrights" type="integer">9340014</label>
......
This diff is collapsed.
......@@ -45,7 +45,7 @@ class tx_terfe_pi3_wizicon {
return $wizardItems;
}
function includeLocalLang() {
include(t3lib_extMgm::extPath('ter_fe').'locallang,xml');
# include(t3lib_extMgm::extPath('ter_fe').'locallang,xml');
return $LOCAL_LANG;
}
}
......
......@@ -74,7 +74,7 @@
<label index="views_review">Review</label>
<label index="subviews_overview">Overview</label>
<label index="subviews_files">Files</label>
<label index="listview_unreviewed_introduction">This is a list of all extensions which have not been reviewed yet:</label>
<label index="listview_unreviewed_introduction">This is a list of the most recent versions of all extensions which have not been reviewed yet:</label>
<label index="listview_pending_introduction">For the following extensions a review has been started already:</label>
<label index="listview_passed_introduction">This is a list of all extensions which successfully passed a review:</label>
<label index="listview_insecure_introduction">These extension versions have already been reviewed and did not pass the security check:</label>
......
res/state_alpha.gif

233 Bytes | W: | H:

res/state_alpha.gif

396 Bytes | W: | H:

res/state_alpha.gif
res/state_alpha.gif
res/state_alpha.gif
res/state_alpha.gif
  • 2-up
  • Swipe
  • Onion skin
res/state_beta.gif

206 Bytes | W: | H:

res/state_beta.gif

368 Bytes | W: | H:

res/state_beta.gif
res/state_beta.gif
res/state_beta.gif
res/state_beta.gif
  • 2-up
  • Swipe
  • Onion skin
res/state_experimental.gif

348 Bytes | W: | H:

res/state_experimental.gif

568 Bytes | W: | H:

res/state_experimental.gif
res/state_experimental.gif
res/state_experimental.gif
res/state_experimental.gif
  • 2-up
  • Swipe
  • Onion skin
res/state_obsolete.gif

339 Bytes | W: | H:

res/state_obsolete.gif

500 Bytes | W: | H:

res/state_obsolete.gif
res/state_obsolete.gif
res/state_obsolete.gif
res/state_obsolete.gif
  • 2-up
  • Swipe
  • Onion skin
res/state_stable.gif

247 Bytes | W: | H:

res/state_stable.gif

423 Bytes | W: | H:

res/state_stable.gif
res/state_stable.gif
res/state_stable.gif
res/state_stable.gif
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment