1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Eliminating some duplicate methods, more marketplace eAuth work

This commit is contained in:
SecretR
2013-06-06 15:25:43 +03:00
parent bf68100106
commit 3c50b42bd4
3 changed files with 505 additions and 267 deletions

View File

@@ -308,14 +308,23 @@ class xmlClass
}
/**
* DEPRECATED
* Get Remote file contents
* use setOptArrayTags above if you require a consistent array result by in 1 item or many.
* @deprecated use e_file::getRemoteContent() instead
* @param string $address
* @param integer $timeout [optional] seconds
* @return string
*/
function getRemoteFile($address, $timeout = 10, $postData=null)
{
$_file = e107::getFile();
$this->xmlFileContents = $_file->getRemoteContent($address, array('timeout' => $timeout, 'post' => $postData));
$this->error = $_file->error;
return $this->xmlFileContents;
// ------ MOVED TO FILE HANDLER ------ //
// Could do something like: if ($timeout <= 0) $timeout = $pref['get_remote_timeout']; here
$timeout = min($timeout, 120);
$timeout = max($timeout, 3);