/* See if user exist already */
$ret = $this->lookup($userdata['nickname']);
if (!empty($ret)) {
- return $this->set_error(sprintf(_("User '%s' already exists"),
- $ret['nickname']));
+ return $this->set_error(sprintf(_("User %s already exists"),
+ '"' . $ret['nickname'] . '"'));
}
/* Create query */
/* See if user exist */
$ret = $this->lookup($alias);
if (empty($ret)) {
- return $this->set_error(sprintf(_("User '%s' does not exist"),
- $alias));
+ return $this->set_error(sprintf(_("User %s does not exist"),
+ '&qout;' . $alias . '&qout;'));
}
/* Create query */
} /* End of class abook_database */
// vim: et ts=4
-?>
+?>
\ No newline at end of file
/* See if user exists already */
$ret = $this->lookup($userdata['nickname']);
if(!empty($ret)) {
- return $this->set_error(sprintf(_("User '%s' already exists"),
- $ret['nickname']));
+ return $this->set_error(sprintf(_("User %s already exists"),
+ '"' . $ret['nickname'] . '"'));
}
/* Here is the data to write */
/* See if user exists */
$ret = $this->lookup($alias);
if(empty($ret)) {
- return $this->set_error(sprintf(_("User '%s' does not exist"),
- $alias));
+ return $this->set_error(sprintf(_("User %s does not exist"),
+ '"' . $alias . '"'));
}
/* Lock the file to make sure we're the only process working
}
} /* End of class abook_local_file */
-?>
+?>
\ No newline at end of file
<?php
+
/**
* functions/addressbook.php - Functions and classes for the addressbook system
*
// no need to use $abook->error, because message explains error.
$abook_init_error.=sprintf( _("Error opening file %s"), $filename );
}
-
}
/* Global file based addressbook */
* hook allows to include different address book backends.
* plugins should extract $abook and $r from arguments
* and use same add_backend commands as above functions.
- * @since 1.5.1
+ * @since 1.5.1 and 1.4.5
*/
$hookReturn = do_hook('abook_init', $abook, $r);
$abook = $hookReturn[1];
if (!$r && $showerr) {
if ($abook_init_error!='') $abook_init_error.="<br />\n";
$abook_init_error.=sprintf(_("Error initializing LDAP server %s:") .
- "<br />\n", $param['host']);
+ "<br />\n", $param['host']);
$abook_init_error.= $abook->error;
}
}
if ($abook_init_error!='' && $showerr) {
error_box($abook_init_error,$color);
}
+
/* Return the initialized object */
return $abook;
}
/* Only load database backend if database is configured */
if((isset($addrbook_dsn) && !empty($addrbook_dsn)) ||
- (isset($addrbook_global_dsn) && !empty($addrbook_global_dsn)) ) {
- include_once(SM_PATH . 'functions/abook_database.php');
+ (isset($addrbook_global_dsn) && !empty($addrbook_global_dsn))) {
+ include_once(SM_PATH . 'functions/abook_database.php');
}
/*
* class must follow address book class coding standards.
*
* see addressbook_backend class and functions/abook_*.php files.
- * @since 1.5.1
+ * @since 1.5.1 and 1.4.5
*/
do_hook('abook_add_class');
foreach ($grpopts as $optset) {
/* Create a new option with all values given. */
$next_option = new SquirrelOption(
- $optset['name'],
- $optset['caption'],
- $optset['type'],
- (isset($optset['refresh']) ? $optset['refresh'] : SMOPT_REFRESH_NONE),
- (isset($optset['initial_value']) ? $optset['initial_value'] : ''),
- (isset($optset['posvals']) ? $optset['posvals'] : ''),
- (isset($optset['htmlencoded']) ? $optset['htmlencoded'] : false)
- );
+ $optset['name'],
+ $optset['caption'],
+ $optset['type'],
+ (isset($optset['refresh']) ? $optset['refresh'] : SMOPT_REFRESH_NONE),
+ (isset($optset['initial_value']) ? $optset['initial_value'] : ''),
+ (isset($optset['posvals']) ? $optset['posvals'] : ''),
+ (isset($optset['htmlencoded']) ? $optset['htmlencoded'] : false)
+ );
/* If provided, set the size for this option. */
if (isset($optset['size'])) {