aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/export.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-03-13 02:13:17 +0100
committerSem <sembrestels@riseup.net>2013-03-13 02:13:17 +0100
commitd730a0c5861c2e79faa3e58dd2b171ca4d197c6f (patch)
treecb4658e1c60a60c5f663845d49b108dd4608a89a /engine/lib/export.php
parent0fb3e5396d10d21323eb3bbc04727fd4a5a6d06d (diff)
parent34b14b305f5a106316fdc403c4ce80b25e89b51d (diff)
downloadelgg-d730a0c5861c2e79faa3e58dd2b171ca4d197c6f.tar.gz
elgg-d730a0c5861c2e79faa3e58dd2b171ca4d197c6f.tar.bz2
Merge tag '1.8.14' of git://github.com/Elgg/Elgg into foxglove-3
Elgg 1.8.14 Conflicts: mod/tinymce/vendor/tinymce/jscripts/tiny_mce/langs/en.js mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js
Diffstat (limited to 'engine/lib/export.php')
-rw-r--r--engine/lib/export.php29
1 files changed, 13 insertions, 16 deletions
diff --git a/engine/lib/export.php b/engine/lib/export.php
index ae9be95ce..ecc894e63 100644
--- a/engine/lib/export.php
+++ b/engine/lib/export.php
@@ -11,7 +11,7 @@
*
* @param mixed $object The object either an ElggEntity, ElggRelationship or ElggExtender
*
- * @return the UUID or false
+ * @return string|false the UUID or false
*/
function get_uuid_from_object($object) {
if ($object instanceof ElggEntity) {
@@ -40,8 +40,6 @@ function get_uuid_from_object($object) {
* @return string
*/
function guid_to_uuid($guid) {
- global $CONFIG;
-
return elgg_get_site_url() . "export/opendd/$guid/";
}
@@ -53,8 +51,6 @@ function guid_to_uuid($guid) {
* @return bool
*/
function is_uuid_this_domain($uuid) {
- global $CONFIG;
-
if (strpos($uuid, elgg_get_site_url()) === 0) {
return true;
}
@@ -67,7 +63,7 @@ function is_uuid_this_domain($uuid) {
*
* @param string $uuid A unique ID
*
- * @return mixed
+ * @return ElggEntity|false
*/
function get_entity_from_uuid($uuid) {
$uuid = sanitise_string($uuid);
@@ -117,18 +113,19 @@ function _process_element(ODD $odd) {
global $IMPORTED_DATA, $IMPORTED_OBJECT_COUNTER;
// See if anyone handles this element, return true if it is.
+ $to_be_serialised = null;
if ($odd) {
$handled = elgg_trigger_plugin_hook("import", "all", array("element" => $odd), $to_be_serialised);
- }
- // If not, then see if any of its sub elements are handled
- if ($handled) {
- // Increment validation counter
- $IMPORTED_OBJECT_COUNTER ++;
- // Return the constructed object
- $IMPORTED_DATA[] = $handled;
+ // If not, then see if any of its sub elements are handled
+ if ($handled) {
+ // Increment validation counter
+ $IMPORTED_OBJECT_COUNTER ++;
+ // Return the constructed object
+ $IMPORTED_DATA[] = $handled;
- return true;
+ return true;
+ }
}
return false;
@@ -167,7 +164,7 @@ function exportAsArray($guid) {
*
* @param int $guid The GUID.
*
- * @return xml
+ * @return string XML
* @see ElggEntity for an example of its usage.
* @access private
*/
@@ -184,7 +181,7 @@ function export($guid) {
* @param string $xml XML string
*
* @return bool
- * @throws Exception if there was a problem importing the data.
+ * @throws ImportException if there was a problem importing the data.
* @access private
*/
function import($xml) {