From: stevetruckstuff Date: Tue, 15 Aug 2006 21:31:48 +0000 (+0000) Subject: Correct invalid HTML id attributes. Modify add/edit/delete actions to account for... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=3c656c5f2e58efda27cdbcf71966da8464f87acc Correct invalid HTML id attributes. Modify add/edit/delete actions to account for new id format. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11603 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/addressbook.php b/src/addressbook.php index 22fc73f2..a75a8f7e 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -112,14 +112,14 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P $orig_sel = $sel; sort($sel); - /* The selected addresses are identidied by "backend:nickname". * + /* The selected addresses are identidied by "nickname_backend". * * Sort the list and process one backend at the time */ $prevback = -1; $subsel = array(); $delfailed = false; for ($i = 0 ; (($i < sizeof($sel)) && !$delfailed) ; $i++) { - list($sbackend, $snick) = explode(':', $sel[$i]); + list($snick, $sbackend) = explode('_', $sel[$i]); /* When we get to a new backend, process addresses in * * previous one. */ @@ -167,7 +167,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P $defselected = $sel; } else { $abortform = true; - list($ebackend, $enick) = explode(':', current($sel)); + list($enick, $ebackend) = explode('_', current($sel)); $olddata = $abook->lookup($enick, $ebackend); // Test if $olddata really contains anything and return an error message if it doesn't if (!$olddata) { @@ -189,7 +189,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P /* Handle error messages */ if (!$r) { /* Display error */ - plain_error_message( nl2br(htmlspecialchars(_("ERROR") .': '. $abook->error))); + plain_error_message( nl2br(htmlspecialchars($abook->error))); /* Display the "new address" form again */ abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata); diff --git a/templates/default/addressbook_list.tpl b/templates/default/addressbook_list.tpl index bf271914..9b2b8b1d 100644 --- a/templates/default/addressbook_list.tpl +++ b/templates/default/addressbook_list.tpl @@ -100,7 +100,7 @@ $colspan = $abook_has_extra_field ? 6 : 5; echo ''._("Address book is empty").''."\n"; } foreach ($source['Addresses'] as $contact) { - $id = $contact['NickName'] . $current_backend; + $id = $contact['NickName'] .'_'. $current_backend; ?> > ' : ''); ?>