Commit 332f2d9a6d4bf8c10433ae4260b63e829aa6b221
1 parent
eeb7a2a9
Exists in
master
and in
7 other branches
Permite usar a extensão "dbase" do PHP ao invés do "xbase". O "xbase" gera arqui…
…vos dbf incompatíveis com o gvSIG.
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
classesphp/classe_shp.php
@@ -120,8 +120,14 @@ Nome do tema criado. | @@ -120,8 +120,14 @@ Nome do tema criado. | ||
120 | $novoshpf = ms_newShapefileObj($nomeshp, $tipol); | 120 | $novoshpf = ms_newShapefileObj($nomeshp, $tipol); |
121 | $novoshpf->free(); | 121 | $novoshpf->free(); |
122 | $def[] = array("ID","C","50"); | 122 | $def[] = array("ID","C","50"); |
123 | - $db = xbase_create($nomeshp.".dbf", $def); | ||
124 | - xbase_close($db); | 123 | + if(!function_exists("dbase_create")){ |
124 | + $db = xbase_create($nomeshp.".dbf", $def); | ||
125 | + xbase_close($db); | ||
126 | + } | ||
127 | + else{ | ||
128 | + $db = dbase_create($nomeshp.".dbf", $def); | ||
129 | + dbase_close($db); | ||
130 | + } | ||
125 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); | 131 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
126 | $novoshpf->free(); | 132 | $novoshpf->free(); |
127 | if($tituloTema == "") | 133 | if($tituloTema == "") |