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

Index.rst: update STORE_VAR doc.

Link.php: add some doc.
parent e235dd12
...@@ -429,9 +429,9 @@ Store: *VARS* - V ...@@ -429,9 +429,9 @@ Store: *VARS* - V
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| slaveId | see *FormElement* `action` | | slaveId | see *FormElement* `action` |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| filename | Original filename of an uploaded file via an 'upload'-FormElement. | | filename | Original filename of an uploaded file via an 'upload'-FormElement. Valid only during processing of the current 'upload'-formElement. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| fileDestinaton | Destination (path & filename) for an uploaded file. Defined in an 'upload'-FormElement.parameter. | | fileDestinaton | Destination (path & filename) for an uploaded file. Defined in an 'upload'-FormElement.parameter. Valid: same as 'filename'. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
...@@ -1076,9 +1076,11 @@ Type: datetime ...@@ -1076,9 +1076,11 @@ Type: datetime
Type: extra Type: extra
^^^^^^^^^^^ ^^^^^^^^^^^
* Element is not shown in the browser. * Element is not shown in the browser.
* The element can be used to define / precalculate values for a column, which do not already exist as a native *FormElement*. * The element can be used to define / precalculate values for a column, which do not already exist as a native *FormElement*.
* The element is build /computed on form load. * The element is build / computed on form load and saved alongside with the SIP parameter of the current form.
* Access the value without specifying any store (default store priority is sufficient).
Type: text Type: text
^^^^^^^^^^ ^^^^^^^^^^
......
...@@ -382,13 +382,14 @@ class Link { ...@@ -382,13 +382,14 @@ class Link {
} }
/** /**
* @param $str * @param string $str
* @param array $tokenGiven * @param array $tokenGiven
* @return array * @return array
* @throws UserReportException * @throws UserReportException
*/ */
private function fillParameter($str, array &$tokenGiven) { private function fillParameter($str, array &$tokenGiven) {
// define all possible vars: no more isset()
$vars = $this->initVars(); $vars = $this->initVars();
$flagArray = array(); $flagArray = array();
...@@ -398,6 +399,7 @@ class Link { ...@@ -398,6 +399,7 @@ class Link {
// Parse all parameter, fill variables // Parse all parameter, fill variables
foreach ($param as $item) { foreach ($param as $item) {
// Skip empty entries
if ($item === '') { if ($item === '') {
continue; continue;
} }
...@@ -407,6 +409,7 @@ class Link { ...@@ -407,6 +409,7 @@ class Link {
$key = isset($arr[0]) ? $arr[0] : ''; $key = isset($arr[0]) ? $arr[0] : '';
$value = isset($arr[1]) ? $arr[1] : ''; $value = isset($arr[1]) ? $arr[1] : '';
// Bookkeeping defined parameter.
if (isset($tokenGiven[$key])) { if (isset($tokenGiven[$key])) {
throw new UserReportException ("Multiple definitions for key '$key'", ERROR_MULTIPLE_DEFINITION); throw new UserReportException ("Multiple definitions for key '$key'", ERROR_MULTIPLE_DEFINITION);
} }
......
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