mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 06:48:40 +01:00
Getting closer - still only giving debug output
This commit is contained in:
parent
3d06057c20
commit
16f18088d3
@ -26,6 +26,7 @@
|
|||||||
class import_conv
|
class import_conv
|
||||||
{
|
{
|
||||||
var $currentrecord = array(); //used for buffering to allow uid lines to go first
|
var $currentrecord = array(); //used for buffering to allow uid lines to go first
|
||||||
|
var $id;
|
||||||
|
|
||||||
var $import = array(
|
var $import = array(
|
||||||
"Title" => "title",
|
"Title" => "title",
|
||||||
@ -123,30 +124,29 @@
|
|||||||
|
|
||||||
//$contacts = CreateObject("phpgwapi.contacts");
|
//$contacts = CreateObject("phpgwapi.contacts");
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
while ( list($name,$value) = each($buffer) ) {
|
for ($i=0;$i<count($buffer);$i++) {
|
||||||
echo '<br>'.$name.' => '.$value;
|
while ( list($name,$value) = each($buffer[$i]) ) {
|
||||||
$i++;
|
echo '<br>'.$i.': '.$name.' => '.$value;
|
||||||
//$contacts->add($phpgw_info["user"]["account_id"],$entry);
|
//$contacts->add($phpgw_info["user"]["account_id"],$entry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return "Successfully imported $i records into your addressbook.";
|
return "Successfully imported $i records into your addressbook.";
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_start_record($buffer) {
|
function import_start_record($buffer) {
|
||||||
$top=array();
|
$top=array();
|
||||||
|
++$this->id;
|
||||||
$this->currentrecord = $top;
|
$this->currentrecord = $top;
|
||||||
return $buffer;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_end_record($buffer,$private="private") {
|
function import_end_record($buffer,$private="private") {
|
||||||
global $phpgw_info;
|
global $phpgw_info;
|
||||||
$namelist=array();
|
|
||||||
while ( list($name, $value) = each($this->currentrecord)) {
|
while ( list($name, $value) = each($this->currentrecord)) {
|
||||||
$namelist = $namelist + array($name => $value);
|
$buffer[$this->id][$name] = $value;
|
||||||
echo '<br>'.$name.' => '.$value;
|
//echo '<br>'.$name.' => '.$value;
|
||||||
}
|
}
|
||||||
echo '<br>';
|
|
||||||
$buffer = $buffer + $namelist;
|
|
||||||
return $buffer;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user