resolve_codeerrors.diff
| pi1/class.tx_terfe_pi1.php (working copy) | ||
|---|---|---|
| 249 | 249 |
// Set the magic "reg1" so we can clear the cache for this manual if a new one is uploaded: |
| 250 | 250 |
if (t3lib_extMgm::isLoaded ('ter_doc')) {
|
| 251 | 251 |
$terDocAPIObj = tx_terdoc_api::getInstance(); |
| 252 |
$TSFE->page_cache_reg1 = $terDocAPIObj->createAndGetCacheUidForExtensionVersion ('_all','');
|
|
| 252 |
$GLOBALS['TSFE']->page_cache_reg1 = $terDocAPIObj->createAndGetCacheUidForExtensionVersion ('_all','');
|
|
| 253 | 253 |
} |
| 254 | 254 | |
| 255 | 255 |
$res = $TYPO3_DB->exec_SELECTquery ( |
| ... | ... | |
| 385 | 385 |
$char = '0'; // 0-9 |
| 386 | 386 |
} |
| 387 | 387 |
$charWhere = $char == '0' ? ' AND ASCII(LOWER(SUBSTRING(LTRIM(title),1,1))) < 97' : ' AND ASCII(LOWER(SUBSTRING(LTRIM(title),1,1)))=' . ord($char); |
| 388 |
|
|
| 389 |
|
|
| 388 | ||
| 389 | ||
| 390 | 390 |
$res = $TYPO3_DB->exec_SELECTquery ( |
| 391 | 391 |
'ASCII(LOWER(SUBSTRING(LTRIM(title),1,1))) firstchar,e.extensionkey,title,e.version,state,lastuploaddate,rating,votes', |
| 392 | 392 |
'tx_terfe_extensions as e LEFT JOIN tx_terfe_ratingscache USING(extensionkey,version)', |
| ... | ... | |
| 395 | 395 |
$sortingConditions[$sorting].'title ASC, lastuploaddate DESC', |
| 396 | 396 |
'' |
| 397 | 397 |
); |
| 398 |
|
|
| 398 | ||
| 399 | 399 |
$alreadyRenderedExtensionKeys = array(); |
| 400 | 400 | |
| 401 | 401 |
if ($res) {
|
| ... | ... | |
| 415 | 415 |
} |
| 416 | 416 | |
| 417 | 417 |
$content .= '<p>'.$this->pi_getLL('listview_fulllist_introduction','',1).'</p>';
|
| 418 |
|
|
| 418 | ||
| 419 | 419 |
// char menu |
| 420 | 420 |
$content .= '<p class="terfe-charmenu">'; |
| 421 | 421 |
for($i = 96; $i<123; $i++) {
|
| 422 | 422 |
$c = $i == 96 ? '[0-9]' : strtoupper(chr($i)); |
| 423 | 423 |
$piVar = $i == 96 ? '0' : chr($i); |
| 424 |
|
|
| 424 | ||
| 425 | 425 |
if ($char == $piVar) { // ACT
|
| 426 |
$style = 'padding:0 3px;font-size:150%;font-weight:bold;'; |
|
| 426 |
$style = 'padding:0 3px;font-size:150%;font-weight:bold;'; |
|
| 427 | 427 |
} else {
|
| 428 | 428 |
$style = 'padding:0 3px;'; |
| 429 | 429 |
} |
| 430 |
|
|
| 430 | ||
| 431 | 431 |
$content .= '<span style="' . $style . '">' . $this->pi_linkTP_keepPIvars($c, array('char' => $piVar),1) . '</span>';
|
| 432 | 432 |
} |
| 433 | 433 |
$content .= '</p>'; |
| 434 |
|
|
| 434 | ||
| 435 | 435 |
$content.= ' |
| 436 | 436 |
<table class="ext-compactlist"><tr> |
| 437 | 437 |
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_title','',1),array('sorting'=>'by_title'),1).'</th>
|
| pi2/class.tx_terfe_pi2.php (working copy) | ||
|---|---|---|
| 531 | 531 |
case 'deleteextensionversion': |
| 532 | 532 |
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
|
| 533 | 533 |
$version = t3lib_div::GPvar('tx_terfe_pi2_version');
|
| 534 |
|
|
| 534 | ||
| 535 | 535 |
$resultArr = $soapClientObj->deleteExtension($accountDataArr, $extensionKey, $version); |
| 536 | 536 |
if (is_array ($resultArr)) {
|
| 537 | 537 |
switch ($resultArr['resultCode']) {
|
| 538 |
case TX_TER_RESULT_EXTENSIONSUCCESSFULLYDELETED : |
|
| 538 |
case TX_TER_RESULT_EXTENSIONSUCCESSFULLYDELETED : |
|
| 539 | 539 |
$actionMessages = '<p>'.$iconInfo.' <strong>'.sprintf ($this->pi_getLL('admin_action_deleteextension_success','',1), $extensionKey, $version).'</strong></p><br />';
|
| 540 | 540 |
$res = $TYPO3_DB->exec_DELETEquery ( |
| 541 | 541 |
'tx_terfe_extensions', |
| ... | ... | |
| 572 | 572 |
} |
| 573 | 573 |
break; |
| 574 | 574 |
} |
| 575 |
|
|
| 575 | ||
| 576 | 576 |
// Render search form: |
| 577 | 577 |
$searchForm = ' |
| 578 | 578 |
<form action="'.$this->pi_getPageLink($TSFE->id).'" method="get"> |
| ... | ... | |
| 583 | 583 |
<input type="submit" value="'.$this->pi_getLL('admin_search_searchbutton','',1).'" />
|
| 584 | 584 |
</form> |
| 585 | 585 |
<br /> |
| 586 |
'; |
|
| 587 |
|
|
| 586 |
'; |
|
| 587 | ||
| 588 | 588 |
// Create list of extensions: |
| 589 | 589 |
$extensionKey = t3lib_div::GPvar('tx_terfe_pi2_extensionkey');
|
| 590 | 590 |
if (strlen($extensionKey)) {
|
| 591 | 591 |
$filterOptionsArr = array ('extensionKey' => $extensionKey);
|
| 592 | 592 |
$resultArr = $soapClientObj->getExtensionKeys($accountDataArr, $filterOptionsArr); |
| 593 | 593 |
if (is_array ($resultArr) && $resultArr['simpleResult']['resultCode'] == TX_TER_RESULT_GENERAL_OK) {
|
| 594 |
|
|
| 594 | ||
| 595 | 595 |
$tableRows = array(); |
| 596 | 596 |
if (is_array ($resultArr['extensionKeyData'])) {
|
| 597 | 597 |
foreach ($resultArr['extensionKeyData'] as $extensionKeyArr) {
|
| ... | ... | |
| 611 | 611 |
<input name="tx_terfe_pi2_targetusername" type="text" size="10" /> |
| 612 | 612 |
<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()" />
|
| 613 | 613 |
<input name="tx_terfe_pi2_extensionkey" type="hidden" value="'.$extensionKeyArr['extensionkey'].'" /> |
| 614 |
<input name="tx_terfe_pi2_version" type="hidden" value="'.$row['version'].'" /> |
|
| 614 |
<input name="tx_terfe_pi2_version" type="hidden" value="'.$extensionKeyArr['version'].'" /> |
|
| 615 | 615 |
<input name="tx_terfe_pi2_cmd" type="hidden" value="transferkey" /> |
| 616 | 616 |
</form> |
| 617 | 617 |
</td> |
| ... | ... | |
| 650 | 650 |
} |
| 651 | 651 |
} |
| 652 | 652 |
} |
| 653 |
|
|
| 653 | ||
| 654 | 654 |
} else {
|
| 655 | 655 |
$output .= ' |
| 656 | 656 |
<h4>'.$this->pi_getLL('general_error','',1).'</h4>
|
| ... | ... | |
| 687 | 687 | |
| 688 | 688 |
return $output; |
| 689 | 689 |
} |
| 690 |
|
|
| 691 | 690 | |
| 692 | 691 | |
| 693 | 692 | |
| 694 | 693 | |
| 694 | ||
| 695 | 695 |
/** |
| 696 | 696 |
* Renders the view for registering extension keys |
| 697 | 697 |
* |
| pi3/class.tx_terfe_pi3.php (working copy) | ||
|---|---|---|
| 235 | 235 |
$tableRows = array (); |
| 236 | 236 | |
| 237 | 237 |
switch ($mode) {
|
| 238 |
case 'unreviewed' : |
|
| 238 |
case 'unreviewed' : |
|
| 239 | 239 |
$res = $TYPO3_DB->exec_SELECTquery ( |
| 240 | 240 |
'ext.extensionkey,ext.title,ext.version,ext.authorname,ext.authoremail,ext.ownerusername,ext.state', |
| 241 | 241 |
'tx_terfe_extensions as ext LEFT JOIN tx_terfe_reviews AS rev ON ( |
| 242 | 242 |
ext.extensionkey = rev.extensionkey AND |
| 243 | 243 |
ext.version = rev.version |
| 244 | 244 |
) ', |
| 245 |
'ext.reviewstate = 0 AND |
|
| 245 |
'ext.reviewstate = 0 AND |
|
| 246 | 246 |
(ext.state = "stable" OR ext.state = "beta") AND |
| 247 | 247 |
rev.uid IS NULL |
| 248 | 248 |
', |
| ... | ... | |
| 275 | 275 |
'' |
| 276 | 276 |
); |
| 277 | 277 |
break; |
| 278 |
case 'insecure' : |
|
| 278 |
case 'insecure' : |
|
| 279 | 279 |
$res = $TYPO3_DB->exec_SELECTquery ( |
| 280 | 280 |
'ext.extensionkey,title,ext.version,authorname,authoremail,ownerusername,state', |
| 281 | 281 |
'tx_terfe_extensions as ext JOIN tx_terfe_reviews AS rev ON ( |
| ... | ... | |
| 286 | 286 |
'lastmodified DESC', |
| 287 | 287 |
'' |
| 288 | 288 |
); |
| 289 |
break; |
|
| 289 |
break; |
|
| 290 | 290 |
} |
| 291 | 291 | |
| 292 | 292 |
$extensionRecordsToRender = array(); |
| ... | ... | |
| 772 | 772 |
// Build the output |
| 773 | 773 |
$content =' |
| 774 | 774 |
<tr> |
| 775 |
<th class="th-sub" colspan="3">'.sprintf ($this->pi_getLL('singleview_files_sectionheading','',1), $extensionRecord['title']).'</th>
|
|
| 775 |
<th class="th-sub" colspan="3">'.sprintf ($this->pi_getLL('singleview_files_sectionheading','',1), $extDetailsRow['title']).'</th>
|
|
| 776 | 776 |
</tr> |
| 777 | 777 |
<tr> |
| 778 | 778 |
<td class="td-sub" colspan="3"> |
| ... | ... | |
| 1259 | 1259 |
); |
| 1260 | 1260 |
if ($res) return FALSE; |
| 1261 | 1261 | |
| 1262 |
if (!strlen($newReviewRecord['reviewers'])) {
|
|
| 1262 |
if (!strlen($newReviewRow['reviewers'])) {
|
|
| 1263 | 1263 |
if (!$this->db_deleteReviewRecord($extensionKey, $version)) return FALSE; |
| 1264 | 1264 |
} |
| 1265 | 1265 | |
| ... | ... | |
| 1341 | 1341 |
$res = $this->soap_setReviewState($extensionKey, $version, $rating); |
| 1342 | 1342 |
if ($res !== TRUE) return FALSE; |
| 1343 | 1343 |
// Reject older versions as well |
| 1344 |
// |
|
| 1344 |
// |
|
| 1345 | 1345 |
if ($rating == TX_TERFE_REVIEWSTATE_INSECURE && $recursive){
|
| 1346 | 1346 |
$versionsArr = $this->db_getAllVersionNumbersOfExtension($extensionKey); |
| 1347 | 1347 |
if (is_array($versionsArr)) {
|
| ... | ... | |
| 1349 | 1349 |
if ($version > $otherversion) {
|
| 1350 | 1350 |
$extensionRecord = $this->commonObj->db_getExtensionRecord($extensionKey, $otherversion); |
| 1351 | 1351 |
if (!$extensionRecord['reviewstate']){
|
| 1352 |
$this->db_createReviewRecord ($extensionKey, $otherversion, $this->reviewer['username']); |
|
| 1352 |
$this->db_createReviewRecord ($extensionKey, $otherversion, $this->reviewer['username']); |
|
| 1353 | 1353 |
$this->db_addReviewNote ($extensionKey, $otherversion, 'Status set by inheritance from version '.$version); |
| 1354 | 1354 |
$this->db_createReviewRatingRecord($extensionKey, $otherversion, TX_TERFE_REVIEWSTATE_INSECURE,$this->reviewer['username'],0); |
| 1355 | 1355 |
} |