Ignore:
Timestamp:
09/26/13 15:41:49 (11 years ago)
Author:
angelo
Message:

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/drivers/adodb-sqlite.inc.php

    r34 r8222  
    11<?php 
    22/* 
    3 V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. 
     3V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. 
    44  Released under both BSD license and Lesser GPL library license.  
    55  Whenever there is any discrepancy between the two licenses,  
     
    7979         
    8080        // mark newnham 
    81         function &MetaColumns($tab) 
     81        function MetaColumns($table, $normalize=true)  
    8282        { 
    8383          global $ADODB_FETCH_MODE; 
     
    8686          $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; 
    8787          if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); 
    88           $rs = $this->Execute("PRAGMA table_info('$tab')"); 
     88          $rs = $this->Execute("PRAGMA table_info('$table')"); 
    8989          if (isset($savem)) $this->SetFetchMode($savem); 
    9090          if (!$rs) { 
     
    105105            $fld->not_null = $r['notnull']; 
    106106            $fld->default_value = $r['dflt_value']; 
    107             $fld->scale = 0; 
     107            $fld->scale = 0;     
     108                if (isset($r['pk']) && $r['pk']) $fld->primary_key=1; 
    108109            if ($save == ADODB_FETCH_NUM) $arr[] = $fld;         
    109110            else $arr[strtoupper($fld->name)] = $fld; 
     
    191192        } 
    192193         
    193         function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)  
     194        function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)  
    194195        { 
    195196                $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; 
    196197                $limitStr  = ($nrows >= 0)  ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : ''); 
    197198                if ($secs2cache) 
    198                         $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); 
     199                        $rs = $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); 
    199200                else 
    200                         $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); 
     201                        $rs = $this->Execute($sql."$limitStr$offsetStr",$inputarr); 
    201202                         
    202203                return $rs; 
     
    262263        } 
    263264 
    264         function &MetaIndexes($table, $primary = FALSE, $owner=false) 
     265        function MetaIndexes($table, $primary = FALSE, $owner=false, $owner = false) 
    265266        { 
    266267                $false = false; 
     
    351352 
    352353 
    353         function &FetchField($fieldOffset = -1) 
     354        function FetchField($fieldOffset = -1) 
    354355        { 
    355356                $fld = new ADOFieldObject; 
Note: See TracChangeset for help on using the changeset viewer.