forked from GNUsocial/gnu-social
Merged in Phergie changes
This commit is contained in:
@@ -184,7 +184,10 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
|
||||
$type = $this->response->getHeaders('content-type');
|
||||
foreach ($this->handlers as $expr => $handler) {
|
||||
if (preg_match('#^' . $expr . '$#i', $type)) {
|
||||
$body = call_user_func($handler, $body);
|
||||
$handled = call_user_func($handler, $body);
|
||||
if (!empty($handled)) {
|
||||
$body = $handled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +259,7 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
|
||||
public function post($url, array $query = array(),
|
||||
array $post = array(), array $context = array()
|
||||
) {
|
||||
if (!empty($params)) {
|
||||
if (!empty($query)) {
|
||||
$url .= '?' . http_build_query($query);
|
||||
}
|
||||
|
||||
@@ -278,4 +281,4 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
|
||||
|
||||
return $this->request($url, $context);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user