Commit 332f2d9a6d4bf8c10433ae4260b63e829aa6b221

Authored by Edmar Moretti
1 parent eeb7a2a9

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 120 $novoshpf = ms_newShapefileObj($nomeshp, $tipol);
121 121 $novoshpf->free();
122 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 131 $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2);
126 132 $novoshpf->free();
127 133 if($tituloTema == "")
... ...