From a08708509a9e4187a0dbed32c76c50ecf16df3dc Mon Sep 17 00:00:00 2001 From: alecpl Date: Sat, 16 May 2009 14:28:47 +0000 Subject: - set pagetitle in php not js, hu_HU locale --- plugins/password/localization/hu_HU.inc | 18 ++++++++++++++++++ plugins/password/password.js | 8 -------- plugins/password/password.php | 14 ++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 plugins/password/localization/hu_HU.inc (limited to 'plugins') diff --git a/plugins/password/localization/hu_HU.inc b/plugins/password/localization/hu_HU.inc new file mode 100644 index 000000000..8a4e5d678 --- /dev/null +++ b/plugins/password/localization/hu_HU.inc @@ -0,0 +1,18 @@ + diff --git a/plugins/password/password.js b/plugins/password/password.js index 3d05b622b..e6fa0b547 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -33,12 +33,4 @@ if (window.rcmail) { } }, true); }) - - // set page title - if (rcmail.env.action == 'plugin.password' && rcmail.env.task == 'settings') { - var title = rcmail.gettext('changepasswd','password') - if (rcmail.env.product_name) - title = rcmail.env.product_name + ' :: ' + title; - rcmail.set_pagetitle(title); - } } diff --git a/plugins/password/password.php b/plugins/password/password.php index 0920c32f8..0763e91c5 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -97,15 +97,18 @@ class password extends rcube_plugin function password_init() { $this->add_texts('localization/'); - rcmail::get_instance()->output->send('plugin'); + $rcmail = rcmail::get_instance(); + $rcmail->output->set_pagetitle($this->gettext('changepasswd')); + $rcmail->output->send('plugin'); } function password_save() { $rcmail = rcmail::get_instance(); - $confirm = $rcmail->config->get('password_confirm_current'); $this->add_texts('localization/'); + $confirm = $rcmail->config->get('password_confirm_current'); + $rcmail->output->set_pagetitle($this->gettext('changepasswd')); if (($confirm && !isset($_POST['_curpasswd'])) || !isset($_POST['_newpasswd'])) $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error'); @@ -123,7 +126,7 @@ class password extends rcube_plugin } rcmail_overwrite_action('plugin.password'); - rcmail::get_instance()->output->send('plugin'); + $rcmail->output->send('plugin'); } function password_form() @@ -135,10 +138,9 @@ class password extends rcube_plugin $rcmail->output->add_label( 'password.nopassword', 'password.nocurpassword', - 'password.passwordinconsistency', - 'password.changepasswd' + 'password.passwordinconsistency' ); -// $rcmail->output->set_pagetitle($this->gettext('changepasswd')); + $rcmail->output->set_env('product_name', $rcmail->config->get('product_name')); // allow the following attributes to be added to the tag -- cgit v1.2.3