Import specific functions
phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 PGV Development Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Import specific functions
phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 PGV Development Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Accpet changed gedcom record into database
This function gets an updated record from the gedcom file and replaces it in the database
Add a new calculated name to the individual names table
this function will add a new name record for the given individual, this function is called from the importgedcom.php script stage 5
perform any database cleanup
during the import process it might be necessary to cleanup some database values. In index mode the file handles need to be closed. For database mode we probably don't need to do anything in this funciton.
Create the dates table
Create the families table
Create the individuals table
Create the media_mapping table
Create the media table
Create the names table
Create the nextid table
Create the other table
Create the placelinks table
Create the places table
Create the remotelinks table
Create the soundex table
Create the sources table
delete a gedcom from the database
deletes all of the imported data about a gedcom from the database
import record into database
this function will parse the given gedcom record and add it to the database
Insert media items into the database
This method is used in conjuction with the gedcom import/update routines
read the contents of a gedcom file
opens a gedcom file and reads the contents into the $fcontents global string
Create database schema
function that checks if the database exists and creates tables automatically handles version updates
parse out specific subrecords (NOTE, _PRIM, _THUM) from a given OBJE record
extract all date info from the given record and insert them
into the dates table
import media items from record
extract all places from the given record and insert them
into the places table
update a record in the database
Generates a Universally Unique IDentifier, version 4.
RFC 4122 (http://www.ietf.org/rfc/rfc4122.txt) defines a special type of Globally Unique IDentifiers (GUID), as well as several methods for producing them. One such method, described in section 4.4, is based on truly random or pseudo-random number generators, and is therefore implementable in a language like PHP.
We choose to produce pseudo-random numbers with the Mersenne Twister, and to always limit single generated numbers to 16 bits (ie. the decimal value 65535). That is because, even on 32-bit systems, PHP's RAND_MAX will often be the maximum *signed* value, with only the equivalent of 31 significant bits. Producing two 16-bit random numbers to make up a 32-bit one is less efficient, but guarantees that all 32 bits are random.
The algorithm for version 4 UUIDs (ie. those based on random number generators) states that all 128 bits separated into the various fields (32 bits, 16 bits, 16 bits, 8 bits and 8 bits, 48 bits) should be random, except : (a) the version number should be the last 4 bits in the 3rd field, and (b) bits 6 and 7 of the 4th field should be 01. We try to conform to that definition as efficiently as possible, generating smaller values where possible, and minimizing the number of base conversions.
Documentation generated on Wed, 28 Mar 2007 09:54:18 -0600 by phpDocumentor 1.3.1