diff options
Diffstat (limited to 'views/php/export')
| -rw-r--r-- | views/php/export/entity.php | 31 | ||||
| -rw-r--r-- | views/php/export/metadata.php | 31 | ||||
| -rw-r--r-- | views/php/export/relationship.php | 31 |
3 files changed, 51 insertions, 42 deletions
diff --git a/views/php/export/entity.php b/views/php/export/entity.php index 161401620..d2bcc0d58 100644 --- a/views/php/export/entity.php +++ b/views/php/export/entity.php @@ -1,16 +1,19 @@ <?php - /** - * Elgg Entity export. - * Displays an entity as PHP serialised data - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.org/ - */ +/** + * Elgg Entity export. + * Displays an entity as PHP serialised data + * + * @package Elgg + * @subpackage Core + */ - $entity = $vars['entity']; - echo serialize($entity); -?>
\ No newline at end of file +$entity = $vars['entity']; + +$export = new stdClass; +$exportable_values = $entity->getExportableValues(); + +foreach ($exportable_values as $v) { + $export->$v = $entity->$v; +} + +echo serialize($export); diff --git a/views/php/export/metadata.php b/views/php/export/metadata.php index 4f5e9c333..90f1daeb5 100644 --- a/views/php/export/metadata.php +++ b/views/php/export/metadata.php @@ -1,16 +1,19 @@ <?php - /** - * Elgg metadata export. - * Displays a metadata item using PHP serialised data - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.org/ - */ +/** + * Elgg metadata export. + * Displays a metadata item using PHP serialised data + * + * @package Elgg + * @subpackage Core + */ - $m = $vars['metadata']; - echo serialize($m); -?>
\ No newline at end of file +$m = $vars['metadata']; + +$export = new stdClass; +$exportable_values = $m->getExportableValues(); + +foreach ($exportable_values as $v) { + $export->$v = $m->$v; +} + +echo serialize($export);
\ No newline at end of file diff --git a/views/php/export/relationship.php b/views/php/export/relationship.php index cdba1b7a9..691e63067 100644 --- a/views/php/export/relationship.php +++ b/views/php/export/relationship.php @@ -1,16 +1,19 @@ <?php - /** - * Elgg relationship export. - * Displays a relationship using PHP serialised data - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.org/ - */ +/** + * Elgg relationship export. + * Displays a relationship using PHP serialised data + * + * @package Elgg + * @subpackage Core + */ - $r = $vars['relationship']; - echo serialize($r); -?>
\ No newline at end of file +$r = $vars['relationship']; + +$export = new stdClass; +$exportable_values = $r->getExportableValues(); + +foreach ($exportable_values as $v) { + $export->$v = $r->$v; +} + +echo serialize($export);
\ No newline at end of file |
