| 14 | | ----- |
| 15 | | # var $hasGenID = false; // Fix for PostNuke Pablo Roca / larsneo / Neo |
| 16 | | ----- |
| 17 | | # function GenID($seqname='adodbseq',$startID=1) |
| 18 | | # { |
| 19 | | # // post-nuke sets hasGenID to false |
| 20 | | # // if (!$this->hasGenID) return false; |
| 21 | | # // temporal fix proca |
| 22 | | # if (!$this->hasGenID) return 0; |
| 23 | | # |
| 24 | | # $getnext = sprintf($this->_genIDSQL,$seqname); |
| 25 | | # $rs = @$this->Execute($getnext); |
| 26 | | # if (!$rs) { |
| 27 | | # $u = strtoupper($seqname); |
| 28 | | # $this->Execute(sprintf($this->_genSeqSQL,$seqname)); |
| 29 | | # $this->Execute(sprintf($this->_genSeqzikula.orgame,$startID-1)); |
| 30 | | # $rs = $this->Execute($getnext); |
| 31 | | # } |
| 32 | | # $this->genID = mysql_insert_id($this->_connectionID); |
| 33 | | # |
| 34 | | # if ($rs) $rs->Close(); |
| 35 | | # |
| 36 | | # return $this->genID; |
| 37 | | # } |
| 38 | | ----- |
| | 9 | >> Changes in the Zikula Edition |
| 42 | | ----- |
| 43 | | # function _insertid($table,$column) |
| 44 | | # { |
| 45 | | # if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; |
| 46 | | # $oid = pg_getlastoid($this->_resultid); |
| 47 | | # // to really return the id, we need the table and column-name, else we can only return the oid != id |
| 48 | | # //return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); |
| 49 | | # return empty($table) || empty($column) ? $oid : $this->pg_insert_id($table, $column); |
| 50 | | # } |
| 51 | | ----- |
| | 23 | drivers/adodb-mysql.inc.php |
| | 24 | 31c31 |
| | 25 | < var $hasGenID = true; |
| | 26 | --- |
| | 27 | > var $hasGenID = false; // Fix for Zikula Pablo Roca / larsneo / Neo |
| | 28 | 207c207,209 |
| | 29 | < if (!$this->hasGenID) return false; |
| | 30 | --- |
| | 31 | > // if (!$this->hasGenID) return false; |
| | 32 | > // temporal fix proca |
| | 33 | > if (!$this->hasGenID) return 0; |
| 53 | | /adodb-datadict.inc.php |
| 54 | | # //echo "<h3>$this->alterCol cannot be changed to $flds currently</h3>"; |
| 55 | | larsneo@postnuke.com |
| | 35 | drivers/adodb-postgres64.inc.php |
| | 36 | 160c160,161 |
| | 37 | < return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); |
| | 38 | --- |
| | 39 | > //return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); |
| | 40 | > return empty($table) || empty($column) ? $oid : $this->pg_insert_id($table, $column); |
| | 41 | |
| | 42 | adodb-datadict.inc.php |
| | 43 | line 988: replace "#" by "//" to comment the echo: |
| | 44 | //echo "<h3>$this->alterCol cannot be changed to $flds currently</h3>"; |
| | 45 | |