|
|
@@ -640,7 +640,15 @@ class Zend_Gdata_App
|
|
|
|
|
|
// Set the params for the new request to be performed
|
|
|
$this->_httpClient->setHeaders($headers);
|
|
|
- $this->_httpClient->setUri($url);
|
|
|
+ $uri = Zend_Uri_Http::fromString($url);
|
|
|
+ preg_match("/^(.*?)(\?.*)?$/", $url, $matches);
|
|
|
+ $this->_httpClient->setUri($matches[1]);
|
|
|
+ $queryArray = $uri->getQueryAsArray();
|
|
|
+ foreach ($queryArray as $name => $value) {
|
|
|
+ $this->_httpClient->setParameterGet($name, $value);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$this->_httpClient->setConfig(array('maxredirects' => 0));
|
|
|
|
|
|
// Set the proper adapter if we are handling a streaming upload
|
|
|
@@ -800,6 +808,11 @@ class Zend_Gdata_App
|
|
|
$className='Zend_Gdata_App_Feed', $majorProtocolVersion = null,
|
|
|
$minorProtocolVersion = null)
|
|
|
{
|
|
|
+ if (!class_exists($className, false)) {
|
|
|
+ require_once 'Zend/Loader.php';
|
|
|
+ @Zend_Loader::loadClass($className);
|
|
|
+ }
|
|
|
+
|
|
|
// Load the feed as an XML DOMDocument object
|
|
|
@ini_set('track_errors', 1);
|
|
|
$doc = new DOMDocument();
|
|
|
@@ -953,6 +966,11 @@ class Zend_Gdata_App
|
|
|
public function insertEntry($data, $uri, $className='Zend_Gdata_App_Entry',
|
|
|
$extraHeaders = array())
|
|
|
{
|
|
|
+ if (!class_exists($className, false)) {
|
|
|
+ require_once 'Zend/Loader.php';
|
|
|
+ @Zend_Loader::loadClass($className);
|
|
|
+ }
|
|
|
+
|
|
|
$response = $this->post($data, $uri, null, null, $extraHeaders);
|
|
|
|
|
|
$returnEntry = new $className($response->getBody());
|
|
|
@@ -989,6 +1007,11 @@ class Zend_Gdata_App
|
|
|
$className = 'Zend_Gdata_App_Entry';
|
|
|
}
|
|
|
|
|
|
+ if (!class_exists($className, false)) {
|
|
|
+ require_once 'Zend/Loader.php';
|
|
|
+ @Zend_Loader::loadClass($className);
|
|
|
+ }
|
|
|
+
|
|
|
$response = $this->put($data, $uri, null, null, $extraHeaders);
|
|
|
$returnEntry = new $className($response->getBody());
|
|
|
$returnEntry->setHttpClient(self::getstaticHttpClient());
|