Commit ac7502cf authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Changes for successful extension upload

parent 7f117713
Pipeline #1780 passed with stages
in 3 minutes and 16 seconds
......@@ -577,7 +577,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
$extensionInfo->infoData->uploadComment = $form['comment'];
$filesData = (object)array('fileData' => $files);
try {
$result = tx_ter_api::uploadExtensionWithoutSoap($this->frontendUser['username'], $extensionInfo, $filesData);
$result = \tx_ter_api::uploadExtensionWithoutSoap($this->frontendUser['username'], $extensionInfo, $filesData);
if ($result) {
$this->redirect('index', 'Registerkey', NULL, array('uploaded' => TRUE), $this->settings['pages']['manageKeysPID']);
}
......
......@@ -33,7 +33,7 @@ class ImportExtensionsFromQueueTask extends Task
*
* @var int $pid
*/
protected $pid = 459;
protected $pidExtensions = 2;
/**
* executes the importer
......@@ -161,7 +161,7 @@ class ImportExtensionsFromQueueTask extends Task
$extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid',
'tx_terfe2_domain_model_extension',
'NOT deleted AND ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '') . '"'
'NOT deleted AND ext_key = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '')
);
if ($extRec) {
return $extRec['uid'];
......@@ -178,7 +178,7 @@ class ImportExtensionsFromQueueTask extends Task
public function createExtension($extData)
{
$insertExtension = [
'pid' => $this->pid,
'pid' => $this->pidExtensions,
'ext_key' => $extData['extensionkey'],
'last_upload' => time(),
'last_maintained' => time(),
......@@ -226,8 +226,8 @@ class ImportExtensionsFromQueueTask extends Task
$t3xFile = PATH_site . 'fileadmin/ter/' . $folder1 . '/' . $folder2 . '/' . $extData['extensionkey'] . '_' . $extData['version'] . '.t3x';
$insertVersion = [
'pid' => $this->pid,
'crdate' => $crdate,
'pid' => $this->pidExtensions,
'crdate' => (int)$crdate,
'tstamp' => time(),
'extension' => $extUid,
'title' => $extData['title'],
......@@ -240,8 +240,8 @@ class ImportExtensionsFromQueueTask extends Task
'file_hash' => $extData['t3xfilemd5'],
'download_counter' => 0,
'frontend_download_counter' => 0,
'state' => isset($states[(string)$extData['state']]) ? (string)$extData['state'] : 'n/a',
'em_category' => isset($categories[(string)$extData['category']]) ? (string)$extData['category'] : '',
'state' => in_array((string)$extData['state'], $states) ? (string)$extData['state'] : 'n/a',
'em_category' => array_key_exists((string)$extData['category'], $categories) ? (string)$extData['category'] : '',
'load_order' => $extData['loadorder'],
'priority' => $extData['priority'],
'shy' => (boolean)$extData['shy'],
......
......@@ -112,7 +112,7 @@ plugin.tx_terfe2 {
extensionDetailPID = 3
# cat=TER Frontend/settings/5510; type=int+; label=Manage Keys PID: PID of manage keys view
manageKeysPID = 9
manageKeysPID = 8
# cat=TER Frontend/settings/5520; type=int+; label=Upload Version PID: PID of version upload view
uploadVersionPID = 10
......
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