Overview
Comment:DynamicList: include hidden fields for modifier, but not for export
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: a2c6c2ea970d44fefdec259e705947d3c7ca87b41e63db5a4310cae9641f33be
User & Date: bohwaz on 2021-12-17 13:50:39
Other Links: manifest | tags
Context
2021-12-17
13:51
Fix manifest colors check-in: ee33b91a11 user: bohwaz tags: trunk, stable
13:50
DynamicList: include hidden fields for modifier, but not for export check-in: a2c6c2ea97 user: bohwaz tags: trunk, stable
2021-12-16
23:05
Fix preselected account from quick transaction button in account journal check-in: b457ded4e7 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/DynamicList.php from [4a558ce327] to [19f54eeec5].

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
			}

			// Skip columns that require a certain order AND paginated result
			if (isset($properties['only_with_order']) && $this->page > 1) {
				continue;
			}

			if (!isset($properties['label']) && !$include_hidden) {
				continue;
			}

			$select = array_key_exists('select', $properties) ? $properties['select'] : $alias;

			if (null === $select) {
				$select = 'NULL';
			}

			$columns[] = sprintf('%s AS %s', $select, $alias);







<
<
<
<







172
173
174
175
176
177
178




179
180
181
182
183
184
185
			}

			// Skip columns that require a certain order AND paginated result
			if (isset($properties['only_with_order']) && $this->page > 1) {
				continue;
			}





			$select = array_key_exists('select', $properties) ? $properties['select'] : $alias;

			if (null === $select) {
				$select = 'NULL';
			}

			$columns[] = sprintf('%s AS %s', $select, $alias);
211
212
213
214
215
216
217






218
219
220
221
222
223
224
			$sql .= sprintf(' LIMIT %d,%d', $start, $this->per_page);
		}

		foreach (DB::getInstance()->iterate($sql) as $row) {
			if ($this->modifier) {
				call_user_func_array($this->modifier, [&$row]);
			}







			yield $row;
		}
	}

	public function loadFromQueryString()
	{







>
>
>
>
>
>







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
			$sql .= sprintf(' LIMIT %d,%d', $start, $this->per_page);
		}

		foreach (DB::getInstance()->iterate($sql) as $row) {
			if ($this->modifier) {
				call_user_func_array($this->modifier, [&$row]);
			}

			foreach ($this->columns as $key => $config) {
				if (empty($config['label']) && !$include_hidden) {
					unset($row->$key);
				}
			}

			yield $row;
		}
	}

	public function loadFromQueryString()
	{