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

UsersManual/index.rst: Doc angepasst auf geaenderte Variablennamen alt: 'table', neu: '_table'

delete.php, Delete.php: reformat
Link.php: typo
parent c58b0f4a
......@@ -1692,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`.
......@@ -1730,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] |
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
......@@ -1782,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
..
......
......@@ -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];
......
......@@ -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 {
......
......@@ -642,6 +642,8 @@ class QuickFormQuery {
case MODE_HTML:
if ($targetUrl === false || $targetUrl === '') {
$result[MSG_CONTENT] = 'Missing target URL. ' . ERROR_MISSING_VALUE;
//TODO: vermutlich muss hier $rc=false gesetzt werden. Habe zur Zeit keine Moeglichkeit das zu testen.
// $rc = false;
}
if ($rc === true) {
......
......@@ -535,7 +535,7 @@ class Link {
case TOKEN_ENCRYPTION:
case TOKEN_SIP:
if ($value !== '0' && $value !== '1') {
throw new UserReportException ("Invalied value for token '$key': '$value''", ERROR_INVALID_VALUE);
throw new UserReportException ("Invalid value for token '$key': '$value''", ERROR_INVALID_VALUE);
}
break;
default:
......
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