Ignore:
Timestamp:
Oct 22, 2008, 9:31:11 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Redukce použité paměti změnou načítání seznamů "na přání" místo všech najednou.
  • Upraveno: Použití fetch_assoc a fetch_row místo společného fetch_array,
File:
1 edited

Legend:

Unmodified
Added
Removed
  • types/PointerOneToOne.php

    r19 r20  
    55  function GetTablePointerName($Type, $Item)
    66  {
    7     global $Database, $Lists;
     7    global $Database;
    88
    99    //print_r($Item);
     
    1111    $TargetTable = $Type['Parameters'][0];
    1212
    13     foreach($Lists[$TargetTable]['Items'] as $ListItem)
     13    $List = GetListDefinition($TargetTable);
     14    foreach($List['Items'] as $ListItem)
    1415      if($ListItem['VisibleInPointer'] == 1) $Columns .= '`'.$ListItem['Name'].'`," ",';
    1516    $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, ItemId, Id';
     
    2425  function GetTablePointerNameList($Type, $Item)
    2526  {
    26     global $Database, $Lists;
     27    global $Database;
    2728
    2829    $Columns = '';
    2930    $TargetTable = $Type['Parameters'][0];
    3031
    31     foreach($Lists[$TargetTable]['Items'] as $ListItem)
     32    $List = GetListDefinition($TargetTable);
     33    foreach($List['Items'] as $ListItem)
    3234      if($ListItem['VisibleInPointer'] == 1) $Columns .= 't1.`'.$ListItem['Name'].'`," ",';
    3335    $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, t1.Id, t1.ItemId, t1.DeletionTime';
     
    4547  function OnView($Item)
    4648  {
    47     global $Database, $Lists, $Types;
     49    global $Database, $Types;
    4850
    4951    $Type = $Types[$Item['Type']];
     
    5658  function OnEdit($Item)
    5759  {
    58     global $Database, $Lists, $Types;
     60    global $Database, $Types;
    5961
    6062    $Type = $Types[$Item['Type']];
Note: See TracChangeset for help on using the changeset viewer.