From: jervfors Date: Sat, 4 Jun 2005 17:04:53 +0000 (+0000) Subject: String and phpDocumentor fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7390e24059ba28045540f784dccc24f05171af4c;p=squirrelmail.git String and phpDocumentor fix git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9502 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/abook_database.php b/functions/abook_database.php index 528b8aa8..2a491577 100644 --- a/functions/abook_database.php +++ b/functions/abook_database.php @@ -313,8 +313,8 @@ class abook_database extends addressbook_backend { /* 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 */ @@ -394,8 +394,8 @@ class abook_database extends addressbook_backend { /* 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 */ @@ -424,4 +424,4 @@ class abook_database extends addressbook_backend { } /* End of class abook_database */ // vim: et ts=4 -?> +?> \ No newline at end of file diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index d1ba38a4..6dca53eb 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -357,8 +357,8 @@ class abook_local_file extends addressbook_backend { /* 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 */ @@ -450,8 +450,8 @@ class abook_local_file extends addressbook_backend { /* 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 @@ -503,4 +503,4 @@ class abook_local_file extends addressbook_backend { } } /* End of class abook_local_file */ -?> +?> \ No newline at end of file diff --git a/functions/addressbook.php b/functions/addressbook.php index f92a951d..ae524b77 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -1,4 +1,5 @@ error, because message explains error. $abook_init_error.=sprintf( _("Error opening file %s"), $filename ); } - } /* Global file based addressbook */ @@ -131,7 +131,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { * 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]; @@ -147,7 +147,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { if (!$r && $showerr) { if ($abook_init_error!='') $abook_init_error.="
\n"; $abook_init_error.=sprintf(_("Error initializing LDAP server %s:") . - "
\n", $param['host']); + "
\n", $param['host']); $abook_init_error.= $abook->error; } } @@ -161,6 +161,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { if ($abook_init_error!='' && $showerr) { error_box($abook_init_error,$color); } + /* Return the initialized object */ return $abook; } @@ -925,8 +926,8 @@ require_once(SM_PATH . 'functions/abook_ldap_server.php'); /* 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'); } /* @@ -934,7 +935,7 @@ if((isset($addrbook_dsn) && !empty($addrbook_dsn)) || * 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'); diff --git a/functions/options.php b/functions/options.php index 0e8d32ed..abfe9fc1 100644 --- a/functions/options.php +++ b/functions/options.php @@ -611,14 +611,14 @@ function create_option_groups($optgrps, $optvals) { 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'])) {