/[drupal]/contributions/modules/importexportapi/importexportapi.module
ViewVC logotype

Log of /contributions/modules/importexportapi/importexportapi.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Tag:

Revision 1.53.4.1 - (view) (download) (as text) (annotate) - [select for diffs]
Tue May 5 17:48:44 2009 UTC (6 months, 3 weeks ago) by earnie
Branch: DRUPAL-6--1
Changes since 1.53: +3 -6 lines
Diff to previous 1.53
#283462: Drupal 6.x starting point patch

Revision 1.53 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Feb 8 13:30:28 2007 UTC (2 years, 9 months ago) by douggreen
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, DRUPAL-5--1-1, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.52: +5 -5 lines
Diff to previous 1.52
#117064 from victorkane - D5 api changes

Revision 1.52 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Feb 7 13:19:13 2007 UTC (2 years, 9 months ago) by douggreen
Branch: MAIN
Changes since 1.51: +0 -2 lines
Diff to previous 1.51
minor D5 upgrades per coder and http://drupal.org/node/64279

Revision 1.51 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Feb 7 13:09:25 2007 UTC (2 years, 9 months ago) by douggreen
Branch: MAIN
Changes since 1.50: +7 -7 lines
Diff to previous 1.50
minor code style changes per coder and http://drupal.org/node/318
... (just dipping my toe into the waters of this module)

Revision 1.50 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Nov 8 05:18:44 2006 UTC (3 years ago) by jaza
Branch: MAIN
CVS Tags: DRUPAL-4-7--1-0
Branch point for: DRUPAL-4-7
Changes since 1.49: +5 -5 lines
Diff to previous 1.49
Fixed the process callback so that multiple callbacks do not overwrite each other's changes.

Revision 1.49 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Sep 9 06:43:08 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.48: +4 -3 lines
Diff to previous 1.48
- Removed a lot of 'undefined index' warnings. In particular, a line in
_importexportapi_set_def_values_recurse() was single-handedly causing
about 20 such errors for every request - now fixed.
- Introduced the 'abstract' property for entity fields, indicating
that such entities are to be used for referencing purposes only, not
for actual imports or exports. The 'node' entity is now 'abstract'. The
importexportui now checks the 'abstract' property when outputting the
list of entities to import or export (formerly, the 'node' entity was a
hard-coded exception).
- Introduced the 'abstract_parent' property for non-entity fields,
indicating the abstract entity to which that field is tied. Changed the
alternate key system, so that when generating the put map, all fields
with an 'abstract_parent' are recorded based on this name, rather than
on their parent entity's name.
- Changed 'comment' to 'body' in the comment definition (was conflicting
with the name of the entity, causing massive problems for MiniXML).
- Added a 'process' callback for taxonomy term entities, to generate a
parent '0' for imported terms with no parent defined.
- All this means that node / comment / vocab / term import is now
working MUCH better! w00t!

Revision 1.48 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Sep 8 14:35:47 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.47: +2 -0 lines
Diff to previous 1.47
- Import of entities with references to themselves (i.e. hierarchical
entities, e.g. book pages, taxonomy terms) is now working much better,
but is still a bit buggy.

Revision 1.47 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Sep 8 10:34:35 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.46: +1 -1 lines
Diff to previous 1.46
more bug fixes for referencing.

Revision 1.46 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Sep 8 09:55:33 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.45: +3 -1 lines
Diff to previous 1.45
- Fixed up the 'db' 'get' engine, so that entities with references to
themselves (i.e. hierarchical entities, e.g. book pages, taxonomy terms)
get those reference fields exported properly.

Revision 1.45 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Sep 6 03:32:10 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.44: +32 -19 lines
Diff to previous 1.44
improved alternate key handling.

Revision 1.44 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Aug 31 14:31:47 2006 UTC (3 years, 2 months ago) by jaza
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43
- Did some serious bug fixing of the 'db' 'put' engine. The import
system is now working MUCH more reliably!
- Importing users now works bug-free, and node import works almost
bug-free, as far as my latest tests showed (still some bugs with
hierarchical data, e.g. taxonomy terms, comments).
- Updated node test data files.

Revision 1.43 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 29 17:10:19 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.42: +37 -15 lines
Diff to previous 1.42
- Modified hook_engines_get_put() - ENGINES can now specify some default
'process' callbacks, which are executed on an entire set of data BEFORE
field-specific process callbacks are executed.
- Changed the default parameters of the 'process' callback, to include
the new 'source_get' parameter, which allows 'put' callbacks to work
out the 'get' engine that was used to retrieve the data that they're
dealing with.
- Modified all existing 'process' callback implementations to use the
new parameter format.
- the importexportapi_db_put_resolve_alternate_keys() function is now a
'process' callback of 'db' 'put', instead of being called by the
importexportapi_db_put() function. This means that alternate keys now
get resolved BEFORE field-specific 'db' 'put' 'process' callbacks are
executed, which fixes a problem that I was having with user profile
fields not getting processed properly on import.
- Import is now working much better, but is still quite buggy (compared
with export, which is quite reliable). Need to do some more work on the
'db' 'put' engine.

Revision 1.42 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 29 05:08:43 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.41: +2 -0 lines
Diff to previous 1.41
- Added a new field type called 'datetime', and created a 'process'
callback for datetime that converts timestamps to string representations
and vice versa.
- Changed all timestamp fields from type 'int' to type 'datetime'.

Revision 1.41 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 29 04:33:45 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.40: +3 -4 lines
Diff to previous 1.40
- Fixed some more referencing bugs in the 'db' 'get' engine.
- Added a new 'type' parameter to importexportapi_node_get_def(), so
that reference fields can be set to specifically reference a particular
node type, rather than just referencing the base 'node' entity.
- Added a new 'type' parameter to hook_node_def_alter(), so that
modules implementing this hook can reference specific node types, rather
than just referencing the base 'node' entity.
- Changed the node definitions to work with this new system. The result
is that some referencing problems with nodes have now been fixed.

Revision 1.40 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Aug 19 15:58:53 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.39: +1 -21 lines
Diff to previous 1.39
- Changed hook_def_tables() to be hook_db_def_tables(), as it is
actually db-specific, and should be named accordingly.
- Renamed importexportapi_get_def_tables() to
importexportapi_db_get_def_tables(), and moved it from
importexportapi.module to importexportapi_db.inc.

Revision 1.39 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Aug 17 15:35:37 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.38: +27 -25 lines
Diff to previous 1.38
- #79091: likely fix for the 'invalid foreach argument' error reported
here (untested - could not verify this bug).

Revision 1.38 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 15 17:13:11 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.37: +42 -5 lines
Diff to previous 1.37
- Added a new field type called 'serialized', to handle data that is
stored in the DB as serialized PHP (now gets outputted as a tree when
using XML export - still gets outputted as-is for CSV export).
- Added a new callback called 'build_alt_key', for any additional
building that needs to happen to generated fields after they're
generated. Is implemented by the XML put/get engine.
- Fixed numerous bugs with alternate key handling, ID handling, and
DB 'put' query handling.
- Disabled the 'autoescape_entities' setting in MiniXML - it was
passing all XML elements through htmlentities(), which was mangling
the outputted data.
- Updated the test data, and added some variables in an XML file.
- Did plenty of testing of both export and import using the new UI:
not yet perfect, but it's looking very good!
- This project is now officially BETA. Testers are most welcome! There
has never been a better time to download this package and give it a
spin.

Revision 1.37 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 15 06:31:37 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.36: +28 -1 lines
Diff to previous 1.36
- Completed the UI for assigning custom mappings to field names.
- The export UI is now fully functional. It's as easy as can be to
export any entities as XML or CSV!
- Implemented a replacement array_merge_recursive() function in the
main module - _importexportapi_set_def_values() was having problems
before.

Revision 1.36 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Aug 14 15:54:54 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.35: +5 -73 lines
Diff to previous 1.35
- Deleted all UI cruft from the main module.
- Wrote the first version of the 'importexportui' module. Currently lets you
select what entities to import/export, and in what format. Mapping support
still needs to be implemented.
- Updated node type definitions to properly define titles.
- Updated the 'get' and 'put' engines to have titles.

Revision 1.35 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Aug 12 09:17:10 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.34: +102 -75 lines
Diff to previous 1.34
- Moved the definition building code out of importexportapi_get_data(),
and into the new importexportapi_build_def() function. This function
can now be called automatically through importexportapi_get_def(), which
has an optional 'build' parameter (defaults to FALSE).
- A built definition can now be passed in to importexportapi_get_data()
(if none is provided, then importexportapi_get_def() is called to
provide one).
- Moved _importexportapi_include_minixml() to the importexportapi_xml.inc
file.

Revision 1.34 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Aug 12 08:00:06 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.33: +1 -1 lines
Diff to previous 1.33
- Added data definitions for CCK fields, and for CCK types / field
instances.
- Added support for dynamically generating data definitions for CCK
node types! Yay - it is now possible to export CCK nodes!
- Added the new hook_content_def_references(), to allow the
nodereference and userreference modules in CCK to alter the definitions
for each field instance, and to add referencing info if necessary. If
any additional CCK reference fields are written in the future (e.g.
commentreference, termreference), supporting them properly in the API
will be very easy.
- Made nested arrays work again. I thought that the whole recursive
logic in the 'db' 'get' engine was somehow flawed - but in the end,
it turned out to be a minor 1-line bug. Phew! :P

Revision 1.33 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Aug 9 02:30:30 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.32: +1 -1 lines
Diff to previous 1.32
- Added definitions for:
  - blocks
  - files / file revisions
  - url aliases
  - variables

Revision 1.32 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 8 13:47:34 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.31: +4 -3 lines
Diff to previous 1.31
- Added forum and poll node type definitions.
- More bug fixes in the engines here and there.

Revision 1.31 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 8 07:59:21 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.30: +9 -6 lines
Diff to previous 1.30
- Added taxonomy vocab and term definitions.
- Fixed a problem with the alternate key generation system.
- Fixed up the XML parser a bit.

Revision 1.30 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 8 05:16:05 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.29: +1 -1 lines
Diff to previous 1.29
- Added very basic support for custom filtering in 'db' 'get' queries.
- Added the story node type definition.
- Implemented filtering based on the 'type' field for page and story.

Revision 1.29 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Aug 7 16:01:07 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.28: +7 -4 lines
Diff to previous 1.28
- The core node definition is now complete! This definition should be
used for referencing core fields, but should not be used directly in a
'get' or 'put' operation (use the definitions for actual node types
instead).
- It is possible to export nodes as XML! (nothing else tested as yet).
- The core node definition can be gotten with the
importexportapi_node_get_def() function. This function also invokes the
new hook_def_node_alter(), which is used instead of hook_def_alter()
for altering the core node definition, before it is borrowed by modules
that implement node types.
- New definitions for comment, filter, and statistics, to fully support
the core node type definition.
- Page module is the first module to implement the core node definition
in a node type definition (page module doesn't extend or modify it at
all, although other modules will).
- Improvements to the 'db' 'get' engine - mainly concerning references.

Revision 1.28 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Aug 5 14:10:15 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.27: +4 -1 lines
Diff to previous 1.27
- The 'csv' 'get' engine is complete! A full CSV import has now been
tested and verified to be working very nicely.
- Wrote a 'key matching' function for the 'csv' 'get' engine, which
matches nested fields based on matching reference values. This is
needed for CSV, because unlike XML, the data is provided in flat
format, and so we have to match parent fields to child fields manually
during import.
- Added some more CSV test data files.
- Improved the comments in a few of the engines.

Revision 1.27 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 1 14:12:06 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.26: +6 -2 lines
Diff to previous 1.26
- Started work on the 'csv' 'get' engine. Warning: not yet complete!
Still needs a lot of love - only half-ported from 'xml' 'get' ATM.
- Put in some test data for CSV.

Revision 1.26 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Aug 1 08:12:08 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.25: +16 -0 lines
Diff to previous 1.25
- Wrote the 'csv' 'put' engine. CSV export is now possible!
- Modified importexportapi_export_page() to support the return format
of the 'csv' 'put' engine (i.e. an array of 'title' => 'value' CSV
strings).
- Changed the 'process' callback for freeforms so it doesn't interfere
with the 'csv' 'put' engine.

Revision 1.25 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Jul 31 16:38:52 2006 UTC (3 years, 3 months ago) by jaza
Branch: MAIN
Changes since 1.24: +23 -16 lines
Diff to previous 1.24
- Made 'freeform' a field defined by the main module.
- Moved 'process' callbacks for the 'array' and 'freeform' fields into
their own files, in the new 'fields' directory. Wrote some include code
for this.

Revision 1.24 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jul 29 05:40:15 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.23: +4 -1 lines
Diff to previous 1.23
- Alternate key resolving now works for reference fields as well as key fields. Yay!
- General improvements to the alternate key and the ID generation systems in the 'db' 'put' engine.

Revision 1.23 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Jul 28 16:07:12 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.22: +40 -339 lines
Diff to previous 1.22
- Implemented alternate key resolving within the 'db' 'put' engine. If actual keys are not provided, the engine will now attempt to resolve alternate keys to existing actual keys. Very cool stuff!
- Cleaned up and generally improved the ID generation system in the 'db' 'put' engine. This now happens in its own separate function, and ties in properly with alternate key resolving, and with the 'put map' system.
- Moved test data into its own external files, in the new 'testdata' dir.
- Moved the type casting function into the main module file (used by multiple engines now).
- Added the 'key_component' attribute for regular fields, and the 'keys' attribute for entity and array fields. The 'primary key' of an entity or array now consists of all the values within it, that are either 'key' or 'key_component' values.
- Fixed up the 'update_existing' logic in 'db' 'put' to work with the new 'keys' system.
- Fixed up freeform fields to work on profile field IDs, instead of profile field names.
- Import is now working better than ever - woohoo!

Revision 1.22 - (view) (download) (as text) (annotate) - [select for diffs]
Tue Jul 25 03:05:13 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.21: +13 -49 lines
Diff to previous 1.21
- The ID key handling system is now complete! Not yet guaranteed to be
working perfectly, but it does a pretty good job. ID mappings that are
created during 'put' operations now get saved permanently to the
database. Reference fields have their values updated to reflect these
mappings.

Revision 1.21 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jul 15 11:31:05 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.20: +0 -0 lines
Diff to previous 1.20
- Implemented a fair bit of the logic needed in the ID generation
system, which makes up a very important part of the overall reference
handling system.
- Documented the decision logic for ID generation on the Wiki.

Revision 1.20 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jul 15 04:53:47 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.19: +39 -18 lines
Diff to previous 1.19
- Began working on the ID key generation system, within the 'db' 'put'
engine.
- Changed the handling of the 'process' callback a bit (again).
- Improved reference key handling a bit, particularly in the XML
engines.

Revision 1.19 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Jul 14 16:25:50 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.18: +99 -150 lines
Diff to previous 1.18
- Got rid of the importexportapi_import_data() and
importexportapi_export_data() functions, which were extremely similar,
and which had lots of duplicate code.
- Wrote the importexportapi_get_data() and importexportapi_put_data()
functions to replace them. The new system is much cleaner and more
flexible, and kind of makes more sense.
- Moved the shared 'build' callbacks for the 'db' and the 'xml' 'get'
and 'put' engines into separate files.
- Re-implemented custom arguments for 'build' callbacks.
- Made all attributes that are added by the 'build' callbacks
sub-attributes of the 'get' and 'put' attributes. Big change, lots of
little code changes all over the place - but seems to be working
bug-free at the moment.
- Changed importexportapi_get_engine() to importexportapi_get_engines(),
and added support for returning all engines of all types.

Revision 1.18 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Jul 13 05:54:41 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.17: +151 -51 lines
Diff to previous 1.17
- Wrote an entity dependency checker, to determine dependencies based on references to fields in other entities, and to re-arrange the list of entities according to dependency.
- Implemented the dependency checker within the definition building system.
- Changed the import and export routines to run through the entities in dependency order, rather than in user-specified order.

Revision 1.17 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Jul 12 14:43:24 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16
- Began fixing the 'db' 'put' engine to properly support entities whose
flat fields are spread over multiple tables.
- minor cleanup here and there.

Revision 1.16 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Jul 12 08:03:54 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.15: +66 -15 lines
Diff to previous 1.15
- Improved the 'process' callback, to cater to different processing
routines for any combination of 'get' and 'put' engines.
- Introduced 'reverse process' implementation for 'freeform' field
types.
- Fixed up the referencing for 1-1 related data a bit more.
- Improved handling of freeform fields by the 'xml' 'get' engine.

Revision 1.15 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Jul 12 04:28:41 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.14: +40 -31 lines
Diff to previous 1.14
- Made the alternate key field generation happen after the 'get' and
'put' engines have built the definitions. This allows things such as DB
fields to be included in the automatic generation (db references, for
example, previously had to be defined explicitly in the definitions).
- Improved the DB reference handling system. It is now possible to
specify 1-1 references within a single query, rather than only 1-M
references within a child array query.

Revision 1.14 - (view) (download) (as text) (annotate) - [select for diffs]
Sun Jul 2 12:31:38 2006 UTC (3 years, 4 months ago) by jaza
Branch: MAIN
Changes since 1.13: +292 -261 lines
Diff to previous 1.13
- The 'db' 'put' engine is now working at a very basic level. The API is
now able to successfully insert data into the DB! Yay!
- Warning: accessing the 'import' page at the moment WILL cause SQL
INSERT queries to execute.
- Major todo items for the 'db' 'put' engine: alternate key handling
(alternate keys are currently ignored entirely); system for setting the
'insert mode' for each entity (i.e. 'ignore if key already exists' or
'regenerate if key already exists'); put map handling (to go with the
'insert mode' handling, and to handle regenerated keys); dependency
system for entities (i.e. 'user' depends on 'role', 'profile_field', etc
- so dependent entities will be handled first by the 'put' engine).

Revision 1.13 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Jun 26 13:18:37 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.12: +317 -206 lines
Diff to previous 1.12
Fixed up the import system so that it works with the get and put API, and with the new definition system (similarly to the export system changes). Also fixed up the XML get engine to work with recent updates. XML can now be 'gotten' into a structured array - next step is to put that array data somewhere. DB put engine work is still in progress.

Revision 1.12 - (view) (download) (as text) (annotate) - [select for diffs]
Sun Jun 25 16:00:20 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.11: +149 -227 lines
Diff to previous 1.11
- Major overhaul of the definition building system. What was once importexportapi_get_def() is now importexportapi_set_def() - a powerful function that can generate the complete definition library, AND modify the definition for any field at any time. The new importexportapi_get_def() is just a wrapper around the new function.
- Overhaul of the engine definition system. hook_engines_get() and hook_engines_put() are now merged into hook_engines_get_put(). The 'build' callback has been removed from hook_field_types(), and is now defined per-engine, through hook_engines_get_put(). This means that definitions can now be built specifically for each engine - i.e. the DB engines handle DB-specific attributes such as 'db_table', and the text output engines handle their specific attributes such as 'mapping'. This is much cleaner than the old system, where attributes for all engines were always all defined per-field type.
- It is now possible to export multiple types of entities at once. importexportapi_export_entity() is now importexportapi_export_data() - it is able to build the complete definition library, for fields to have at their disposal (for referencing purposes), and to then selectively build specified entities within that library.
- Support for alternate key fields. If a field has its 'alt_key_for' attribute defined, then that field will get copied and re-generated alongside other fields that reference its master key. This automatic copying / generation means that the definition doesn't have to define as much - some fields can be 'inferred'.
- Started work on the import system. The 'xml' 'get' engine was working before the definitions overhaul, but is probably broken at present. The 'db' 'put' engine is still highly experimental at this stage. The import system itself needs to be updated to work with the new definition and engine system.

Revision 1.11 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jun 24 18:34:35 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.10: +662 -254 lines
Diff to previous 1.10
A great many changes have been made to the API, but these changes are still very much in progress. Just for a change, this is a very brief log message =). A full account of the changes will be made when they're complete, and the module is stable and working again.

Revision 1.10 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Jun 19 12:45:42 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.9: +275 -448 lines
Diff to previous 1.9
Oops - missed main module file in last commit. See log message in last commit for details.

Revision 1.9 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Jun 16 14:56:22 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.8: +225 -137 lines
Diff to previous 1.8
- Finished off the last outstanding things for nested arrays (i.e. recursive calling of the 'process' hook, recursive removal of dead array elements, and recursive behaviour in the XML export engine). The API now fully supports exporting data from a definition with nested arrays! Yay!
- Since I couldn't find any examples of structures in Drupal core that require a nested array implementation, I wrote a module called 'locdata', specifically to test nested arrays (currently not committed to CVS anywhere). Tests had good results.
- Fixed issues with non-zero-based arrays getting passed to the export engine. It seems that MiniXML can only handle zero-based arrays, so all arrays are now in this format.
- Updated doxygen comments and inline comments for the API.

Revision 1.8 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Jun 15 13:36:32 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.7: +166 -93 lines
Diff to previous 1.7
- Implemented much of the code needed to support nested array fields. The importexportapi_get_db_data() function (and its helpers) now fully support nested array fields.
- This work has involved concentrating on 3 things: recursion, recursion, and more recursion! The new nested array support has required writing some darn complicated recursive functions. Very fun to write, but also very challenging.
- Todo: implement nested array support for the 'process' hook, and for the XML export engine.

Revision 1.7 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Jun 9 16:43:27 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.6: +67 -13 lines
Diff to previous 1.6
- Committed the MiniXML 3rd party library to the module's directory. This library is 100% GPL, and has had small modifications made to it, which are documented in the 'hacks.txt.php' file in the 'minixml' dir. I think that the library is small enough and stable enough to qualify bundling it with the module.
- Wrote the XML export engine, which relies heavily on MiniXML.
- Added some attributes to fields in the data definitions, such as 'plural' for outputting arrays and entities in XML.
- Required value now getting set again for profile fields, due to a new second callback for profile fields.

Revision 1.6 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Jun 9 08:49:27 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.5: +137 -16 lines
Diff to previous 1.5
- Added hook_export_engines(). The importexportapi module implements this hook by defining two export engines (xml and csv), and their callbacks.
- Wrote user profile info definitions.
- Added a new type 'freeform', to cater to the freeform list profile type.
- Added a 'process' callback for definition fields, to process values just after they get taken from the DB (for export), or just before they get put into the DB (for import). Profile 'value' fields use this callback to transform freeform text into an array.
- Made some fairly involved changes to importexportapi_db_get_data() and its helper function, to fix up the referencing system, so that tables other than the primary table get added to the query as a join, if there are fields to be selected from them; and so that joins get properly made using referenced fields.
- Added the importexportapi_xml_export() function, which will act as the XML export engine (the plan is to utilise the miniXML library for this). The engine is just a stub at this point.

Revision 1.5 - (view) (download) (as text) (annotate) - [select for diffs]
Thu Jun 8 12:36:58 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.4: +53 -57 lines
Diff to previous 1.4
- Removed hook_def_field_placeholders(). Instead, hook_def_field_types() has an 'op' parameter, which can be either 'defaults' (covers old behaviour of returning default values for specifed field type), or 'placeholders' (returns placeholder of specified field type).
- importexportapi_db_get_data() now returns array children within the 'value' attribute of the array field. This means that not only are array child values stored in 'value', but the full structure of the child fields also. This is paving the way for nested array fields.

Revision 1.4 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Jun 5 08:07:48 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.3: +159 -15 lines
Diff to previous 1.3
- The importexportapi_get_db_data() function is now able to query the database based on a given definition, and return the results.

Revision 1.3 - (view) (download) (as text) (annotate) - [select for diffs]
Sun Jun 4 15:26:50 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.2: +158 -11 lines
Diff to previous 1.2
- Wrote the _importexportapi_get_db_data() function, which converts a data definition into an array representation of a set of queries.
- Fixed up a few things in the data definitions, and in the building of the definitions, to make this work.
- Next step is to actually generate some queries to do a data export.

Revision 1.2 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jun 3 17:14:53 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
Changes since 1.1: +67 -15 lines
Diff to previous 1.1
Created a 'build' system, to build a processed data definition array of an entity and its fields. Doesn't yet actually get utilised for getting data from the DB, or putting data into the DB.

Revision 1.1 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Jun 3 14:00:44 2006 UTC (3 years, 5 months ago) by jaza
Branch: MAIN
- Introduced hook_data_definition() and hook_data_definition_alter().
- The data definition for the core user entity is now complete (except for profile module fields). Next step is to develop the parts necessary to export and import users.
- Work has begun on the module itself, which so far can retrieve a definition for a specified entity, and can get the default attributes for a specified field type.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.2