Commit 83dfdcde authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Merge remote-tracking branch 'origin/master' into raos_work

parents 542d5816 c65b163f
......@@ -6,7 +6,6 @@
/.plantuml
/doc/plantuml
/extension/Documentation/_make/build
/qfq.ini
/doc/phpdoc
/.idea
/node_modules
......@@ -20,7 +19,7 @@
/css
/fonts
/qfq.flowchart.dia.autosave
/extension/config.ini
/qfq*.zip
/support
/extension/Resources/Public/fonts
/extension/Resources/Public/JavaScript
......
......@@ -2,7 +2,7 @@ PHPDOC ?= support/pear/phpdoc
JSDOC ?= jsdoc
PKG_VERSION = $(shell awk '/version/ { print $$3 }' extension/ext_emconf.php | sed "s/'//g")
NIGHTLY_DATE = $(shell date '+%Y%m%d')
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php config.example.ini
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png config.example.ini
all: archive t3sphinx
......@@ -12,10 +12,10 @@ maintainer-clean:
rm -f .bowerpackages .doc_plantuml .npmpackages .phpdocinstall .plantuml_install .support .support_plantuml
rm -rf doc support
archive: clean qfq_$(PKG_VERSION).zip
archive: clean qfq.zip
qfq_$(PKG_VERSION).zip:
cd extension; zip -r ../$@ $(EXTENSION_CONTENT) -x config.ini
qfq.zip:
cd extension; zip -r ../$@ $(EXTENSION_CONTENT)
clean:
rm -f qfq_$(PKG_VERSION).zip
......
......@@ -23,7 +23,7 @@ LOAD
* When qfq starts,
* (Form) Looking for a formname at:
1. Typo3 Bodytext Element,
2. For the 'SIP' ($_GET['s'])
2. For the 'SIP' ($_GET['s'] => $S_SESSION['qfq'][$_GET['s']]="form=person&r=123")
3. $_GET variables 'form' and 'r' (=recordId) - the parameter 'form' has to be allowed in 'Permit URL Parameter' of
the specified form. This means: load the form to check, if it is allowed to load the form!?
* If a formname is found, the search stops and the specified form will be processed.
......@@ -36,12 +36,20 @@ LOAD
* All parameters from active SIP: [$this->store->getStore(STORE_SIP)]
* Check Contstants.php for known Store members
* In QuickFormQuery.php the whole Form will be copied to $this->formSpec and depending on further processing, the elements are
available in $this->feNative and $this->feAction.
* In QuickFormQuery.php the whole Form will be copied to `$this->formSpec` and depending on further processing, the
elements are available in `$this->feNative` and `$this->feAction`.
* The Form specificaton (table form) will be evaluated direct after loading.
* The FormElement specification will be evaluated later on in BuildForm*.php
* If a form is called without a SIP (form.permitNew='always'), than a SIP is created on the fly (as a
parameter in the form).
* Depending on `r=0` or `r>0` a form submit will do an MySQL `insert` or `update` later during save.
* For new records (r=0), clicking on 'save' without closing the form is a tricky situation. Additionally the user might have open multiple
tabs (same form, all r=0) and after saving the record (wihtout closing the form) the user expects that it's ok to edit
the record again and again. Unfortunately, the initial created SIP (before 'form load') is not uniqe anymore (multiple
tabs might contain a saved 'new record'). To guarantee correct saving of r=0 records, a unique on the fly generated SIP
is creatd during form load - individually per browser tab.
SAVE
----
* Via wrapper api/save.php
......@@ -51,6 +59,18 @@ SAVE
* Client will handle the response of save.php.
* Optional redirection initiated by client.
New records
...........
* r=0 (missing 'r' means r=0)
* After saving the SIP content will be updated with the new record.
Remember that the SIP in the URL is *not* the SIP used in the form to identify the form/record. The form use a
individual 'new record' SIP.
Existing records
................
* r>0 ('r' have to exist)
DELETE
------
* Via wrapper api/delete.php
......@@ -226,8 +246,8 @@ SIP
===
Page loaded: www.example.com?index.php&id=start&s=badcaffee1234&type=2&L=3, with $_SESSION['badcaffee1234'] => 'form=Person&r=1'
* $_SESSION[$sip] => <urlparam> >> $_SESSION['badcaffee1234'] => 'form=Person&r=1'
* $_SESSION[$urlparam] => <sip> >> $_SESSION['form=Person&r=1'] => 'badcaffee1234'
* $_SESSION['qfq'][$sip] => <urlparam> >> $_SESSION['qfq']['badcaffee1234'] => 'form=Person&r=1'
* $_SESSION['qfq'][$urlparam] => <sip> >> $_SESSION['qfq']['form=Person&r=1'] => 'badcaffee1234'
FormElement
......
......@@ -10,13 +10,16 @@ Neue Versionsnummer
2) Im Projectverzeichnis:
make t3sphinx (nicht sicher ob das noetig ist)
3) Neuen Tag vergeben: git tag v0.5
3) Merge auf master Branch
4) Neuen Tag vergeben: git tag 0.8
4) Alle Files, inkl. Tags, in GIT einchecken.
5) Alle Files, inkl. Tags, in GIT einchecken.
5) Per PhpStorm Sync aller Files auf VM qfq
6) Per PhpStorm Sync aller Files auf VM qfq
6) In T3 Instanz Dokumentation rendern lassen.
7) In T3 Instanz Dokumentation rendern lassen.
T3 6.2: Admin Tools > Extension Manager > QFQ > Doku HTML: rechts oben 'Render Documentation'
Note
\ No newline at end of file
......@@ -17,6 +17,8 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public function showAction() {
$origErrorReporting = '';
try {
$contentObject = $this->configurationManager->getContentObject();
......
......@@ -4,27 +4,26 @@ mod.wizards.newContentElement
{
special.elements
{
sampleextension_element
qfq_element
{
icon = icon
goes
here
title = Sample
title = QFQ Content Element
Content
Element
description = More
description = Quick Form Query (QFQ) offers a Form Editor and a SQL based Report Language.
info
goes
here
tt_content_defValues
{
CType = sampleextension_samplepluginname
CType = qfq_qfq
}
}
}
special.show
:
= addToList(sampleextension_element)
= addToList(qfq_element)
}
}
......@@ -20,19 +20,30 @@ native driver (see also: http://dev.mysql.com/downloads/connector/php-mysqlnd/):
* mysqli::get_result (important),
* mysqli::fetch_all (nice to use)
Installation for Ubuntu::
Preparation for Ubuntu 14.04::
sudo apt-get install php5-mysqlnd
sudo php5enmod mysqlnd
sudo service apache2 restart
Preparation steps for Ubuntu 16.04::
none
Setup
-----
* Install the extension via the Extensionmanager.
* Rename the file *<ext_dir>/config.example.ini* to *<ext_dir>/config.ini* and configure the necessary values: `<ext_dir>/config.ini`_
* If you install the extension by manual download/upload and get an error message
"can't activate extension": rename the downloaded zip file to `qfq.zip`.
* If the Extensionmanager stops after importing: check your memory limit in php.ini.
* Enable the online Documentation_.
* Copy/rename the file *<ext_dir>/config.example.qfq.ini* to *typo3conf/config.qfq.ini* and configure the necessary values: `config.qfq.ini`_
* Play the SQL File *<ext_dir>/qfq/sql/formEditor.sql* to fill the database with the *FormEditor* records.
* Configure Typoscript to include Bootstrap, jQuery and QFQ javascript and CSS files.
* Configure Typoscript to include Bootstrap, jQuery, QFQ javascript and CSS files.
::
......@@ -62,9 +73,9 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
::
form = {{form}}
form = {{form:T}}
10 {
sql = SELECT CONCAT('{{pageId}}&form=Form&r=', f.id) as Pagee, f.id, f.name, f.title, f.tableName FROM FormEditor As f ORDER BY f.name
sql = SELECT CONCAT('{{pageId}}&form=Form&r=', f.id) as Pagee, f.id, f.name, f.title, f.tableName FROM Form AS f ORDER BY f.name
head = <br><table class="table">
tail = </table>
rbeg = <tr class="table-hover">
......@@ -73,8 +84,9 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
fend = </td>
}
<ext_dir>/config.ini
--------------------
config.qfq.ini
--------------
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| Keyword | Example | Description |
......@@ -106,7 +118,7 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
| DATE_FORMAT | DATE_FORMAT= yyyy-mm-dd | Possible options: yyyy-mm-dd, dd.mm.yyyy |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
Example: *<ext_dir>/config.ini*
Example: *typo3conf/config.qfq.ini*
::
......@@ -119,4 +131,24 @@ Example: *<ext_dir>/config.ini*
SQL_LOG = sql.log
SHOW_DEBUG_INFO = auto
CSS_LINK_CLASS_INTERNAL = internal
CSS_LINK_CLASS_EXT = external
\ No newline at end of file
CSS_LINK_CLASS_EXT = external
Documentation
-------------
To render the QFQ reST documentation:
* Take care to have 'unzip' and 'Python setuptools' installed (necessary to run ).
Preparation for Ubuntu 16.04::
sudo apt install unzip python-setuptools
* Install the extension "Sphinx Python Documentation Generator and Viewer" (sphinx).
* Execute the update script (symbol 'two arrows as a circle' behind the extension name)
* Choose 'Sphinx 1.4.4' - click on 'Import'.
* In the Exension Manager open the configuration dialog of the extension 'sphinx'. Activate the 'Sphinx 1.4.4' option and save it.
* On top of the browser window click on the 'question mark' to open the menu, choose 'Sphinx'.
* Show doumentation 'QFQ Extension'
......@@ -4,10 +4,10 @@
---
conf.py:
copyright: 2016
copyright: 2017
project: QFQ Extension
version: 0.5
release: 0.5.0
version: 0.8
release: 0.8.0
latex_documents:
- - Index
- qfq.tex
......
......@@ -191,14 +191,26 @@ Sanitize class
the default class is 'digit'.
* A default sanitize class can be overwritten by individual definition: *{{a:C:all}}*
* **alnumx**: [A-Za-z][0-9]@-_.,;: /()
* **digit**: [0-9].-+
* **email**: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
* **min|max**: only usable in forms. Compares the value against an lower and upper limit (numeric or string).
* **min|max date**: only usable in forms. Compares the value against an lower and upper date or datetime.
* **pattern**: only usable in forms. Compares the value against a regexp.
* **allbut**: all characters allowed, but not [ ] { } % & \ #. The used regexp: '^[^\[\]{}%&\\#]+$',
* **all**: no sanitizing
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| Name | Form | Query | Pattern |
+==================+======+=======+=========================================================================================+
| **alnumx** | Form | Query | [A-Za-z][0-9]@-_.,;: /() |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **digit** | Form | Query | [0-9].-+ |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **email** | Form | Query | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **min|max** | Form | | Compares the value against an lower and upper limit (numeric or string). |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **min|max date** | Form | | Compares the value against an lower and upper date or datetime. |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **pattern** | Form | | Compares the value against a regexp. |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **allbut** | Form | Query | All characters allowed, but not [ ] { } % & \ #. The used regexp: '^[^\[\]{}%&\\#]+$', |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
| **all** | Form | Query | no sanitizing |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
Store / prio
......@@ -449,7 +461,7 @@ SQL Statement
* Special case for SELECT input fields. To deliver a result array specify an '!' before the SELECT: ::
*{{!SELECT ...}}*
{{!SELECT ...}}
* This is only possible for the outermost SELECT.
......@@ -1680,12 +1692,14 @@ Records will be deleted via `typo3conf/ext/qfq/qfq/api/delete.php` and needs the
* _targetUrl=<url> , typically, this is the $_SERVER['REQUEST_URI'] available via {{REQUEST_URI:Y}}.
* _answerMode=html
* _table=<table name>
* r=<record id>
Example:
::
SELECT 'u:typo3conf/ext/qfq/qfq/api/delete.php|U:table=Person&r=123&_targetUrl={{REQUEST_URI:Y}}&_answerMode=html|q:Do you want delete John Doe?|s|c:n' AS _link
SELECT 'u:typo3conf/ext/qfq/qfq/api/delete.php|U:_table=Person&r=123&_targetUrl={{REQUEST_URI:Y}}&_answerMode=html|q:Do you want delete John Doe?|s|c:n' AS _link
It's easier to use the shortcut via special columnname `_paged`.
......@@ -1718,7 +1732,7 @@ The colum name is composed of the string *page* and a trailing character to spec
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
|_pagec |Internal link without a grafic, with question |*Please confirm!* |p:<pageId>[&param] |
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
|_paged |Internal link with delete icon (trash) |*Delete record ?* |p:<pageId>[&param] |
|_paged |Internal link with delete icon (trash) |*Delete record ?* |p:<pageId>[&param]???? |
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
|_pagee |Internal link with edit icon (pencil) |empty |p:<pageId>[&param] |
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
......@@ -1770,7 +1784,7 @@ Necessary parameter:
::
SELECT "p:delete?table=<tablename>&r=<recordId|q:<question>|..." AS _paged
SELECT "p:delete?_table=<tablename>&r=<recordId>|q:<question>|..." AS _paged
..
......@@ -1782,7 +1796,7 @@ Columns: _Page[X]
::
[<page id|alias>[&param=value&...]] | [text] | [tooltip] | [question parameter] | [class] | [target] | [render mode] | [create sip] "" as _pagee.
[<page id|alias>[&param=value&...]] | [text] | [tooltip] | [question parameter] | [class] | [target] | [render mode] | [create sip] "" as _Pagee.
..
......
......@@ -50,16 +50,16 @@ master_doc = 'Index'
# General information about the project.
project = u'QFQ Extension'
copyright = u'2016, Carsten Rose'
copyright = u'2017, Carsten Rose'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.5'
version = '0.8'
# The full version, including alpha/beta/rc tags.
release = '0.5.0'
release = '0.8.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -10,5 +10,5 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase',
'clearcacheonload' => true,
'state' => 'alpha',
'version' => '0.5'
'version' => '0.8'
);
\ No newline at end of file
......@@ -72,8 +72,9 @@ if (!isset($result[MSG_HEADER]) && !isset($result[MSG_CONTENT])) {
$result[MSG_CONTENT] = json_encode($answer);
}
if (isset($result[MSG_HEADER]) && $result[MSG_HEADER] !== '')
if (isset($result[MSG_HEADER]) && $result[MSG_HEADER] !== '') {
header($result[MSG_HEADER]);
}
echo $result[MSG_CONTENT];
......
......@@ -281,6 +281,8 @@ abstract class AbstractBuildForm {
}
/**
* Return a uniq form id
*
* @return string
*/
public function getFormId() {
......@@ -343,7 +345,7 @@ abstract class AbstractBuildForm {
// get current data record
if ($recordId > 0 && $this->store->getVar('id', STORE_RECORD) === false) {
$row = $this->db->sql("SELECT * FROM " . $this->formSpec[F_TABLE_NAME] . " WHERE id = ?", ROW_EXPECT_1, array($recordId));
$row = $this->db->sql("SELECT * FROM " . $this->formSpec[F_TABLE_NAME] . " WHERE id = ?", ROW_EXPECT_1, array($recordId), "Form '" . $this->formSpec[F_NAME] . "' failed to load record '$recordId' from table '" . $this->formSpec[F_TABLE_NAME] . "'.");
$this->store->setVarArray($row, STORE_RECORD);
}
......@@ -467,6 +469,8 @@ abstract class AbstractBuildForm {
}
/**
* Create an array with standard elements and add 'form-element', 'value'.
*
* @param $htmlFormElementId
* @param string|array $value
* @param string $feMode disabled|readonly|''
......@@ -497,6 +501,8 @@ abstract class AbstractBuildForm {
}
/**
* Depending of $feMode set variables $hidden, $disabled, $required to 'yes' or 'no'.
*
* @param $feMode
* @param $hidden
* @param $disabled
......@@ -648,6 +654,8 @@ abstract class AbstractBuildForm {
}
/**
* Calculates the maxlength of an input field, based on formElement type, formElement user definition and table.field definition.
*
* @param array $formElement
*/
private function adjustMaxLength(array &$formElement) {
......@@ -848,6 +856,8 @@ abstract class AbstractBuildForm {
}
/**
* Build HelpBlock
*
* @return string
*/
private function getHelpBlock() {
......@@ -1255,6 +1265,7 @@ abstract class AbstractBuildForm {
$br = '';
$html = $this->buildNativeHidden($htmlFormElementId, $value);
for ($ii = 0; $ii < count($itemValue); $ii++) {
$jj++;
$attribute = $attributeBase; //
......@@ -1433,7 +1444,6 @@ abstract class AbstractBuildForm {
}
if ($flagDelete) {
// $s = $this->createDeleteUrl($targetTableName, $row[$nameColumnId], RETURN_SIP);
$s = $this->createDeleteUrl($targetTableName, $row[$nameColumnId], RETURN_SIP);
$rowHtml .= Support::wrapTag('<td>', Support::wrapTag("<button type='button' class='record-delete btn btn-default' data-sip='$s'>", '<span class="glyphicon ' . GLYPH_ICON_DELETE . '"></span>'));
}
......@@ -1469,7 +1479,7 @@ abstract class AbstractBuildForm {
private function prepareSubrecod(array $formElement, array $primaryRecord, &$rcText, &$nameColumnId) {
if (!isset($primaryRecord['id'])) {
$rcText = 'Please save record first.';
$rcText = 'Please save and close record and reopen it.';
return false;
}
......@@ -1772,7 +1782,7 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute('data-load', ($formElement['dynamicUpdate'] === 'yes') ? 'data-load' : '');
$attribute .= Support::doAttribute('data-sip', $sipUpload);
if ($value === '') {
if ($value === '' || $value === false) {
$textDeleteClass = 'hidden';
$uploadClass = '';
} else {
......@@ -2029,6 +2039,8 @@ abstract class AbstractBuildForm {
}
/**
* Parse $formElement[FE_EDITOR_*] settings and build editor settings.
*
* @param array $formElement
* @param $htmlFormElementId
* @return array
......@@ -2206,6 +2218,8 @@ abstract class AbstractBuildForm {
}
/**
* Create a delete link.
*
* @param $table
* @param $recordId
* @param $symbol
......
......@@ -59,8 +59,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = "<div class='col-md-12'>";
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = "</div>";
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = "<p>";
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = "</p>";
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = "";
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = "";
// $this->feDivClass['radio'] = 'radio';
// $this->feDivClass['checkbox'] = 'checkbox';
......@@ -434,10 +434,15 @@ EOF;
}
/**
* Builds a fieldset
*
* @param $formElement
* @param $elementHtml
*/
public function buildRowFieldset(array $formElement, $elementHtml) {
$html = $elementHtml;
return $html;
}
/**
......
......@@ -7,7 +7,7 @@
*/
const EXT_KEY = 'qfq';
const CONFIG_INI = "config.ini"; // QFQ configuration file: db access
const CONFIG_INI = "config.qfq.ini"; // QFQ configuration file: db access
const GFX_INFO = 'typo3conf/ext/qfq/Resources/Public/icons/note.gif';
const API_DIR = 'typo3conf/ext/qfq/qfq/api';
......@@ -153,6 +153,7 @@ const ERROR_UNKNOWN_ESCAPE_MODE = 1068;
const ERROR_MISSING_CONFIG_INI_VALUE = 1069;
const ERROR_SENDMAIL = 1070;
const ERROR_SENDMAIL_MISSING_VALUE = 1071;
const ERROR_OVERWRITE_RECORD_ID = 1072;
// Subrecord
const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100;
......@@ -323,17 +324,21 @@ const MSG_HEADER = 'header';
const MSG_CONTENT = 'content';
const MSG_ERROR_CODE = 'errorCode';
const SIP_TOKEN_LENGTH = 13; // length of string returned by `uniqid()`
const SIP_SIP = CLIENT_SIP; // s
const SIP_RECORD_ID = CLIENT_RECORD_ID; // r
const SIP_TARGET_URL= '_targetUrl'; // URL where to jump after delete()
const SIP_MODE_ANSWER = '_modeAnswer'; // Mode how delete() will answer to client: MODE_HTML, MODE_JSON
const SIP_FORM = CLIENT_FORM;
const SIP_TABLE = 'table'; // delete a record from 'table'
const SIP_TABLE = '_table'; // delete a record from 'table'
const SIP_URLPARAM = 'urlparam';
const SIP_MAKE_URLPARAM_UNIQ = '_makeUrlParamUniq'; // SIPs for 'new records' needs to be uniq per TAB! Therefore add a uniq parameter
// FURTHER: all extracted params from 'urlparam
const VAR_RANDOM = 'random';
//const RECORD_ID_NEW = -1;
// TOKEN evaluate
const TOKEN_ESCAPE_SINGLE_TICK = 's';
const TOKEN_ESCAPE_DOUBLE_TICK = 'd';
......@@ -431,6 +436,7 @@ const GLYPH_ICON_CHECK = 'glyphicon-ok';
const GLYPH_ICON_CLOSE = 'glyphicon-remove';
// FORM
const F_NAME = 'name';
const F_TABLE_NAME = 'tableName';
const F_REQUIRED_PARAMETER = 'requiredParameter';
......
......@@ -282,7 +282,7 @@ class Database {
$stat[DB_INSERT_ID] = $this->mysqli->insert_id;
$stat[DB_AFFECTED_ROWS] = $this->mysqli->affected_rows;
$count = $stat[DB_AFFECTED_ROWS];
$msg = 'ID: ' . $count;
$msg = 'ID: ' . $this->mysqli->insert_id;
break;
case 'UPDATE':
case 'DELETE':
......
......@@ -34,7 +34,7 @@ class Delete {
/**
* Deletes the record id=$recordId from table $form[F_TABLE_NAME].
* If the tables has a column named COLUMN_PATH_FILE_NAME and the value of that specific record column points
* If the table has a column named COLUMN_PATH_FILE_NAME and the value of that specific record column points
* to a file: delete such a file if their are no other records in the same table which also have a reference to that file.
*
* @param array $form
......@@ -49,7 +49,7 @@ class Delete {
$rc = false;
$msg = array();
if (!isset($form[F_TABLE_NAME]) || $form[F_TABLE_NAME] === '') {
if (!isset($form[F_TABLE_NAME]) || $form[F_TABLE_NAME] === '' || $form[F_TABLE_NAME] === false ) {
throw new CodeException('Missing table name', ERROR_MISSING_TABLE_NAME);
}
......@@ -86,11 +86,8 @@ class Delete {
}
}
}
}
$this->db->sql("DELETE FROM " . $form[F_TABLE_NAME] . " WHERE id =? LIMIT 1", ROW_REGULAR, [$recordId]);
$rc = true;
} else {
......
......@@ -211,7 +211,7 @@ class Evaluate {
/**
* @return string
*/
public function getDebug() {
return '<pre>' . implode("\n", $this->debugStack) . '</pre>';
}
// public function getDebug() {
// return '<pre>' . implode("\n", $this->debugStack) . '</pre>';