Skip to content

Commit eb2493b

Browse files
authored
Merge pull request #551 from cosmocode/includecompat
allow serial entries to be included
2 parents 60da208 + 3f10845 commit eb2493b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

syntax/serial.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ public function connectTo($mode)
3030
*/
3131
protected function addTypeFilter($config)
3232
{
33-
global $ID;
33+
// we get the main ID instead of using $ID, so that serial data entry can be used via includes
34+
// $INFO is not set yet so it can't be used
35+
$id = getID();
3436
$config['filter'][] = ['%rowid%', '!=', (string)AccessTablePage::DEFAULT_PAGE_RID, 'AND'];
35-
$config['filter'][] = ['%pageid%', '=', $ID, 'AND'];
37+
$config['filter'][] = ['%pageid%', '=', $id, 'AND'];
3638
$config['withpid'] = 1; // flag for the editor to distinguish data types
3739
return $config;
3840
}

0 commit comments

Comments
 (0)