Changeset 20 for types/PointerOneToOne.php
- Timestamp:
- Oct 22, 2008, 9:31:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
types/PointerOneToOne.php
r19 r20 5 5 function GetTablePointerName($Type, $Item) 6 6 { 7 global $Database , $Lists;7 global $Database; 8 8 9 9 //print_r($Item); … … 11 11 $TargetTable = $Type['Parameters'][0]; 12 12 13 foreach($Lists[$TargetTable]['Items'] as $ListItem) 13 $List = GetListDefinition($TargetTable); 14 foreach($List['Items'] as $ListItem) 14 15 if($ListItem['VisibleInPointer'] == 1) $Columns .= '`'.$ListItem['Name'].'`," ",'; 15 16 $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, ItemId, Id'; … … 24 25 function GetTablePointerNameList($Type, $Item) 25 26 { 26 global $Database , $Lists;27 global $Database; 27 28 28 29 $Columns = ''; 29 30 $TargetTable = $Type['Parameters'][0]; 30 31 31 foreach($Lists[$TargetTable]['Items'] as $ListItem) 32 $List = GetListDefinition($TargetTable); 33 foreach($List['Items'] as $ListItem) 32 34 if($ListItem['VisibleInPointer'] == 1) $Columns .= 't1.`'.$ListItem['Name'].'`," ",'; 33 35 $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, t1.Id, t1.ItemId, t1.DeletionTime'; … … 45 47 function OnView($Item) 46 48 { 47 global $Database, $ Lists, $Types;49 global $Database, $Types; 48 50 49 51 $Type = $Types[$Item['Type']]; … … 56 58 function OnEdit($Item) 57 59 { 58 global $Database, $ Lists, $Types;60 global $Database, $Types; 59 61 60 62 $Type = $Types[$Item['Type']];
Note:
See TracChangeset
for help on using the changeset viewer.