using squirrelmail functions instead of working with $_SESSION directly
[squirrelmail.git] / plugins / change_password / setup.php
CommitLineData
27663afe 1<?php
2
087508d9 3/**
4 * setup.php - Generic Change Password plugin
5 *
6c84ba1e 6 * Copyright (c) 2003-2005 The SquirrelMail Project Team
087508d9 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
27663afe 8 *
9 * This plugin aims to provide a general framework for all password
10 * changing methods that currently have their own plugins.
11 *
882acf90 12 * @version $Id$
087508d9 13 * @package plugins
14 * @subpackage change_password
27663afe 15 */
16
882acf90 17/**
18 * Plugin init function
19 */
27663afe 20function squirrelmail_plugin_init_change_password() {
21 global $squirrelmail_plugin_hooks;
22
23 $squirrelmail_plugin_hooks['optpage_register_block']['change_password'] = 'change_password_optpage';
75adae57 24 $squirrelmail_plugin_hooks['optpage_set_loadinfo']['change_password'] = 'change_password_loadinfo';
27663afe 25}
26
882acf90 27/**
28 * Add plugin option block
29 */
27663afe 30function change_password_optpage() {
31 global $optpage_blocks;
32
76063016 33 // SM14 code: use change_password gettext domain binding for 1.4.x
34 if (! check_sm_version(1,5,0)) {
35 bindtextdomain('change_password',SM_PATH . 'locale');
36 textdomain('change_password');
37 }
38
27663afe 39 $optpage_blocks[] = array(
40 'name' => _("Change Password"),
41 'url' => '../plugins/change_password/options.php',
42 'desc' => _("Use this to change your email password."),
43 'js' => FALSE
44 );
76063016 45
46 // SM14 code: revert to squirrelmail domain for 1.4.x
47 if (! check_sm_version(1,5,0)) {
48 bindtextdomain('squirrelmail',SM_PATH . 'locale');
49 textdomain('squirrelmail');
50 }
27663afe 51}
52
75adae57 53/**
54 * Displays information after "Successfully Saved Options:"
55 * @since 1.5.1
56 */
57function change_password_loadinfo() {
58 global $optpage, $optpage_name;
59 if ($optpage=='change_password') {
76063016 60 // SM14 code: use change_password gettext domain binding for 1.4.x
61 if (! check_sm_version(1,5,0)) {
62 bindtextdomain('change_password',SM_PATH . 'locale');
63 textdomain('change_password');
64 }
65
75adae57 66 // i18n: is displayed after "Successfully Saved Options:"
67 $optpage_name=_("User's Password");
75adae57 68
76063016 69 // SM14 code: revert to squirrelmail domain for 1.4.x
70 if (! check_sm_version(1,5,0)) {
71 bindtextdomain('squirrelmail',SM_PATH . 'locale');
72 textdomain('squirrelmail');
73 }
74 }
75adae57 75}
76
882acf90 77/**
78 * Return version information
79 * @return string version number
80 */
27663afe 81function change_password_version() {
087508d9 82 return '0.2';
27663afe 83}
882acf90 84?>