replace string "Cute." with "Invalid URL" (reuse of existing string)
[squirrelmail.git] / functions / identity.php
index bce928b540cc23e4e9839b3a37a1f39957ca4bb1..322485e0589c9e599e81975a6bfc85d96c3ff552 100644 (file)
@@ -5,22 +5,13 @@
  *
  * This contains utility functions for dealing with multiple identities
  *
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @since 1.4.2
  */
 
-/** Used to simplify includes
- * @ignore
- */
-if (!defined('SM_PATH')) {
-    define('SM_PATH','../');
-}
-
-/** preference and signature functions */
-include_once(SM_PATH . 'include/load_prefs.php');
 
 /**
  * Returns an array of all the identities.
@@ -79,7 +70,7 @@ function save_identities($identities) {
 
 
     $num_cur = getPref($data_dir, $username, 'identities');
-    
+
     $cnt = count($identities);
 
     // Remove any additional identities in prefs //
@@ -143,7 +134,7 @@ function sqfixidentities( $identities, $id, $action ) {
                     $fixed[0] = $ident;
 
                     // inform plugins about renumbering of ids
-                    do_hook('options_identities_renumber', $id, 'default');
+                    do_hook('options_identities_renumber', $temp=array(&$id, 'default'));
 
                     continue 2;
                 } else {
@@ -157,7 +148,7 @@ function sqfixidentities( $identities, $id, $action ) {
                     $tmp_hold = $ident;
 
                     // inform plugins about renumbering of ids
-                    do_hook('options_identities_renumber', $id , $id - 1);
+                    do_hook('options_identities_renumber', $temp=array(&$id , $id - 1));
 
                     continue 2;
                 } else {
@@ -174,7 +165,7 @@ function sqfixidentities( $identities, $id, $action ) {
 
                 if ($key == $id) {
                     // inform plugins about deleted id
-                    do_hook('options_identities_process', $action, $id);
+                    do_hook('options_identities_process', $temp=array(&$action, &$id));
 
                     continue 2;
                 } else {
@@ -185,12 +176,12 @@ function sqfixidentities( $identities, $id, $action ) {
             // Process actions from plugins and save/update action //
             default:
                 /**
-                 * send action and id information. number of hook arguments 
-                 * differs from 1.4.4 or older and 1.5.0. count($args) can 
-                 * be used to detect modified hook. Older hook does not 
+                 * send action and id information. number of hook arguments
+                 * differs from 1.4.4 or older and 1.5.0. count($args) can
+                 * be used to detect modified hook. Older hook does not
                  * provide information that can be useful for plugins.
                  */
-                do_hook('options_identities_process', $action, $id);
+                do_hook('options_identities_process', $temp=array(&$action, &$id));
 
                 $fixed[$i] = $ident;
 
@@ -219,5 +210,3 @@ function empty_identity($ident) {
         return false;
     }
 }
-
-?>
\ No newline at end of file