projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avoid E_STRICT errors
[squirrelmail.git]
/
src
/
addressbook.php
diff --git
a/src/addressbook.php
b/src/addressbook.php
index efb02285e5b80ddad2e643446ecbde1fd644d99c..302170fb879d6c761e5d7f5edf04e0b435b71429 100644
(file)
--- a/
src/addressbook.php
+++ b/
src/addressbook.php
@@
-5,13
+5,16
@@
*
* Manage personal address book.
*
*
* Manage personal address book.
*
- * @copyright © 1999-200
6
The SquirrelMail Project Team
+ * @copyright © 1999-200
7
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage addressbook
*/
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage addressbook
*/
+/** This is the addressbook page */
+define('PAGE_NAME', 'addressbook');
+
/**
* Include the SquirrelMail initialization file.
*/
/**
* Include the SquirrelMail initialization file.
*/
@@
-40,7
+43,7
@@
sqgetGlobalVar('doedit', $doedit, SQ_POST);
$abook_sort_order = get_abook_sort();
/* Create page header before addressbook_init in order to display error messages correctly. */
$abook_sort_order = get_abook_sort();
/* Create page header before addressbook_init in order to display error messages correctly. */
-displayPageHeader($color
, 'None'
);
+displayPageHeader($color);
/* Open addressbook with error messages on.
remote backends (LDAP) are enabled because they can be used. (list_addr function)
/* Open addressbook with error messages on.
remote backends (LDAP) are enabled because they can be used. (list_addr function)
@@
-111,14
+114,14
@@
if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
$orig_sel = $sel;
sort($sel);
$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++) {
* 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($s
backend, $snick) = explode(':
', $sel[$i]);
+ list($s
nick, $sbackend) = explode('_
', $sel[$i]);
/* When we get to a new backend, process addresses in *
* previous one. */
/* When we get to a new backend, process addresses in *
* previous one. */
@@
-166,7
+169,7
@@
if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
$defselected = $sel;
} else {
$abortform = true;
$defselected = $sel;
} else {
$abortform = true;
- list($e
backend, $enick) = explode(':
', current($sel));
+ list($e
nick, $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) {
$olddata = $abook->lookup($enick, $ebackend);
// Test if $olddata really contains anything and return an error message if it doesn't
if (!$olddata) {
@@
-188,14
+191,7
@@
if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
/* Handle error messages */
if (!$r) {
/* Display error */
/* 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( nl2br(htmlspecialchars($abook->error)));
/* Display the "new address" form again */
abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata);
/* Display the "new address" form again */
abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata);
@@
-272,18
+268,17
@@
if ($showaddrlist) {
$oTemplate->display('addressbook_list.tpl');
$oTemplate->display('addressbook_list.tpl');
+//FIXME: Remove HTML from here!
echo "</form>\n";
}
/* Display the "new address" form */
echo "</form>\n";
}
/* Display the "new address" form */
+//FIXME: Remove HTML from here!
echo '<a name="AddAddress"></a>' . "\n";
abook_create_form($form_url,'addaddr',_("Add to address book"),_("Add address"),$defdata);
echo "</form>\n";
/* Hook for extra address book blocks */
echo '<a name="AddAddress"></a>' . "\n";
abook_create_form($form_url,'addaddr',_("Add to address book"),_("Add address"),$defdata);
echo "</form>\n";
/* Hook for extra address book blocks */
-echo "<!-- start of addressbook_bottom hook-->\n";
-do_hook('addressbook_bottom');
-echo "\n<!-- end of addressbook_bottom hook-->\n";
+do_hook('addressbook_bottom', $null);
$oTemplate->display('footer.tpl');
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file