Fix FIXME in functions/addressbook.php
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Aug 2006 17:54:15 +0000 (17:54 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Aug 2006 17:54:15 +0000 (17:54 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11598 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/addressbook.php
src/addressbook.php

index 14ffb3e..9e9d029 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * functions/addressbook.php - Functions and classes for the addressbook system
  *
  * @subpackage addressbook
  */
 
-/** required includes */
-// FIXME, NO display code in functions files
-include_once(SM_PATH . 'templates/util_global.php');
-
 /**
  * Create and initialize an addressbook object.
  * @param boolean $showerr display any address book init errors. html page header
index efb0228..d5e4ccd 100644 (file)
@@ -21,6 +21,7 @@ include('../include/init.php');
 /* address book functions */
 require_once(SM_PATH . 'functions/addressbook.php');
 include_once(SM_PATH . 'templates/util_addressbook.php');
+include_once(SM_PATH . 'templates/util_global.php');
 
 /* form functions */
 require_once(SM_PATH . 'functions/forms.php');
@@ -188,14 +189,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
                     /* Handle error messages */
                     if (!$r) {
                         /* Display error */
-                        echo html_tag( 'table',
-                                html_tag( 'tr',
-                                    html_tag( 'td',
-                                        "\n". '<strong><font color="' . $color[2] .
-                                        '">' . _("ERROR") . ': ' . $abook->error . '</font></strong>' ."\n",
-                                        'center' )
-                                    ),
-                                'center', '', 'width="100%"' );
+                        plain_error_message( _("ERROR") .': '. $abook->error);
 
                         /* Display the "new address" form again */
                         abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata);