Skip to content

Commit

Permalink
If something is wrong with the data, add the data in CDATA to the ?debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brendo committed Jun 5, 2014
1 parent 67e9e37 commit b262bd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data-sources/datasource.remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()))
. '<a href="' . SYMPHONY_URL . '/blueprints/datasources/" accesskey="a">'
. __('View all Data sources')
. '</a>'
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b262bd6

Please sign in to comment.