[securemail] Fix formatting
This commit is contained in:
parent
af672ecd1b
commit
a465e7dcd9
1 changed files with 107 additions and 132 deletions
|
@ -25,9 +25,8 @@ set_include_path(get_include_path() . PATH_SEPARATOR . $path);
|
|||
|
||||
require_once 'openpgp.php';
|
||||
require_once 'openpgp_crypt_symmetric.php';
|
||||
|
||||
|
||||
function securemail_install() {
|
||||
function securemail_install()
|
||||
{
|
||||
Hook::register('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
Hook::register('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
|
||||
|
@ -36,7 +35,8 @@ function securemail_install() {
|
|||
Logger::log('installed securemail');
|
||||
}
|
||||
|
||||
function securemail_uninstall() {
|
||||
function securemail_uninstall()
|
||||
{
|
||||
Hook::unregister('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
Hook::unregister('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
|
||||
|
@ -55,7 +55,8 @@ function securemail_uninstall() {
|
|||
*
|
||||
* @see App
|
||||
*/
|
||||
function securemail_settings(App &$a, &$s){
|
||||
function securemail_settings(App &$a, &$s)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -84,8 +85,8 @@ function securemail_settings(App &$a, &$s){
|
|||
*
|
||||
* @see App
|
||||
*/
|
||||
function securemail_settings_post(App &$a, array &$b){
|
||||
|
||||
function securemail_settings_post(App &$a, array &$b)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -149,7 +150,8 @@ function securemail_settings_post(App &$a, array &$b){
|
|||
*
|
||||
* @see App
|
||||
*/
|
||||
function securemail_emailer_send_prepare(App &$a, array &$b) {
|
||||
function securemail_emailer_send_prepare(App &$a, array &$b)
|
||||
{
|
||||
if (empty($b['uid'])) {
|
||||
return;
|
||||
}
|
||||
|
@ -184,30 +186,3 @@ function securemail_emailer_send_prepare(App &$a, array &$b) {
|
|||
$b['textVersion'] = $armored_encrypted;
|
||||
$b['htmlVersion'] = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* add addon composer autoloader maps to system autoloader
|
||||
|
||||
function securemail_autoloader() {
|
||||
|
||||
$loader = require dirname(dirname(__DIR__)) . '/vendor/autoload.php';
|
||||
|
||||
$map = require __DIR__ . '/vendor/composer/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/vendor/composer/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/vendor/composer/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
securemail_autoloader();
|
||||
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue