[Svn] r4842 - trunk/plugins/newmail_notifier

trac at roundcube.net trac at roundcube.net
Mon Jun 6 18:13:48 CEST 2011


Author: alec
Date: 2011-06-06 11:13:48 -0500 (Mon, 06 Jun 2011)
New Revision: 4842

Modified:
   trunk/plugins/newmail_notifier/newmail_notifier.php
Log:
- Small optimization


Modified: trunk/plugins/newmail_notifier/newmail_notifier.php
===================================================================
--- trunk/plugins/newmail_notifier/newmail_notifier.php	2011-06-05 07:42:45 UTC (rev 4841)
+++ trunk/plugins/newmail_notifier/newmail_notifier.php	2011-06-06 16:13:48 UTC (rev 4842)
@@ -59,21 +59,21 @@
      */
     function prefs_list($args)
     {
+        if ($args['section'] != 'mailbox') {
+            return $args;
+        }
+
         // Load configuration
         $this->load_config();
 
+        // Load localization and configuration
+        $this->add_texts('localization/');
+
         // Check that configuration is not disabled
         $dont_override  = (array) $this->rc->config->get('dont_override', array());
         $basic_override = in_array('newmail_notifier_basic', $dont_override);
         $sound_override = in_array('newmail_notifier_sound', $dont_override);
 
-        if($args['section'] != 'mailbox') {
-            return $args;
-        }
-
-        // Load localization and configuration
-        $this->add_texts('localization/');
-
         if (!$basic_override) {
             $field_id = '_newmail_notifier_basic';
             $input    = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
@@ -100,6 +100,10 @@
      */
     function prefs_save($args)
     {
+        if ($args['section'] != 'mailbox') {
+            return $args;
+        }
+
         // Load configuration
         $this->load_config();
 
@@ -108,10 +112,6 @@
         $basic_override = in_array('newmail_notifier_basic', $dont_override);
         $sound_override = in_array('newmail_notifier_sound', $dont_override);
 
-        if($args['section'] != 'mailbox') {
-            return $args;
-        }
-
         if (!$basic_override) {
             $key = 'newmail_notifier_basic';
             $args['prefs'][$key] = get_input_value('_'.$key, RCUBE_INPUT_POST) ? true : false;

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list