Commit dba0a4e1 authored by steffenk's avatar steffenk

Resolve code errors (forge #10470)

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/trunk@39535 735d13b6-9817-0410-8766-e36946ffe9aa
parent 0a14ab59
26.10.2010 Steffen Kamper <steffen@typo3.org
>
26.10.2010 Steffen Kamper <steffen@typo3.org>
* Resolve code errors (forge #10470)
* Sync svn with version on typo3.org (forge #10469), raised version to 1.0.8
12.02.2009 Steffen Kamper <info@sk-typo3.de>
......
......@@ -249,7 +249,7 @@ class tx_terfe_pi1 extends tslib_pibase {
// Set the magic "reg1" so we can clear the cache for this manual if a new one is uploaded:
if (t3lib_extMgm::isLoaded ('ter_doc')) {
$terDocAPIObj = tx_terdoc_api::getInstance();
$TSFE->page_cache_reg1 = $terDocAPIObj->createAndGetCacheUidForExtensionVersion ('_all','');
$GLOBALS['TSFE']->page_cache_reg1 = $terDocAPIObj->createAndGetCacheUidForExtensionVersion ('_all','');
}
$res = $TYPO3_DB->exec_SELECTquery (
......@@ -385,8 +385,8 @@ class tx_terfe_pi1 extends tslib_pibase {
$char = '0'; // 0-9
}
$charWhere = $char == '0' ? ' AND ASCII(LOWER(SUBSTRING(LTRIM(title),1,1))) < 97' : ' AND ASCII(LOWER(SUBSTRING(LTRIM(title),1,1)))=' . ord($char);
$res = $TYPO3_DB->exec_SELECTquery (
'ASCII(LOWER(SUBSTRING(LTRIM(title),1,1))) firstchar,e.extensionkey,title,e.version,state,lastuploaddate,rating,votes',
'tx_terfe_extensions as e LEFT JOIN tx_terfe_ratingscache USING(extensionkey,version)',
......@@ -395,7 +395,7 @@ class tx_terfe_pi1 extends tslib_pibase {
$sortingConditions[$sorting].'title ASC, lastuploaddate DESC',
''
);
$alreadyRenderedExtensionKeys = array();
if ($res) {
......@@ -415,23 +415,23 @@ class tx_terfe_pi1 extends tslib_pibase {
}
$content .= '<p>'.$this->pi_getLL('listview_fulllist_introduction','',1).'</p>';
// char menu
$content .= '<p class="terfe-charmenu">';
for($i = 96; $i<123; $i++) {
$c = $i == 96 ? '[0-9]' : strtoupper(chr($i));
$piVar = $i == 96 ? '0' : chr($i);
if ($char == $piVar) { // ACT
$style = 'padding:0 3px;font-size:150%;font-weight:bold;';
$style = 'padding:0 3px;font-size:150%;font-weight:bold;';
} else {
$style = 'padding:0 3px;';
}
$content .= '<span style="' . $style . '">' . $this->pi_linkTP_keepPIvars($c, array('char' => $piVar),1) . '</span>';
}
$content .= '</p>';
$content.= '
<table class="ext-compactlist"><tr>
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_title','',1),array('sorting'=>'by_title'),1).'</th>
......
......@@ -532,11 +532,11 @@ class tx_terfe_pi2 extends tslib_pibase {
case 'deleteextensionversion':
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
$version = t3lib_div::GPvar('tx_terfe_pi2_version');
$resultArr = $soapClientObj->deleteExtension($accountDataArr, $extensionKey, $version);
if (is_array ($resultArr)) {
switch ($resultArr['resultCode']) {
case TX_TER_RESULT_EXTENSIONSUCCESSFULLYDELETED :
case TX_TER_RESULT_EXTENSIONSUCCESSFULLYDELETED :
$actionMessages = '<p>'.$iconInfo.' <strong>'.sprintf ($this->pi_getLL('admin_action_deleteextension_success','',1), $extensionKey, $version).'</strong></p><br />';
$res = $TYPO3_DB->exec_DELETEquery (
'tx_terfe_extensions',
......@@ -573,7 +573,7 @@ class tx_terfe_pi2 extends tslib_pibase {
}
break;
}
// Render search form:
$searchForm = '
<form action="'.$this->pi_getPageLink($TSFE->id).'" method="get">
......@@ -584,15 +584,15 @@ class tx_terfe_pi2 extends tslib_pibase {
<input type="submit" value="'.$this->pi_getLL('admin_search_searchbutton','',1).'" />
</form>
<br />
';
';
// Create list of extensions:
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
if (strlen($extensionKey)) {
$filterOptionsArr = array ('extensionKey' => $extensionKey);
$resultArr = $soapClientObj->getExtensionKeys($accountDataArr, $filterOptionsArr);
if (is_array ($resultArr) && $resultArr['simpleResult']['resultCode'] == TX_TER_RESULT_GENERAL_OK) {
$tableRows = array();
if (is_array ($resultArr['extensionKeyData'])) {
foreach ($resultArr['extensionKeyData'] as $extensionKeyArr) {
......@@ -612,7 +612,7 @@ class tx_terfe_pi2 extends tslib_pibase {
<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_version" type="hidden" value="'.$row['version'].'" />
<input name="tx_terfe_pi2_version" type="hidden" value="'.$extensionKeyArr['version'].'" />
<input name="tx_terfe_pi2_cmd" type="hidden" value="transferkey" />
</form>
</td>
......@@ -651,7 +651,7 @@ class tx_terfe_pi2 extends tslib_pibase {
}
}
}
} else {
$output .= '
<h4>'.$this->pi_getLL('general_error','',1).'</h4>
......@@ -688,7 +688,7 @@ class tx_terfe_pi2 extends tslib_pibase {
return $output;
}
......
......@@ -235,14 +235,14 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
$tableRows = array ();
switch ($mode) {
case 'unreviewed' :
case 'unreviewed' :
$res = $TYPO3_DB->exec_SELECTquery (
'ext.extensionkey,ext.title,ext.version,ext.authorname,ext.authoremail,ext.ownerusername,ext.state',
'tx_terfe_extensions as ext LEFT JOIN tx_terfe_reviews AS rev ON (
ext.extensionkey = rev.extensionkey AND
ext.version = rev.version
) ',
'ext.reviewstate = 0 AND
'ext.reviewstate = 0 AND
(ext.state = "stable" OR ext.state = "beta") AND
rev.uid IS NULL
',
......@@ -275,7 +275,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
''
);
break;
case 'insecure' :
case 'insecure' :
$res = $TYPO3_DB->exec_SELECTquery (
'ext.extensionkey,title,ext.version,authorname,authoremail,ownerusername,state',
'tx_terfe_extensions as ext JOIN tx_terfe_reviews AS rev ON (
......@@ -286,7 +286,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
'lastmodified DESC',
''
);
break;
break;
}
$extensionRecordsToRender = array();
......@@ -772,7 +772,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
// Build the output
$content ='
<tr>
<th class="th-sub" colspan="3">'.sprintf ($this->pi_getLL('singleview_files_sectionheading','',1), $extensionRecord['title']).'</th>
<th class="th-sub" colspan="3">'.sprintf ($this->pi_getLL('singleview_files_sectionheading','',1), $extDetailsRow['title']).'</th>
</tr>
<tr>
<td class="td-sub" colspan="3">
......@@ -1259,7 +1259,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
);
if ($res) return FALSE;
if (!strlen($newReviewRecord['reviewers'])) {
if (!strlen($newReviewRow['reviewers'])) {
if (!$this->db_deleteReviewRecord($extensionKey, $version)) return FALSE;
}
......@@ -1341,7 +1341,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
$res = $this->soap_setReviewState($extensionKey, $version, $rating);
if ($res !== TRUE) return FALSE;
// Reject older versions as well
//
//
if ($rating == TX_TERFE_REVIEWSTATE_INSECURE && $recursive){
$versionsArr = $this->db_getAllVersionNumbersOfExtension($extensionKey);
if (is_array($versionsArr)) {
......@@ -1349,7 +1349,7 @@ class tx_terfe_pi3 extends tx_terfe_pi1 {
if ($version > $otherversion) {
$extensionRecord = $this->commonObj->db_getExtensionRecord($extensionKey, $otherversion);
if (!$extensionRecord['reviewstate']){
$this->db_createReviewRecord ($extensionKey, $otherversion, $this->reviewer['username']);
$this->db_createReviewRecord ($extensionKey, $otherversion, $this->reviewer['username']);
$this->db_addReviewNote ($extensionKey, $otherversion, 'Status set by inheritance from version '.$version);
$this->db_createReviewRatingRecord($extensionKey, $otherversion, TX_TERFE_REVIEWSTATE_INSECURE,$this->reviewer['username'],0);
}
......
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