From b262bd6d412a75fd3dfa829f145761e2e3a98957 Mon Sep 17 00:00:00 2001 From: Brendan Abbott Date: Thu, 5 Jun 2014 19:21:41 +1000 Subject: [PATCH] If something is wrong with the data, add the data in CDATA to the ?debug --- data-sources/datasource.remote.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data-sources/datasource.remote.php b/data-sources/datasource.remote.php index 24e8608..b628381 100644 --- a/data-sources/datasource.remote.php +++ b/data-sources/datasource.remote.php @@ -47,7 +47,7 @@ public function settings() { * the Gateway object that will be use for the current HTTP request * passed by reference */ - public function prepareGateway(&$gateway) {} + public static function prepareGateway(&$gateway) {} /** * This methods allows custom remote data source to read the returned @@ -244,7 +244,7 @@ public static function buildEditor(XMLElement $wrapper, array &$errors = array() if(isset($cache_id) && in_array('clear_cache', Administration::instance()->Page->getContext())) { $cache->forceExpiry($cache_id); Administration::instance()->Page->pageAlert( - __('Data source cache cleared at %s.', array(DateTimeObj::getTimeAgo())) + __('Data source cache cleared at %s.', array(Widget::Time()->generate())) . '' . __('View all Data sources') . '' @@ -776,6 +776,9 @@ public function execute(array &$param_pool = null) { $errors->appendChild(new XMLElement('item', General::sanitize($e['message']))); } $result->appendChild($errors); + $result->appendChild( + new XMLElement('raw-data', General::wrapInCDATA($data)) + ); } else if(strlen(trim($ret)) == 0) {