*
* Functions require SM_PATH and support of forms.php functions
*
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
define('SM_PATH','../');
}
-/* make sure that display_messages.php is loaded */
+/* required includes */
include_once(SM_PATH . 'functions/display_messages.php');
+include_once(SM_PATH . 'templates/util_global.php');
global $addrbook_dsn, $addrbook_global_dsn;
* @return string html code with sorting images and urls
*/
function show_abook_sort_button($abook_sort_order, $alt_tag, $Down, $Up ) {
- global $form_url;
+ global $form_url, $icon_theme_path;
/* Figure out which image we want to use. */
if ($abook_sort_order != $Up && $abook_sort_order != $Down) {
$which = 8;
}
- /* Now that we have everything figured out, show the actual button. */
- return ' <a href="' . $form_url .'?abook_sort_order=' . $which
- . '"><img src="../images/' . $img
- . '" border="0" width="12" height="10" alt="' . $alt_tag . '" title="'
- . _("Click here to change the sorting of the address list") .'" /></a>';
+ /* Now that we have everything figured out, show the actual button. */
+ return ' <a href="' . $form_url .'?abook_sort_order=' . $which .
+ '">' .
+ getIcon($icon_theme_path, $img, $alt_tag, _("Click here to change the sorting of the address list")) .
+ '</a>';
}
* @var string
*/
var $localbackendname = '';
+ /**
+ * Controls use of 'extra' field
+ *
+ * Extra field can be used to add link to form, which allows
+ * to modify all fields supported by backend. This is the only field
+ * that is not sanitized with htmlspecialchars. Backends MUST make
+ * sure that field data is sanitized and displayed correctly inside
+ * table cell. Use of html formating in other address book fields is
+ * not allowed. Backends that don't return 'extra' row in address book
+ * data should not modify this object property.
+ * @var boolean
+ * @since 1.5.1
+ */
+ var $add_extra_field = false;
/**
* Constructor function.
if (is_array($res)) {
return $res;
} else {
- $this->error = htmlspecialchars($backend->error);
+ $this->error = htmlspecialchars($this->backends[$bnum]->error);
return false;
}
}
*/
do_hook('abook_add_class');
-?>
\ No newline at end of file
+?>