Commit 1ee3d062 authored by Carsten  Rose's avatar Carsten Rose
Browse files

F6289 Form Log: Vorarbeiten zur Implementierung - nicht lauffaehig.

parent 52b5f919
......@@ -6425,13 +6425,15 @@ to the file is SIP protected. Any file on the server is possible.
10.sql = SELECT 'file:fileadmin/protected/log/sql.log|tail:50|append:1|refresh:1000|htmlId:monitor-1' AS _monitor
# Short version with all defaults used.
10.sql = SELECT 'file:fileadmin/protected/log/sql.log' AS _monitor
* Short version with all defaults used to display system configured sql.log: ::
10.sql = SELECT 'file:{{sqlLog:Y}}' AS _monitor, '<pre id="monitor-1" style="white-space: pre-wrap;">Please wait</pre>'
Report Examples
---------------
The following section gives some examples of typical reports
The following section gives some examples of typical reports.
Basic Queries
^^^^^^^^^^^^^
......
......@@ -1296,6 +1296,8 @@ const COLUMN_WRAP_TOKEN = '+';
const FORM_NAME_FORM = 'form';
const FORM_NAME_FORM_ELEMENT = 'formElement';
const FORM_LOG_SESSION = 'logSession';
const FORM_LOG_ALL = 'logAll';
// DOWNLOAD
const DOWNLOAD_MODE = 'mode';
......
......@@ -275,7 +275,9 @@ class QuickFormQuery {
}
}
private function buildFormLog($formName){
}
/**
* Process form.
* $mode=
......@@ -306,9 +308,13 @@ class QuickFormQuery {
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT . STORE_ZERO);
$this->setParameterLanguageFieldName();
$formName = $this->loadFormSpecification($formMode, $recordId, $foundInStore);
$formName = $this->loadFormSpecification($formMode, $recordId, $foundInStore, $modeLog);
if(false!==$modeLog){
return $this->buildFormLog($formName);
}
if ($formName === false) {
switch ($formName) {
switch ($formMode) {
case FORM_DELETE:
break;
case FORM_DRAG_AND_DROP:
......@@ -666,6 +672,21 @@ class QuickFormQuery {
}
/**
* @param $formName
* @return bool
*/
private function checkForModeLog($formName, &$modeLog) {
$modeLog=false;
$arr = explode('|', $formName);
if (!empty($arr[1]) && ($arr[1] == FORM_LOG_ALL || $arr[1] == FORM_LOG_SESSION)) {
$modeLog = $arr[1];
}
return $arr[0];
}
/**
* Load form. Evaluates form. Load FormElements.
*
......@@ -684,13 +705,19 @@ class QuickFormQuery {
* @throws UserFormException
* @throws UserReportException
*/
private function loadFormSpecification($mode, $recordId, &$foundInStore = '') {
private function loadFormSpecification($mode, $recordId, &$foundInStore = '', &$modeLog='') {
// formName
if (false === ($formName = $this->getFormName($mode, $foundInStore))) {
return false;
}
$formName = $this->checkForModeLog($formName, $modeLog);
if ($modeLog!==false ) {
return $formName;
}
if (!$this->dbArray[$this->dbIndexQfq]->existTable(TABLE_NAME_FORM)) {
throw new UserFormException("Table '" . TABLE_NAME_FORM . "' not found", ERROR_MISSING_TABLE);
}
......@@ -1091,8 +1118,8 @@ class QuickFormQuery {
}
// Append recordId to title
if($formSpec[F_SHOW_ID_IN_FORM_TITLE]=='1'){
$formSpec[F_TITLE] .= ($recordId==0) ? " (new)" : " ($recordId)";
if ($formSpec[F_SHOW_ID_IN_FORM_TITLE] == '1') {
$formSpec[F_TITLE] .= ($recordId == 0) ? " (new)" : " ($recordId)";
}
return $formSpec;
......
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