]> git.mxchange.org Git - friendica-addons.git/commitdiff
[securemail] Use composer autoload
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 10 Feb 2019 13:45:40 +0000 (08:45 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 10 Feb 2019 13:45:40 +0000 (08:45 -0500)
securemail/securemail.php

index 85632e8c4e492b1acc5a1dbb6888db65a0267288..50bd27228b0a192821f5d09a3800b1daf51cd966 100644 (file)
@@ -15,16 +15,8 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
 use Friendica\Util\Emailer;
 
-/* because the fraking openpgp-php is in composer, require libs in composer
- * and then don't use autoloader to load classes... */
-$path = __DIR__ . '/vendor/phpseclib/phpseclib/phpseclib/';
-set_include_path(get_include_path() . PATH_SEPARATOR . $path);
-/* so, we don't use the autoloader and include what we need */
-$path = __DIR__ . '/vendor/singpolyma/openpgp-php/lib';
-set_include_path(get_include_path() . PATH_SEPARATOR . $path);
-
-require_once 'openpgp.php';
-require_once 'openpgp_crypt_symmetric.php';
+require_once 'vendor/autoload.php';
+
 function securemail_install()
 {
        Hook::register('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');