Commit 79a4bb95 authored by Thomas Löffler's avatar Thomas Löffler

Merge branch 'develop' into 'master'

Weekly Release 14-09-17

See merge request !205
parents 329a31ad a460ef2a
Pipeline #2236 passed with stages
in 2 minutes and 33 seconds
......@@ -2,44 +2,42 @@
# top-most EditorConfig file
root = true
charset = utf-8
# Get rid of whitespace to avoid diffs with a bunch of EOL changes
trim_trailing_whitespace = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# CSS-Files
[*.css]
indent_style = tab
indent_style = space
indent_size = 4
# HTML-Files
[*.html]
indent_style = tab
indent_size = 2
indent_style = space
indent_size = 4
# TMPL-Files
[*.tmpl]
indent_style = tab
indent_style = space
indent_size = 4
# LESS-Files
[*.less]
indent_style = tab
# SCSS-Files
[*.scss]
indent_style = space
indent_size = 4
# JS-Files
[*.js]
indent_style = tab
indent_style = space
indent_size = 4
# JSON-Files
[*.json]
indent_style = tab
indent_style = space
indent_size = 4
# PHP-Files
......@@ -62,23 +60,27 @@ indent_size = 4
indent_style = space
indent_size = 2
# package.json or .travis.yml
[{package.json,.travis.yml}]
# package.json
# .travis.yml
# bower.json
[{package.json,.travis.yml,bower.json}]
indent_style = space
indent_size = 2
indent_size = 4
# TypoScript
[*.ts]
indent_style = space
indent_size = 2
indent_size = 4
[*.typoscript]
indent_style = space
indent_size = 4
# XLF-Files
[*.xlf]
indent_style = tab
indent_style = space
indent_size = 4
# SQL-Files
[*.sql]
indent_style = tab
indent_style = space
indent_size = 2
......@@ -1625,11 +1625,11 @@
},
{
"name": "t3o/t3olayout",
"version": "1.0.7",
"version": "1.0.9",
"source": {
"type": "git",
"url": "https://git-t3o.typo3.org/t3o/t3olayout.git",
"reference": "ff8cfafd888af207cd74c1b48915e94ff34b9926"
"reference": "30ce7a4a02711578191cf57e3ca11ec946715d6a"
},
"require": {
"typo3-ter/ig-ldap-sso-auth": "^3.2"
......@@ -1648,7 +1648,7 @@
"keywords": [
"TYPO3 CMS"
],
"time": "2017-08-28T21:32:11+00:00"
"time": "2017-09-14T10:29:21+00:00"
},
{
"name": "typo3-ter/ig-ldap-sso-auth",
......
......@@ -37,6 +37,7 @@ return [
'FE' => [
'debug' => true,
'loginSecurityLevel' => 'rsa',
'pageNotFound_handling' => '404'
],
'GFX' => [
'jpg_quality' => '80',
......
This diff is collapsed.
......@@ -14,4 +14,4 @@
*/
class tx_ter_exception extends Exception
{
}
\ No newline at end of file
}
......@@ -36,7 +36,9 @@ class tx_ter_tcaLabel
}
$result = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'extensionkey', 'tx_ter_extensions', 'uid=' . (int)$params['row']['uid']
'extensionkey',
'tx_ter_extensions',
'uid=' . (int)$params['row']['uid']
);
if (!empty($result['extensionkey'])) {
......@@ -45,5 +47,4 @@ class tx_ter_tcaLabel
$params['title'] = (int)$params['row']['uid'];
}
}
}
\ No newline at end of file
}
......@@ -73,7 +73,6 @@ class tx_ter_buildextensionindex
}
}
}
}
$pluginObj = new tx_ter_buildextensionindex();
......
......@@ -4,5 +4,3 @@
define('TYPO3_MOD_PATH', '../typo3conf/ext/ter/cli/');
$BACK_PATH = '../../../../typo3/';
$MCONF['name'] = '_CLI_ter';
?>
#! /usr/bin/php -q
<?php
die ('Access denied');
die('Access denied');
// Defining circumstances for CLI mode:
define('TYPO3_cliMode', true);
......@@ -12,7 +12,9 @@ require(dirname(PATH_thisScript) . '/' . $BACK_PATH . 'init.php');
$res = $TYPO3_DB->exec_SELECTquery(
'uid, uploadcomment', 'tx_ter_extensiondetails', '1'
'uid, uploadcomment',
'tx_ter_extensiondetails',
'1'
);
$counter = 0;
......@@ -24,4 +26,4 @@ while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
}
}
?>
\ No newline at end of file
?>
......@@ -10,7 +10,7 @@
* Keep off - never ever use this at TYPO3.org again ...
*/
die ('Better not ...');
die('Better not ...');
// Defining circumstances for CLI mode:
define('TYPO3_cliMode', true);
......@@ -35,7 +35,11 @@ $extensionsPID = 1320;
writeExtensionIndexfile();
$res = $TYPO3_DB->exec_SELECTquery(
'*', 'tx_extrep_keytable', 'hidden=0 AND deleted=0', '', 'extension_key ASC'
'*',
'tx_extrep_keytable',
'hidden=0 AND deleted=0',
'',
'extension_key ASC'
);
$startTime = time();
......@@ -45,7 +49,9 @@ while ($extensionKeyRow = $TYPO3_DB->sql_fetch_assoc($res)) {
$extensionKeyCounter++;
$res2 = $TYPO3_DB->exec_SELECTquery(
'username', 'fe_users', 'uid = ' . $extensionKeyRow['owner_fe_user']
'username',
'fe_users',
'uid = ' . $extensionKeyRow['owner_fe_user']
);
$feUsersRow = $TYPO3_DB->sql_fetch_assoc($res2);
$accountData['username'] = $feUsersRow['username'];
......@@ -53,7 +59,6 @@ while ($extensionKeyRow = $TYPO3_DB->sql_fetch_assoc($res)) {
echo('importing ' . str_pad($extensionKeyRow['extension_key'] . ' (' . $feUsersRow['username'] . ')', 40, ' '));
if (intval($extensionKeyRow['members_only'])) {
$newExtensionKeyRow = [
'tstamp' => $extensionKeyRow['tstamp'],
'crdate' => $extensionKeyRow['crdate'],
......@@ -67,12 +72,14 @@ while ($extensionKeyRow = $TYPO3_DB->sql_fetch_assoc($res)) {
];
$TYPO3_DB->exec_INSERTquery(
'tx_ter_extensionkeys', $newExtensionKeyRow
'tx_ter_extensionkeys',
$newExtensionKeyRow
);
} else {
$res2 = $TYPO3_DB->exec_SELECTquery(
'*', 'tx_extrep_repository', 'extension_uid = ' . $extensionKeyRow['uid']
'*',
'tx_extrep_repository',
'extension_uid = ' . $extensionKeyRow['uid']
);
$versionOfExtension = 1;
......@@ -118,17 +125,21 @@ function getExtensionDataFromRepositoryRow($extensionKeyRow, $extensionVersionRo
// *** DEPENDENCIES
$typo3VersionMax = $extensionVersionRow['emconf_TYPO3_version_max'] > 0 ? versionConv(
$extensionVersionRow['emconf_TYPO3_version_max'], 1
$extensionVersionRow['emconf_TYPO3_version_max'],
1
) : '';
$typo3VersionMin = $extensionVersionRow['emconf_TYPO3_version_min'] > 0 ? versionConv(
$extensionVersionRow['emconf_TYPO3_version_min'], 1
$extensionVersionRow['emconf_TYPO3_version_min'],
1
) : '';
$phpVersionMax = $extensionVersionRow['emconf_PHP_version_max'] > 0 ? versionConv(
$extensionVersionRow['emconf_PHP_version_max'], 1
$extensionVersionRow['emconf_PHP_version_max'],
1
) : '';
$phpVersionMin = $extensionVersionRow['emconf_PHP_version_min'] > 0 ? versionConv(
$extensionVersionRow['emconf_PHP_version_min'], 1
$extensionVersionRow['emconf_PHP_version_min'],
1
) : '';
$typo3VersionRange = (strlen($typo3VersionMin) && strlen($typo3VersionMax)) ? $typo3VersionMin . '-' . $typo3VersionMax : '';
......@@ -222,7 +233,7 @@ function writeExtensionAndIconFile(&$extensionData, $filesData)
foreach ($extensionData['technicalData']['dependencies'] as $dependencyArr) {
switch ($dependencyArr['extensionKey']) {
case 'typo3' :
case 'typo3':
$typo3Version = $dependencyArr['versionRange'];
break;
case 'php':
......@@ -304,14 +315,15 @@ function writeExtensionAndIconFile(&$extensionData, $filesData)
}
list ($majorVersion, $minorVersion, $devVersion) = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(
'.', $extensionData['version']
'.',
$extensionData['version']
);
$t3xFileName = strtolower(
$extensionData['extensionKey']
) . '_' . $majorVersion . '.' . $minorVersion . '.' . $devVersion . '.t3x';
$extensionData['extensionKey']
) . '_' . $majorVersion . '.' . $minorVersion . '.' . $devVersion . '.t3x';
$gifFileName = strtolower(
$extensionData['extensionKey']
) . '_' . $majorVersion . '.' . $minorVersion . '.' . $devVersion . '.gif';
$extensionData['extensionKey']
) . '_' . $majorVersion . '.' . $minorVersion . '.' . $devVersion . '.gif';
// Write the files
$fh = @fopen($fullPath . $t3xFileName, 'wb');
......@@ -340,9 +352,10 @@ function writeExtensionInfoToDB($accountData, $extensionData, $filesData, $exten
// Add extension key to key table if we are processing the first version of the extension:
if ($versionOfExtension == 1) {
$res = $TYPO3_DB->exec_SELECTquery(
'*', 'tx_extrep_keytable', 'extension_key = "' . $extensionData['extensionKey'] . '"'
'*',
'tx_extrep_keytable',
'extension_key = "' . $extensionData['extensionKey'] . '"'
);
$oldExtensionKeyRow = $TYPO3_DB->sql_fetch_assoc($res);
......@@ -359,7 +372,8 @@ function writeExtensionInfoToDB($accountData, $extensionData, $filesData, $exten
];
$TYPO3_DB->exec_INSERTquery(
'tx_ter_extensionkeys', $extensionKeyRow
'tx_ter_extensionkeys',
$extensionKeyRow
);
}
......@@ -424,7 +438,6 @@ function writeExtensionInfoToDB($accountData, $extensionData, $filesData, $exten
];
$TYPO3_DB->exec_INSERTquery('tx_ter_extensiondetails', $extensionDetailsRow);
}
/**
......@@ -490,15 +503,18 @@ function writeExtensionIndexfile()
global $TYPO3_DB;
if (!@is_dir($GLOBALS['repositoryDir'])) {
throw new tx_ter_exception_internalServerError (
'Extension repository directory does not exist.', TX_TER_ERROR_GENERAL_EXTREPDIRDOESNTEXIST
throw new tx_ter_exception_internalServerError(
'Extension repository directory does not exist.',
TX_TER_ERROR_GENERAL_EXTREPDIRDOESNTEXIST
);
}
$trackTime = microtime();
$res = $TYPO3_DB->exec_SELECTquery(
'uid,tstamp,extensionkey,version,title,description,state,category,t3xfilemd5', 'tx_ter_extensions', '1'
'uid,tstamp,extensionkey,version,title,description,state,category,t3xfilemd5',
'tx_ter_extensions',
'1'
);
// Read the extension records from the DB:
......@@ -506,14 +522,17 @@ function writeExtensionIndexfile()
$extensionsTotalDownloadsArr = [];
while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
$res2 = $TYPO3_DB->exec_SELECTquery(
'ownerusername,downloadcounter', 'tx_ter_extensionkeys', 'extensionkey="' . $row['extensionkey'] . '"'
'ownerusername,downloadcounter',
'tx_ter_extensionkeys',
'extensionkey="' . $row['extensionkey'] . '"'
);
$extensionKeyRow = $TYPO3_DB->sql_fetch_assoc($res2);
$row['ownerusername'] = $extensionKeyRow['ownerusername'];
$extensionsTotalDownloadsArr[$row['extensionkey']] = $extensionKeyRow['downloadcounter'];
$res2 = $TYPO3_DB->exec_SELECTquery(
'lastuploaddate,uploadcomment,dependencies,authorname,authoremail,authorcompany', 'tx_ter_extensiondetails',
'lastuploaddate,uploadcomment,dependencies,authorname,authoremail,authorcompany',
'tx_ter_extensiondetails',
'extensionuid=' . $row['uid']
);
$detailsRow = $TYPO3_DB->sql_fetch_assoc($res2);
......@@ -524,19 +543,19 @@ function writeExtensionIndexfile()
}
// Prepare the DOM object:
$dom = new DOMDocument ('1.0', 'utf-8');
$dom = new DOMDocument('1.0', 'utf-8');
$dom->formatOutput = false;
$extensionsObj = $dom->appendChild(new DOMElement('extensions'));
// Create the nested XML structure:
foreach ($extensionsAndVersionsArr as $extensionKey => $extensionVersionsArr) {
$extensionObj = $extensionsObj->appendChild(new DOMElement('extension'));
$extensionObj->appendChild(new DOMAttr ('extensionkey', $extensionKey));
$extensionObj->appendChild(new DOMElement ('downloadcounter', xmlentities($extensionsTotalDownloadsArr[$extensionKey])));
$extensionObj->appendChild(new DOMAttr('extensionkey', $extensionKey));
$extensionObj->appendChild(new DOMElement('downloadcounter', xmlentities($extensionsTotalDownloadsArr[$extensionKey])));
foreach ($extensionVersionsArr as $versionNumber => $extensionVersionArr) {
$versionObj = $extensionObj->appendChild(new DOMElement('version'));
$versionObj->appendChild(new DOMAttr ('version', $versionNumber));
$versionObj->appendChild(new DOMAttr('version', $versionNumber));
$versionObj->appendChild(new DOMElement('title', xmlentities($extensionVersionArr['title'])));
$versionObj->appendChild(new DOMElement('description', xmlentities($extensionVersionArr['description'])));
......@@ -561,7 +580,7 @@ function writeExtensionIndexfile()
// Write XML data to disc:
$fh = fopen($GLOBALS['repositoryDir'] . 'cli-extensions.xml.gz', 'wb');
if (!$fh) {
throw new tx_ter_exception_internalServerError (
throw new tx_ter_exception_internalServerError(
'Write error while writing extensions index file: ' . $GLOBALS['repositoryDir'] . 'extensions.xml',
TX_TER_ERROR_UPLOADEXTENSION_WRITEERRORWHILEWRITINGEXTENSIONSINDEX
);
......@@ -570,8 +589,6 @@ function writeExtensionIndexfile()
fclose($fh);
#\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('extensions','ter',0,$extensionsArr);
}
/**
......
......@@ -25,13 +25,15 @@ require(dirname(PATH_thisScript) . '/' . $BACK_PATH . 'init.php');
$res = $TYPO3_DB->exec_SELECTquery(
'extensionkey,version', 'tx_ter_extensions', '1'
'extensionkey,version',
'tx_ter_extensions',
'1'
);
while ($extensionRow = $TYPO3_DB->sql_fetch_assoc($res)) {
$res2 = $TYPO3_DB->exec_SELECTquery(
'rating', 'tx_terfe_reviewratings',
'rating',
'tx_terfe_reviewratings',
'extensionkey="' . $extensionRow['extensionkey'] . '" AND version="' . $extensionRow['version'] . '"'
);
......
......@@ -17,4 +17,4 @@
*/
class tx_ter_exception_internalServerError extends tx_ter_exception
{
}
\ No newline at end of file
}
......@@ -18,4 +18,4 @@
*/
class tx_ter_exception_notFound extends tx_ter_exception
{
}
\ No newline at end of file
}
......@@ -17,4 +17,4 @@
*/
class tx_ter_exception_unauthorized extends tx_ter_exception
{
}
\ No newline at end of file
}
......@@ -2,19 +2,18 @@
$extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter');
return [
'tx_ter_api' => $extensionPath . 'class.tx_ter_api.php',
'tx_ter_helper' => $extensionPath . 'class.tx_ter_helper.php',
'tx_ter_buildextensionindex' => $extensionPath . 'cli/build-extension-index.php',
'tx_ter_module1' => $extensionPath . 'mod1/index.php',
'tx_ter_pi1' => $extensionPath . 'pi1/class.tx_ter_pi1.php',
'tx_ter_updatecurrentversionlisttask' => $extensionPath . 'task/class.tx_ter_updateCurrentVersionListTask.php',
'tx_ter_updateextensionindextask' => $extensionPath . 'task/class.tx_ter_updateExtensionIndexTask.php',
'tx_ter_updateextensionindextask_additionalfieldprovider' => $extensionPath . 'task/class.tx_ter_updateExtensionIndexTask_additionalFieldProvider.php',
'tx_ter_exception' => $extensionPath . 'class.tx_ter_exception.php',
'tx_ter_exception_unauthorized' => $extensionPath . 'exception/class.tx_ter_exception_unauthorized.php',
'tx_ter_exception_faileddependency' => $extensionPath . 'exception/class.tx_ter_exception_failedDependency.php',
'tx_ter_exception_versionexists' => $extensionPath . 'exception/class.tx_ter_exception_versionExists.php',
'tx_ter_exception_internalservererror' => $extensionPath . 'exception/class.tx_ter_exception_internalServerError.php',
'tx_ter_exception_notfound' => $extensionPath . 'exception/class.tx_ter_exception_notFound.php',
'tx_ter_api' => $extensionPath . 'class.tx_ter_api.php',
'tx_ter_helper' => $extensionPath . 'class.tx_ter_helper.php',
'tx_ter_buildextensionindex' => $extensionPath . 'cli/build-extension-index.php',
'tx_ter_module1' => $extensionPath . 'mod1/index.php',
'tx_ter_pi1' => $extensionPath . 'pi1/class.tx_ter_pi1.php',
'tx_ter_updatecurrentversionlisttask' => $extensionPath . 'task/class.tx_ter_updateCurrentVersionListTask.php',
'tx_ter_updateextensionindextask' => $extensionPath . 'task/class.tx_ter_updateExtensionIndexTask.php',
'tx_ter_updateextensionindextask_additionalfieldprovider' => $extensionPath . 'task/class.tx_ter_updateExtensionIndexTask_additionalFieldProvider.php',
'tx_ter_exception' => $extensionPath . 'class.tx_ter_exception.php',
'tx_ter_exception_unauthorized' => $extensionPath . 'exception/class.tx_ter_exception_unauthorized.php',
'tx_ter_exception_faileddependency' => $extensionPath . 'exception/class.tx_ter_exception_failedDependency.php',
'tx_ter_exception_versionexists' => $extensionPath . 'exception/class.tx_ter_exception_versionExists.php',
'tx_ter_exception_internalservererror' => $extensionPath . 'exception/class.tx_ter_exception_internalServerError.php',
'tx_ter_exception_notfound' => $extensionPath . 'exception/class.tx_ter_exception_notFound.php',
];
?>
This diff is collapsed.
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'pi1/class.tx_ter_pi1.php', '_pi1', 'list_type', 0);
// Register core version update task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\Ter\Task\UpdateCurrentVersionListTask::class] = [
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tx_ter_updateCurrentVersionListTask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tx_ter_updateCurrentVersionListTask.description',
'additionalFields' => '',
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tx_ter_updateCurrentVersionListTask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tx_ter_updateCurrentVersionListTask.description',
'additionalFields' => '',
];
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
die('Access denied.');
}
// Remove the old "CODE", "Layout" and the "recursive" fields
......
......@@ -22,4 +22,3 @@ $MCONF['script'] = 'index.php';
$MLANG['default']['tabs_images']['tab'] = 'moduleicon.gif';
$MLANG['default']['ll_ref'] = 'LLL:EXT:extrep_mgm/mod1/locallang_mod.php';
?>
\ No newline at end of file
......@@ -29,7 +29,8 @@ require($BACK_PATH . 'template.php');
include('locallang.php');
$BE_USER->modAccess(
$MCONF, 1
$MCONF,
1
); // This checks permissions and exits if the users has no permission for entry.
class tx_ter_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptClass
......@@ -78,7 +79,6 @@ class tx_ter_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptClass
$access = is_array($this->pageinfo) ? 1 : 0;
if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)) {
// Draw the header.
$this->doc = GeneralUtility::makeInstance('mediumDoc');
$this->doc->backPath = $BACK_PATH;
......@@ -101,20 +101,28 @@ class tx_ter_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptClass
';
$headerSection = $this->doc->getHeader(
'pages', $this->pageinfo, $this->pageinfo['_thePath']
) . '<br>' . $LANG->php3Lang['labels']['path'] . ': ' . GeneralUtility::fixed_lgd_cs(
$this->pageinfo['_thePath'], 50
);
'pages',
$this->pageinfo,
$this->pageinfo['_thePath']
) . '<br>' . $LANG->php3Lang['labels']['path'] . ': ' . GeneralUtility::fixed_lgd_cs(
$this->pageinfo['_thePath'],
50
);
$this->content .= $this->doc->startPage($LANG->getLL('title'));
$this->content .= $this->doc->header($LANG->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section(
"", $this->doc->funcMenu(
$headerSection, BackendUtility::getFuncMenu(
$this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']
)
)
"",
$this->doc->funcMenu(
$headerSection,
BackendUtility::getFuncMenu(
$this->id,
'SET[function]',
$this->MOD_SETTINGS['function'],
$this->MOD_MENU['function']
)
)
);
$this->content .= $this->doc->divider(5);
......@@ -126,8 +134,9 @@ class tx_ter_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptClass
// ShortCut