From 197601ef5fa2e6aaabfb6e0baaf56179f7cc1ee3 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 30 Apr 2008 04:21:42 -0400
Subject: [PATCH] Next step: introduce the application class 'rcmail' and get rid of some global vars

---
 program/steps/settings/edit_identity.inc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index 2dec5b2..0f849f1 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -19,7 +19,7 @@
 
 */
 
-if (($_GET['_iid'] || $_POST['_iid']) && $_action=='edit-identity')
+if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity')
   {
   $IDENTITY_RECORD = $USER->get_identity(get_input_value('_iid', RCUBE_INPUT_GPC));
   
@@ -37,9 +37,9 @@
 
 function rcube_identity_form($attrib)
   {
-  global $IDENTITY_RECORD, $OUTPUT;
+  global $IDENTITY_RECORD, $RCMAIL, $OUTPUT;
 
-  $tinylang = substr($_SESSION['user_lang'], 0, 2);
+  $tinylang = substr($_SESSION['language'], 0, 2);
   if (!file_exists('program/js/tiny_mce/langs/'.$tinylang.'.js'))
     {
       $tinylang = 'en';
@@ -58,7 +58,7 @@
                                     "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," .
                                     "theme_advanced_buttons3 : '' });");
 
-  if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity')
+  if (!$IDENTITY_RECORD && $RCMAIL->action != 'add-identity')
     return rcube_label('notfound');
 
   // add some labels to client
@@ -138,7 +138,7 @@
 
 $OUTPUT->add_handler('identityform', 'rcube_identity_form');
 
-if ($_action=='add-identity' && template_exists('addidentity'))
+if ($RCMAIL->action=='add-identity' && template_exists('addidentity'))
   $OUTPUT->send('addidentity');
 
 $OUTPUT->send('editidentity');

--
Gitblit v1.9.1