Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/Dropbox2/OAuth/Consumer
File: ConsumerAbstract.php
*/
[500] Fix | Delete
public function setOutFile($handle)
[501] Fix | Delete
{
[502] Fix | Delete
if (!is_resource($handle) || get_resource_type($handle) != 'stream') {
[503] Fix | Delete
throw new Dropbox_Exception('Outfile must be a stream resource');
[504] Fix | Delete
}
[505] Fix | Delete
$this->outFile = $handle;
[506] Fix | Delete
}
[507] Fix | Delete
[508] Fix | Delete
/**
[509] Fix | Delete
* Set the input file
[510] Fix | Delete
* @param resource Resource to read data from
[511] Fix | Delete
* @return void
[512] Fix | Delete
*/
[513] Fix | Delete
public function setInFile($handle) {
[514] Fix | Delete
$this->inFile = $handle;
[515] Fix | Delete
}
[516] Fix | Delete
[517] Fix | Delete
/**
[518] Fix | Delete
* Parse response parameters for a token into an object
[519] Fix | Delete
* Dropbox returns tokens in the response parameters, and
[520] Fix | Delete
* not a JSON encoded object as per other API requests
[521] Fix | Delete
* @link http://oauth.net/core/1.0/#response_parameters
[522] Fix | Delete
* @param string $response
[523] Fix | Delete
* @return object stdClass
[524] Fix | Delete
*/
[525] Fix | Delete
private function parseTokenString($response)
[526] Fix | Delete
{
[527] Fix | Delete
$parts = explode('&', $response);
[528] Fix | Delete
$token = new stdClass();
[529] Fix | Delete
foreach ($parts as $part) {
[530] Fix | Delete
list($k, $v) = explode('=', $part, 2);
[531] Fix | Delete
$k = strtolower($k);
[532] Fix | Delete
$token->$k = $v;
[533] Fix | Delete
}
[534] Fix | Delete
return $token;
[535] Fix | Delete
}
[536] Fix | Delete
[537] Fix | Delete
/**
[538] Fix | Delete
* Encode a value to RFC3986
[539] Fix | Delete
* This is a convenience method to decode ~ symbols encoded
[540] Fix | Delete
* by rawurldecode. This will encode all characters except
[541] Fix | Delete
* the unreserved set, ALPHA, DIGIT, '-', '.', '_', '~'
[542] Fix | Delete
* @link http://tools.ietf.org/html/rfc5849#section-3.6
[543] Fix | Delete
* @param mixed $value
[544] Fix | Delete
*/
[545] Fix | Delete
private function encode($value)
[546] Fix | Delete
{
[547] Fix | Delete
return str_replace('%7E', '~', rawurlencode($value));
[548] Fix | Delete
}
[549] Fix | Delete
}
[550] Fix | Delete
[551] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function