Commit 90111184 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/master'

parents 9fb8617b d3ca64b3
Pipeline #661 passed with stage
in 1 minute and 30 seconds
mod.wizards.newContentElement
{
wizardItems
{
special.elements
{
qfq_element
{
icon = icon
goes
here
title = QFQ Content Element
Content
Element
description = Quick Form Query (QFQ) offers a Form Editor and a SQL based Report Language.
info
goes
here
tt_content_defValues
{
CType = qfq_qfq
}
}
}
special.show
:
= addToList(qfq_element)
mod.wizards.newContentElement.wizardItems.special.elements.qfq_qfq {
icon = EXT:qfq/ext_icon_lg.png
title = QFQ Content Element
description = Quick Form Query(QFQ) offers a Form Editor and a SQL based Report Language.
tt_content_defValues {
CType = qfq_qfq
}
}
mod.wizards.newContentElement.wizardItems.special.show := addToList(qfq_qfq)
\ No newline at end of file
......@@ -3307,13 +3307,13 @@ An upload element is based on a 'file browse'-button and a 'trash'-button (=dele
The 'file browse'-button is displayed, if there is no file uploaded already.
The 'trash'-button is displayed, if there is a file uploaded already.
After clicking on the browse brutton, the user select a file from the local filesystem.
After clicking on the browse button, the user select a file from the local filesystem.
After choosing the file, the upload starts immediately, shown by a turning wheel. When the server received the whole file
and accepts (see below) the file, the 'file browse'-button disappears and the filename is shown, followed by a 'trash'-button.
Either the user is satisfied now or the user can delete the uploaded file (and maybe upload another one).
Until this point, the file is cached on the server but not copied to the `fileDestination`. The user have to save the
current record, either to finalize the upload and/or to delete a previous uploaded file.
current record, either to finalize the upload and/or to delete a previously uploaded file.
The FormElement behaves like a
......
extension/ext_icon.png

675 Bytes | W: | H:

extension/ext_icon.png

660 Bytes | W: | H:

extension/ext_icon.png
extension/ext_icon.png
extension/ext_icon.png
extension/ext_icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -11,14 +11,39 @@ if (!defined('TYPO3_MODE')) {
'IMATHUZH.' . $_EXTKEY,
'Qfq',
'QFQ Element',
'typo3conf/ext/qfq/ext_icon.png'
'EXT:qfq/ext_icon.png'
);
/*
* The type name is generated by combining the extension key and plugin name, all lowercase and concatenated with `_'
*/
$GLOBALS['TCA']['tt_content']['types']['qfq_qfq'] = array(
'showitem' => 'hidden, CType, header, header_position, bodytext;;;nowrap, layout, deleted, starttime, endtime, colPos, spaceBefore, spaceAfter, fe_group, header_layout, sectionIndex, linkToTop, section_frame, sys_language_uid'
$GLOBALS['TCA']['tt_content']['palettes']['introheader']['showitem'] = 'header, CType';
$GLOBALS['TCA']['tt_content']['palettes']['startendtime']['showitem'] = 'starttime, endtime';
$GLOBALS['TCA']['tt_content']['palettes']['layoutpalette1']['showitem'] = 'colPos, header_position, sys_language_uid';
$GLOBALS['TCA']['tt_content']['palettes']['layoutpalette2']['showitem'] = 'layout, header_layout';
$GLOBALS['TCA']['tt_content']['palettes']['spacearound']['showitem'] = 'spaceBefore, spaceAfter';
);
$GLOBALS['TCA']['tt_content']['types']['qfq_qfq'] = array(
'showitem' => '
--div--;General,
--palette--;;introheader,
custom,
bodytext;Code:;;nowrap,
--div--;Access,
hidden, fe_group, deleted, --palette--;;startendtime,
--div--;Appearance,
--palette--;;layoutpalette1,
--palette--;;layoutpalette2,
--palette--;;spacearound,
linkToTop, section_frame, sectionIndex',
'columnsOverrides' => [
'bodytext' => [
'config' => [
'renderType' => 't3editor',
'format' => 'sparql',
'rows' => 100
]
]
]
);
\ No newline at end of file
......@@ -493,8 +493,10 @@ abstract class AbstractBuildForm {
* @return array|string
* @throws CodeException
* @throws DbException
* @throws DownloadException
* @throws UserFormException
* @throws UserReportException
* @throws DownloadException
*/
private function processReportSyntax($value) {
......@@ -509,7 +511,7 @@ abstract class AbstractBuildForm {
return $new;
}
if (substr($value, 0, 8) == SHEBANG_REPORT) {
if (substr($value, 0, strlen(SHEBANG_REPORT)) == SHEBANG_REPORT) {
if ($this->report === null) {
$this->report = new Report(array(), $this->evaluate, false);
}
......@@ -519,7 +521,7 @@ abstract class AbstractBuildForm {
}
$storeRecord = $this->store->getStore(STORE_RECORD);
$value = $this->report->process($this->bodytextParser->process($value), false);
$value = $this->report->process($this->bodytextParser->process($value));
$this->store->setStore($storeRecord, STORE_RECORD, true);
$this->store->setVar(SYSTEM_REPORT_FULL_LEVEL, '', STORE_SYSTEM);
}
......
......@@ -118,8 +118,7 @@ class File {
* @throws UserFormException
*/
private function doUpload($sipUpload, array $statusUpload) {
list($dummy, $newArr) = each($_FILES);
$newArr = reset($_FILES);
$statusUpload = array_merge($statusUpload, $newArr);
if ($statusUpload[FILES_ERROR] !== UPLOAD_ERR_OK) {
......@@ -157,8 +156,6 @@ class File {
*/
private function checkFileType($tmp_name, $name, $accept) {
$return_var = 0;
// E.g.: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=binary'
$fileMimeType = HelperFile::getMimeType($tmp_name);
......@@ -175,11 +172,11 @@ class File {
// $accept e.g.: 'image/*,application/pdf,.pdf'
$arr = explode(',', $accept); // Split multiple defined mimetypes/extensions in single chunks.
foreach ($arr as $listElementMimeType) {
$listElementMimeType = trim($listElementMimeType);
$listElementMimeType = trim(strtolower($listElementMimeType));
if ($listElementMimeType == '') {
continue; // will be skipped
} elseif ($listElementMimeType[0] == '.') { // Check for definition 'filename extension'
if ('.' . $path_parts['extension'] == $listElementMimeType) {
if ('.' . strtolower($path_parts['extension']) == $listElementMimeType) {
return true;
}
} else {
......
......@@ -116,8 +116,6 @@ class Report {
private $showDebugInfoFlag = false;
private $flagFillStoreRecord = true;
/**
* Report constructor.
*
......@@ -214,7 +212,6 @@ class Report {
* Main function. Parses bodytext and iterates over all queries.
*
* @param $bodyText
* @param bool $flagFillStoreRecord
* @return string
* @throws CodeException
* @throws DbException
......@@ -222,13 +219,12 @@ class Report {
* @throws UserFormException
* @throws UserReportException
*/
public function process($bodyText, $flagFillStoreRecord = true) {
public function process($bodyText) {
//phpUnit Test: clean environment
$this->frArray = array();
$this->indexArray = array();
$this->levelCount = 0;
$this->flagFillStoreRecord = $flagFillStoreRecord;
// Iteration over Bodytext
$ttLineArray = explode("\n", $bodyText);
......@@ -311,7 +307,7 @@ class Report {
$this->frArray[$level . "." . $frCmd] = $value;
// per sql command
//pro sql cmd wir der Indexarray abgefüllt. Dieser wird später verwendet um auf den $frArray zuzugreifen
//pro sql cmd wird der Indexarray abgefüllt. Dieser wird später verwendet um auf den $frArray zuzugreifen
//if(preg_match("/^sql/i", $frCmd) == 1){
// if ($frCmd === TOKEN_FORM || $frCmd === TOKEN_SQL) {
if ($frCmd === TOKEN_SQL) {
......@@ -663,9 +659,7 @@ class Report {
}
}
if ($this->flagFillStoreRecord) {
$this->store->appendToStore($assoc, STORE_RECORD);
}
$this->store->appendToStore($assoc, STORE_RECORD);
return ($content);
}
......@@ -691,7 +685,6 @@ class Report {
$content = "";
$flagControl = false;
$flagOutput = true;
$dummy = false;
// Special column name: '_...'? Empty column names are allowed: check with isset
if (isset($columnName[0]) && $columnName[0] === TOKEN_COLUMN_CTRL) {
......
Supports Markdown
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