use wcf\data\AbstractDatabaseObjectAction;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\SystemException;
+use wcf\system\io\RemoteFile;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
-use wcf\util\HTTPRequest;
use wcf\util\JSON;
+use wcf\util\HTTPRequest;
/**
* Executes package-related actions.
* @return array<string>
*/
public function searchForPurchasedItems() {
- if (!HTTPRequest::supportSSL()) {
+ if (!RemoteFile::supportsSSL()) {
return array(
'noSSL' => WCF::getLanguage()->get('wcf.acp.pluginStore.api.noSSL')
);
*/
protected $errorDesc = '';
+ /**
+ * true if PHP supports SSL/TLS
+ * @var boolean
+ */
+ private static $hasSSLSupport = null;
+
/**
* Opens a new connection to a remote host.
*
public function hasTLSSupport() {
return function_exists('stream_socket_enable_crypto');
}
+
+ /**
+ * Returns true if PHP supports SSL/TLS.
+ *
+ * @return boolean
+ */
+ public static function supportsSSL() {
+ if (static::$hasSSLSupport === null) {
+ static::$hasSSLSupport = false;
+
+ $transports = stream_get_transports();
+ foreach ($transports as $transport) {
+ if (preg_match('~^(ssl(v[23])?|tls(v[0-9\.]+)?)$~', $transport)) {
+ static::$hasSSLSupport = true;
+ break;
+ }
+ }
+ }
+
+ return static::$hasSSLSupport;
+ }
}
*/
private $statusCode = 0;
- /**
- * true if PHP supports SSL/TLS
- * @var boolean
- */
- private static $hasSSLSupport = null;
-
/**
* Constructs a new instance of HTTPRequest.
*
$this->replyBody = '';
$this->statusCode = 0;
}
-
- /**
- * Returns true if PHP supports SSL/TLS.
- *
- * @return boolean
- */
- public static function supportSSL() {
- if (static::$hasSSLSupport === null) {
- static::$hasSSLSupport = false;
-
- $transports = stream_get_transports();
- foreach ($transports as $transport) {
- if (preg_match('~^(ssl(v[23])?|tls(v[0-9\.]+)?)$~', $transport)) {
- static::$hasSSLSupport = true;
- break;
- }
- }
- }
-
- return static::$hasSSLSupport;
- }
}