2010-09-27 01:14:42 +02:00
|
|
|
<?php
|
2022-06-28 14:46:11 +02:00
|
|
|
|
2010-09-27 01:14:42 +02:00
|
|
|
// vim:ts=4:sw=4:et
|
2018-12-28 20:31:43 +01:00
|
|
|
if (!defined('SM_PATH')) {
|
2018-12-28 20:18:05 +01:00
|
|
|
die("Invalid internal state (don't access file directly)");
|
|
|
|
}
|
2010-09-27 01:14:42 +02:00
|
|
|
include_once(SM_PATH . 'functions/i18n.php');
|
|
|
|
|
2021-04-13 22:19:16 +02:00
|
|
|
function squirrelmail_plugin_init_postfixadmin()
|
|
|
|
{
|
2014-02-19 12:52:36 +01:00
|
|
|
include(dirname(__FILE__) . '/config.php');
|
2010-09-27 01:14:42 +02:00
|
|
|
global $squirrelmail_plugin_hooks;
|
|
|
|
|
|
|
|
$squirrelmail_plugin_hooks['optpage_register_block']['postfixadmin'] = 'postfixadmin_optpage_register_block';
|
|
|
|
}
|
|
|
|
|
2021-04-13 22:19:16 +02:00
|
|
|
function postfixadmin_version()
|
|
|
|
{
|
2010-09-27 01:14:42 +02:00
|
|
|
return '2.3.0';
|
|
|
|
}
|
|
|
|
|
2021-04-13 22:19:16 +02:00
|
|
|
function postfixadmin_optpage_register_block()
|
|
|
|
{
|
2010-09-27 01:14:42 +02:00
|
|
|
// Gets added to the user's OPTIONS page.
|
|
|
|
global $optpage_blocks;
|
|
|
|
global $AllowVacation;
|
|
|
|
global $AllowChangePass;
|
|
|
|
|
|
|
|
// if ( !soupNazi() ) {
|
|
|
|
|
|
|
|
bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
|
|
|
|
textdomain('postfixadmin');
|
2018-01-26 15:45:57 +01:00
|
|
|
$optpage_blocks[] = array(
|
2010-09-27 01:14:42 +02:00
|
|
|
'name' => _("Forwarding"),
|
|
|
|
'url' => '../plugins/postfixadmin/postfixadmin_forward.php',
|
|
|
|
'desc' => _("Here you can create and edit E-Mail forwards."),
|
2018-01-26 15:45:57 +01:00
|
|
|
'js' => false
|
2010-09-27 01:14:42 +02:00
|
|
|
);
|
|
|
|
bindtextdomain('squirrelmail', SM_PATH . 'locale');
|
|
|
|
textdomain('squirrelmail');
|
|
|
|
|
|
|
|
bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
|
|
|
|
textdomain('postfixadmin');
|
2018-01-26 15:45:57 +01:00
|
|
|
if ($AllowVacation) {
|
2010-09-27 01:14:42 +02:00
|
|
|
$optpage_blocks[] = array(
|
|
|
|
'name' => _("Auto Response"),
|
|
|
|
'url' => '../plugins/postfixadmin/postfixadmin_vacation.php',
|
|
|
|
'desc' => _("Set an OUT OF OFFICE message or auto responder for your mail."),
|
|
|
|
'js' => false
|
|
|
|
);
|
|
|
|
bindtextdomain('squirrelmail', SM_PATH . 'locale');
|
|
|
|
textdomain('squirrelmail');
|
|
|
|
}
|
|
|
|
bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
|
|
|
|
textdomain('postfixadmin');
|
2018-01-26 15:45:57 +01:00
|
|
|
if ($AllowChangePass) {
|
2010-09-27 01:14:42 +02:00
|
|
|
$optpage_blocks[] = array(
|
|
|
|
'name' => _("Change Password"),
|
|
|
|
'url' => '../plugins/postfixadmin/postfixadmin_changepass.php',
|
|
|
|
'desc' => _("Change your mailbox password."),
|
|
|
|
'js' => false
|
|
|
|
);
|
|
|
|
bindtextdomain('squirrelmail', SM_PATH . 'locale');
|
|
|
|
textdomain('squirrelmail');
|
|
|
|
}
|
|
|
|
}
|