merge from trunk(revision 23851:23864) to 1.4 branch

This commit is contained in:
Lars Kneschke 2007-05-14 20:43:23 +00:00
parent 01fb2ed1d6
commit 370bda650e
25 changed files with 123 additions and 68 deletions

View File

@ -157,8 +157,8 @@
$cont = array();
}
if (!is_numeric($c)) $c = boetemplate::chrs2num($c);
$col = $this->num2chrs($c-1); // $c-1 to get: 0:'@', 1:'A', ...
$col_ = $this->num2chrs($c_-1);
$col = boetemplate::num2chrs($c-1); // $c-1 to get: 0:'@', 1:'A', ...
$col_ = boetemplate::num2chrs($c_-1);
$row_cont = $cont[$row];
$col_row_cont = $cont[$col.$row];

View File

@ -164,7 +164,7 @@
}
if ($value['m'] && strchr($this->dateformat,'M') !== false)
{
static $month = array('','January','February','March','April','Mai','June','July','August','September','October','November','December');
static $month = array('','January','February','March','April','May','June','July','August','September','October','November','December');
static $substr;
if (is_null($substr)) $substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';
static $chars_shortcut;

View File

@ -320,7 +320,7 @@
$msg = $ok ? lang('Template saved') : lang('Error: while saving !!!');
if ($ok) unset($preserv['import']);
}
elseif (isset($_GET['name']) || isset($content['name']))
elseif (!$content['import_xml'] && (isset($_GET['name']) || isset($content['name'])))
{
if ($_GET['name'])
{

View File

@ -113,6 +113,7 @@
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
$extension_data['type'] = $type = $cell['type'];
$extension_data['needed'] = $cell['needed'];
$help = $cell['help'] ? ($value['help'] ? $value['help'] : $cell['help']) : lang('view this linked entry in its application');
if (($type == 'link-to' || $type == 'link-add') && ($cell['readonly'] || $readonlys))
@ -458,10 +459,20 @@
switch($extension_data['type'])
{
case 'link-entry':
if (!$value_in['id'] && $extension_data['needed'])
{
$tmpl->set_validation_error($name,lang('Field must not be empty !!!'),'');
return true;
}
$value = $extension_data['app'] ? $value_in['id'] : $value['app'].':'.$value_in['id'];
return !!$value_in['id'];
case 'link-apps':
if (!$value_in && $extension_data['needed'])
{
$tmpl->set_validation_error($name,lang('Field must not be empty !!!'),'');
return true;
}
$value = $value_in;
return !!$value;
}

View File

@ -346,10 +346,9 @@
$cell['name'] = $nextmatch->name;
}
// preset everything for the column selection
if (!$value['no_columnselection'])
if (!$value['no_columnselection'] && // fetching column-names & -labels from the template
$this->_cols_from_tpl($value['template'],$value['options-selectcols'],$name2col,$value['rows']))
{
// fetching column-names & -labels from the template
$this->_cols_from_tpl($value['template'],$value['options-selectcols'],$name2col,$value['rows']);
//_debug_array($name2col);
//_debug_array($value['options-selectcols']);
// getting the selected colums from the prefs (or if not set a given default or all)
@ -421,6 +420,7 @@
* @param array &$cols here we add the column-name/-label
* @param array &$name2col
* @param array $content nextmatch content, to be able to resolve labels with @name
* @return int columns found, count($cols)
*/
function _cols_from_tpl(&$tmpl,&$cols,&$name2col,&$content)
{
@ -429,7 +429,7 @@
$cols['__content__'] =& $content;
$tmpl->widget_tree_walk(array($this,'_cols_from_tpl_walker'),$cols);
unset($cols['__content__']);
$name2col = $cols['name2col'] ? $cols['name2col'] : array(); unset($cols['name2col']);
$name2col = is_array($cols['name2col']) ? $cols['name2col'] : array(); unset($cols['name2col']);
//_debug_array($cols);
foreach($cols as $name => $label)
{
@ -457,7 +457,8 @@
}
$cols[$name] = $label;
}
//_debug_array($cols);
//_debug_array($cols);
return count($cols);
}
/**

View File

@ -1174,16 +1174,16 @@
*
* @param string/array $func function to use or array($obj,'method')
* @param mixed &$extra extra parameter passed to function
* @param string $path='/' start-path
* @return mixed return-value of func or null if nothing returned at all
*/
function &widget_tree_walk($func,&$extra)
function &widget_tree_walk($func,&$extra,$path='/')
{
if (!is_callable($func))
{
echo "<p><b>boetemplate($this->name)::widget_tree_walk</b>(".print_r($func,true).", ".print_r($extra,true).", ".print_r($opts,true).") func is not callable !!!<br>".function_backtrace()."</p>";
return false;
}
$path = '/';
foreach($this->children as $c => $nul)
{
$child = &$this->children[$c];
@ -1304,7 +1304,7 @@
}
if (!is_object($widget['obj'])) break; // cant descent into template
$result =& $widget['obj']->widget_tree_walk($func,$extra);
$result =& $widget['obj']->widget_tree_walk($func,$extra,$path.'/');
break;
}
return $result;

View File

@ -428,7 +428,7 @@
*
* @param object &$etempl eTemplate object to set
* @param string $data the XML
* @param array/string array with names of imported templates or error-message
* @return array/string array with names of imported templates or error-message
*/
function import(&$etempl,$data)
{
@ -498,9 +498,8 @@
switch ($type)
{
case 'close':
if (!count($parents) || $parent['.is_root']) // templ import complet => save it
if (!count($parents)) // templ import complet => save it
{
unset($parent['.is_root']);
unset($parent); $parents = array();
$etempl->fix_old_template_format(); // set the depricated compat vars
// save tmpl to the cache, as the file may contain more then one tmpl
@ -525,7 +524,7 @@
{
$etempl->init($attr);
$etempl->children = array(); // init adds one grid by default
$parent = &$etempl->children;
$parent = &$etempl; // parent is the template-object itself!
}
if ($tag == 'grid')
{
@ -541,7 +540,6 @@
'rows' => 0,
'size' => $size,
);
if ($is_root) $grid['.is_root'] = true; // we need to remember we have no template as parent
soetemplate::add_child($parent,$grid);
$parents[count($parents)] = &$parent;
$parent = &$grid;

View File

@ -72,16 +72,19 @@ function activate_tab(tab,all_tabs,name)
// activate FCK in newly activated tab for Gecko browsers
if (!document.all)
{
var t = document.getElementById(tab);
var inputs = t.getElementsByTagName('input');
for (i = 0; i < inputs.length;i++) {
editor = FCKeditorAPI.GetInstance(inputs[i].name);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
editor.SwitchEditMode();
editor.SwitchEditMode();
break;
}
try {
var t = document.getElementById(tab);
var inputs = t.getElementsByTagName('input');
for (i = 0; i < inputs.length;i++) {
editor = FCKeditorAPI.GetInstance(inputs[i].name);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
editor.SwitchEditMode();
editor.SwitchEditMode();
break;
}
}
}
catch(e) { } // ignore the error if FCKeditorAPI is not loaded
}
if (name) {
set_element(document.eTemplate,name,tab);

View File

@ -1264,7 +1264,7 @@ class uiinfolog
$bodyAppend = $bofelamimail->wordwrap($value,75,"\n");
$message .= $bodyAppend;
}
}
}
if (is_array($attachments))
{
@ -1288,7 +1288,7 @@ class uiinfolog
$subject,
$message,
$attachments,
strtotime($headers->date)
strtotime($headers['DATE'])
));
}
$GLOBALS['egw']->common->egw_header();

View File

@ -124,7 +124,7 @@
'type' => 'check',
'label' => 'Should the calendar show custom types too',
'name' => 'cal_show_custom',
'help' => 'Do you want to see custome InfoLog types in the calendar?',
'help' => 'Do you want to see custom InfoLog types in the calendar?',
'xmlrpc' => True,
'admin' => False
);

View File

@ -94,7 +94,7 @@ description infolog de Beschreibung
determines the order the fields are displayed infolog de legt die Reihenfolge fest in der die Felder angezeigt werden
disables a status without deleting it infolog de deaktiviert einen Status ohne ihn zu löschen
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog de wollen Sie eine Bestätigung des Verantwortlichen bei: Annahme, Beendigung der Aufgabe oder bei beidem
do you want to see custome infolog types in the calendar? infolog de Wollen Sie benutzerdefinierte Typen auch im Kalender sehen?
do you want to see custom infolog types in the calendar? infolog de Wollen Sie benutzerdefinierte Typen auch im Kalender sehen?
don't show infolog infolog de InfoLog NICHT anzeigen
done infolog de erledigt
download infolog de Datei laden
@ -244,7 +244,7 @@ should infolog show subtasks, -calls or -notes in the normal view or not. you ca
should infolog show the links to other applications and/or the file-attachments in the infolog list (normal view when you enter infolog). infolog de Soll InfoLog die Verknüpfungen zu anderen Anwendungen und/oder die Datei-Anhänge in der InfoLog Liste (normale Ansicht wenn InfoLog aufgerufen wird) anzeigen.
should infolog show up on the main screen and with which filter. works only if you dont selected an application for the main screen (in your preferences). infolog de Soll InfoLog auf der Startseite angezeigt werden und mit welchem Filter. Funktioniert nur, wenn Sie keine (einzelne) Anwendung für die Startseite ausgewählt haben (in Ihren Einstellungen).
should infolog use full names (surname and familyname) or just the loginnames. infolog de Soll InfoLog den vollen Namen (Vor- und Familienname) oder nur die Benutzerkennung verwenden.
should the calendar show custom types too infolog de Soll der Kalender auch benutzerdefinierte Typen anzeiten
should the calendar show custom types too infolog de Soll der Kalender auch benutzerdefinierte Typen anzeigen
should the infolog list show a unique numerical id, which can be used eg. as ticket id. infolog de Soll die InfoLog Liste eine eindeutige Nummer anzeigen, die zB. als Ticketnummer verwendet werden kann.
should the infolog list show the column "last modified". infolog de Soll die InfoLog Liste die Spalte "Zuletzt geändert" anzeigen.
should the infolog list show the percent done only for status ongoing or two separate icons. infolog de Soll die InfoLog Liste Prozent erledigt nur für den Status "in Arbeit" anzeigen oder zwei separate Icons.

View File

@ -94,7 +94,7 @@ description infolog en Description
determines the order the fields are displayed infolog en determines the order the fields are displayed
disables a status without deleting it infolog en disables a status without deleting it
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog en do you want a confirmation of the responsible on: accepting, finishing the task or both
do you want to see custome infolog types in the calendar? infolog en Do you want to see custome InfoLog types in the calendar?
do you want to see custom infolog types in the calendar? infolog en Do you want to see custom InfoLog types in the calendar?
don't show infolog infolog en DON'T show InfoLog
done infolog en done
download infolog en Download

View File

@ -94,7 +94,7 @@ description infolog es-es Descripci
determines the order the fields are displayed infolog es-es determina el orden en el que se muestran los campos
disables a status without deleting it infolog es-es deshabilita un estado sin eliminarlo
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog es-es ¿Desea una confirmación del responsable al aceptar, terminar la tarea, o ambos?
do you want to see custome infolog types in the calendar? infolog es-es ¿Desea ver los tipos de tareas personalizadas en el calendario?
do you want to see custom infolog types in the calendar? infolog es-es ¿Desea ver los tipos de tareas personalizadas en el calendario?
don't show infolog infolog es-es NO mostrar el Registro de notas y tareas
done infolog es-es hecho
download infolog es-es Descargar

View File

@ -88,7 +88,7 @@ deletes this field infolog fi poistaa t
deletes this status infolog fi poista tämä tila
description infolog fi Kuvaus
disables a status without deleting it infolog fi estä tila poistamatta sitä
do you want to see custome infolog types in the calendar? infolog fi Haluatko nähdä muokatut InfoLog merkinnän muodot kalenterissa?
do you want to see custom infolog types in the calendar? infolog fi Haluatko nähdä muokatut InfoLog merkinnän muodot kalenterissa?
don't show infolog infolog fi ÄLÄ näytä InfoLogissa
done infolog fi valmis
download infolog fi Lataa

View File

@ -94,7 +94,7 @@ description infolog fr Description
determines the order the fields are displayed infolog fr détermine l´ordre d´affichage des champs
disables a status without deleting it infolog fr désactive un statut sans le supprimer
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog fr Voulez-vous une confirmation du responsable sur: accepter, finir la tâche, ou les deux
do you want to see custome infolog types in the calendar? infolog fr Voulez-vous voir les types d'InfoLog personnalisé dans le calendrier?
do you want to see custom infolog types in the calendar? infolog fr Voulez-vous voir les types d'InfoLog personnalisé dans le calendrier?
don't show infolog infolog fr NE PAS afficher InfoLog
done infolog fr Fait
download infolog fr Télécharger

View File

@ -94,7 +94,7 @@ description infolog it Descrizione
determines the order the fields are displayed infolog it determina l'ordine di visualizzazone dei campi
disables a status without deleting it infolog it disabilita lo stato senza cancellarlo
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog it vuoi una conferma dal responsabile su: accettazione, completamento dei ToDo o entrambe
do you want to see custome infolog types in the calendar? infolog it Vuoi vedere tipi Attività personalizzati in agenda?
do you want to see custom infolog types in the calendar? infolog it Vuoi vedere tipi Attività personalizzati in agenda?
don't show infolog infolog it NON mostrare Attività
done infolog it eseguita
download infolog it Download

View File

@ -94,7 +94,7 @@ description infolog nl Beschrijving
determines the order the fields are displayed infolog nl bepaald hoe de volgorde van de velden wordt weergegeven
disables a status without deleting it infolog nl deactiveerd een status zonder het te verwijderen
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog nl Wilt een een bevestiging van de verantwoordelijke voor accepteren, voor beëindigen, of voor beide
do you want to see custome infolog types in the calendar? infolog nl Wilt u aangepaste InfoLog types in de agenda weergeven?
do you want to see custom infolog types in the calendar? infolog nl Wilt u aangepaste InfoLog types in de agenda weergeven?
don't show infolog infolog nl InfoLog NIET weergeven
done infolog nl gereed
download infolog nl Downloaden

View File

@ -94,7 +94,7 @@ description infolog pt-br Descri
determines the order the fields are displayed infolog pt-br determine a ordem em que os campos aparecerão
disables a status without deleting it infolog pt-br desabilitar o status após a remoção
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog pt-br você quer uma confirmação do responsável quanto à: aceitação, encerramento ou ambos
do you want to see custome infolog types in the calendar? infolog pt-br Você deseja exibir tipos de tarefas personalizadas na Agenda de Eventos ?
do you want to see custom infolog types in the calendar? infolog pt-br Você deseja exibir tipos de tarefas personalizadas na Agenda de Eventos ?
don't show infolog infolog pt-br Não exibir Tarefas
done infolog pt-br Encerrado
download infolog pt-br Baixar

View File

@ -94,7 +94,7 @@ description infolog sk Opis
determines the order the fields are displayed infolog sk Urèuje poradie v akom sa polo¾ky zobrazujú
disables a status without deleting it infolog sk Zablokuje stav bez toho, aby sa zmazal
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog sk vy¾adujete potvrdenie zodpovedného k: prijatiu, ukonèeniu úlohy alebo oboje
do you want to see custome infolog types in the calendar? infolog sk ®eláte si zobrazova» vlastné typy Záznamníka v Kalendári?
do you want to see custom infolog types in the calendar? infolog sk ®eláte si zobrazova» vlastné typy Záznamníka v Kalendári?
don't show infolog infolog sk NEzobrazova» Záznamník
done infolog sk Hotovo
download infolog sk Stiahnu»

View File

@ -94,7 +94,7 @@ description infolog sl Opis
determines the order the fields are displayed infolog sl ugotovi vrstni red polj, ki so prikazana
disables a status without deleting it infolog sl Onemogoči status brez brisanja
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog sl Ali želite potrdilo odgovornosti za: sprejemanje, končanje naloge ali oboje?
do you want to see custome infolog types in the calendar? infolog sl Želite videti vrste po meri InfoDnevnika v koledarju?
do you want to see custom infolog types in the calendar? infolog sl Želite videti vrste po meri InfoDnevnika v koledarju?
don't show infolog infolog sl Ne prikaži InfoDnevnika
done infolog sl Končano
download infolog sl Prenos

View File

@ -94,7 +94,7 @@ description infolog sv Beskrivning
determines the order the fields are displayed infolog sv Bestämmer i vilken ordning fält ska visas
disables a status without deleting it infolog sv Inaktivera status utan att radera
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog sv Vill du få bekräftelse från ansvarig angående acceptering, avslut eller båda?
do you want to see custome infolog types in the calendar? infolog sv Vill du se anpassade InfoLogg typer i kalendern?
do you want to see custom infolog types in the calendar? infolog sv Vill du se anpassade InfoLogg typer i kalendern?
don't show infolog infolog sv Visa INTE InfoLogg
done infolog sv Färdig
download infolog sv Ladda ner

View File

@ -94,7 +94,7 @@ description infolog zh-tw 描述
determines the order the fields are displayed infolog zh-tw 決定顯示的順序與欄位
disables a status without deleting it infolog zh-tw 停用一個狀態而不是刪除
do you want a confirmation of the responsible on: accepting, finishing the task or both infolog zh-tw 您希望做再次的確認在:同意,工作完成或是兩者都要
do you want to see custome infolog types in the calendar? infolog zh-tw 您是否希望在行事曆中檢視記事本的類型?
do you want to see custom infolog types in the calendar? infolog zh-tw 您是否希望在行事曆中檢視記事本的類型?
don't show infolog infolog zh-tw 不要顯示記事本
done infolog zh-tw 完成
download infolog zh-tw 下載

View File

@ -210,18 +210,21 @@ class ADODB2_postgres extends ADODB_DataDict {
{
if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds);
$copyflds = array();
foreach($this->MetaColumns($tabname) as $fld) {
foreach(($meta=$this->MetaColumns($tabname)) as $fld) {
if (!$dropflds || !in_array($fld->name,$dropflds)) {
// we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one
if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) &&
in_array($fld->type,array('varchar','char','text','bytea'))) {
$copyflds[] = "to_number($fld->name,'S9999999999999D99')";
} elseif (preg_match('/'.$fld->name.' ([\w]+)/i',$tableflds,$matches) &&
strtoupper($fld->type) != ($type = $this->ActualType($matches[1]))) {
$copyflds[] = "CAST($fld->name AS $type)";
} else {
$copyflds[] = $fld->name;
}
// identify the sequence name and the fld its on
if ($fld->primary_key && $fld->has_default &&
preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) {
preg_match("/nextval\('([^']+)'::(text|regclass)\)/",$fld->default_value,$matches)) {
$seq_name = $matches[1];
$seq_fld = $fld->name;
}

View File

@ -165,7 +165,7 @@ a different OID if a database must be reloaded. */
$cols = $this->MetaColumns($table);
$fld = $cols[strtoupper($column)];
if ($fld->primary_key && $fld->has_default &&
preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) {
preg_match("/nextval\('([^']+)'::(text|regclass)\)/",$fld->default_value,$matches)) {
$ret = $this->GetOne($sql='SELECT currval('.$this->qstr($matches[1]).')');
}
}

View File

@ -32,46 +32,66 @@
*/
var $m_oTranslator;
/**
* @var egw_db-object $m_odb db-object
* egw_db-object
*
* @var egw_db
*/
var $m_odb;
/**
* @var adodb-object $adodb reference to the global ADOdb object
* reference to the global ADOdb object
*
* @var ADOConnection
*/
var $adodb;
/**
* @var datadictionary-object $dict adodb's datadictionary object for the used db-type
* adodb's datadictionary object for the used db-type
*
* @var ADODB_DataDict
*/
var $dict;
/**
* @var $debug=0 0=Off, 1=some, eg. primary function calls, 2=lots incl. the SQL used
* Debuglevel: 0=Off, 1=some, eg. primary function calls, 2=lots incl. the SQL used
*
* @var int
*/
var $debug = 0;
/**
* @var array $max_index_length db => max. length of indexes pairs (if there is a considerable low limit for a db)
* Arry with db => max. length of indexes pairs (if there is a considerable low limit for a db)
*
* @var array
*/
var $max_index_length=array(
'sapdb' => 32,
'oracle' => 30,
);
/**
* @var string $sType type of the database, set by the the constructor
* type of the database, set by the the constructor: 'mysql','pgsql','mssql','sapdb'
*
* @var string
*/
var $sType;
/**
* @var int $max_varchar_length maximum length of a varchar column, everything above get converted to text
* maximum length of a varchar column, everything above get converted to text
*
* @var int
*/
var $max_varchar_length = 255;
/**
* @var string $system_charset system-charset if set
* system-charset if set
*
* @var string
*/
var $system_charset;
/**
* @var array $capabilities reference to the array of the db-class
* reference to the capabilities array of the db-class
*
* @var array
*/
var $capabilities;
/**
* @var int $pgsql_old_seq preserve value of old sequences in PostgreSQL
* preserve value of old sequences in PostgreSQL
*
* @var int
*/
var $pgsql_old_seq;
@ -80,6 +100,7 @@
*
* @param string $dbms type of the database: 'mysql','pgsql','mssql','sapdb'
* @param object $db=null database class, if null we use $GLOBALS['egw']->db
* @return schema_proc
*/
function schema_proc($dbms=False,$db=null)
{
@ -501,7 +522,7 @@
if (!is_array($options)) $options = $options ? array($options) : array();
if ($bUnique) $options[] = 'UNIQUE';
$aSql = $this->dict->CreateIndexSQL($name,$sTableName,$aColumnNames,$options);
$aSql = $this->dict->CreateIndexSQL($sIdxName,$sTableName,$aColumnNames,$options);
return $this->ExecuteSQLArray($aSql,2,'CreateIndexSQL(%1,%2,%3,%4) sql=%5',False,$name,$sTableName,$aColumnNames,$options,$aSql);
}
@ -518,6 +539,7 @@
if (is_array($aColumnNames))
{
$indexes = $this->dict->MetaIndexes($sTableName);
if ($indexes === False)
{
// if MetaIndexes is not availible for the DB, we try the name the index was created with
@ -605,12 +627,25 @@
elseif (isset($old_table_def['fd'][$name])) // existing column, use its value => column-name in query
{
$value = $name;
// this is eg. necessary to change a varchar into an int column under postgres
if ($this->sType == 'pgsql' &&
in_array($old_table_def['fd'][$name]['type'],array('char','varchar','text','blob')) &&
in_array($data['type'],array('int','decimal')))
if ($this->sType == 'pgsql') // some postgres specific code
{
$value = "to_number($name,'S9999999999999D99')";
// this is eg. necessary to change a varchar into an int column under postgres
if (in_array($old_table_def['fd'][$name]['type'],array('char','varchar','text','blob')) &&
in_array($data['type'],array('int','decimal')))
{
$value = "to_number($name,'S9999999999999D99')";
}
// blobs cant be casted to text
elseif($old_table_def['fd'][$name]['type'] == 'blob' && $data['type'] == 'text')
{
$value = "ENCODE($value,'escape')";
}
// cast everything which is a different type
elseif($old_table_def['fd'][$name]['type'] != $data['type'] && ($type_translated = $this->TranslateType($data['type'])))
{
$value = "CAST($value AS $type_translated)";
}
}
}
else // new column => use default value or NULL
@ -622,13 +657,13 @@
else
{
$value = $this->m_odb->quote(isset($data['default']) ? $data['default'] : '',$data['type']);
if ($this->sType == 'pgsql')
}
if ($this->sType == 'pgsql')
{
// fix for postgres error "no '<' operator for type 'unknown'"
if(($type_translated = $this->TranslateType($data['type'])))
{
// fix for postgres error "no '<' operator for type 'unknown'"
if(($type_translated = $this->TranslateType($data['type'])))
{
$value = "CAST($value AS $type_translated)";
}
$value = "CAST($value AS $type_translated)";
}
}
}
@ -1188,6 +1223,10 @@
}
if ($column->has_default)
{
if (preg_match("/^'(.*)'::.*$/",$column->default_value,$matches)) // postgres
{
$column->default_value = $matches[1];
}
$definition['fd'][$name]['default'] = $column->default_value;
}
if ($column->not_null)
@ -1234,7 +1273,7 @@
}
if ($this->debug > 2) $this->debug_message("schema_proc::GetTableDefintion: MetaIndexes(%1) = %2",False,$sTableName,$indexes);
if ($this->debug > 1) $this->debug_message("schema_proc::GetTableDefintion(%1) = %2",False,$sTableName,$definition);
return $definition;
}