diff options
Diffstat (limited to 'engine/lib/export.php')
-rw-r--r-- | engine/lib/export.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/export.php b/engine/lib/export.php index 4953fab91..b0d7ae3a5 100644 --- a/engine/lib/export.php +++ b/engine/lib/export.php @@ -198,6 +198,8 @@ $IMPORTED_OBJECT_COUNTER = 0; $document = ODD_Import($xml); + if (!$document) + throw new ImportException("No OpenDD elements found in import data, import failed."); foreach ($document as $element) __process_element($element); @@ -207,5 +209,18 @@ return true; } + + + /** + * Register the OpenDD import action + */ + function export_init() + { + global $CONFIG; + + register_action("import/odd", false); + } + // Register a startup event + register_event_handler('init','system','export_init',100); ?>
\ No newline at end of file |