}
/* Connect to the SQL server using the supplied parameters. */
- $this->_write_db = &DB::connect($this->_params,
- array('persistent' => !empty($this->_params['persistent']),
- 'ssl' => !empty($this->_params['ssl'])));
+ $this->_write_db = DB::connect($this->_params,
+ array('persistent' => !empty($this->_params['persistent']),
+ 'ssl' => !empty($this->_params['ssl'])));
if ($this->_write_db instanceof PEAR_Error) {
throw new Horde_Auth_Exception($this->_write_db);
}
* seperately. */
if (!empty($this->_params['splitread'])) {
$params = array_merge($this->_params, $this->_params['read']);
- $this->_db = &DB::connect($params,
- array('persistent' => !empty($params['persistent']),
- 'ssl' => !empty($params['ssl'])));
+ $this->_db = DB::connect($params,
+ array('persistent' => !empty($params['persistent']),
+ 'ssl' => !empty($params['ssl'])));
if ($this->_db instanceof PEAR_Error) {
throw new Horde_Auth_Exception($this->_db);
}
* multiple Horde_Cache instances) are required.
*
* This method must be invoked as:
- * $var = &Horde_Cache::singleton()
+ * $var = Horde_Cache::singleton()
*
* @param mixed $driver The type of concrete Horde_Cache subclass to
* return. If $driver is an array, then we will look
/* Create the memory cache object, if configured. */
if (!empty($this->_params['use_memorycache'])) {
- $this->_mc = &Horde_Cache::singleton($params['use_memorycache'], !empty($conf['cache'][$params['use_memorycache']]) ? $conf['cache'][$params['use_memorycache']] : array());
+ $this->_mc = Horde_Cache::singleton($params['use_memorycache'], !empty($conf['cache'][$params['use_memorycache']]) ? $conf['cache'][$params['use_memorycache']] : array());
}
parent::__construct($this->_params);
throw new Horde_Exception($result->getMessage());
}
- require_once 'DB.php';
- $this->_write_db = &DB::connect(
+ $this->_write_db = DB::connect(
$this->_params,
array('persistent' => !empty($this->_params['persistent']),
'ssl' => !empty($this->_params['ssl']))
* seperately. */
if (!empty($this->_params['splitread'])) {
$params = array_merge($this->_params, $this->_params['read']);
- $this->_db = &DB::connect(
+ $this->_db = DB::connect(
$params,
array('persistent' => !empty($params['persistent']),
'ssl' => !empty($params['ssl']))
* multiple Horde_Editor instances) are required.
*
* This method must be invoked as:
- * $var = &Horde_Editor::singleton()
+ * $var = Horde_Editor::singleton()
*
* @param mixed $driver The type of concrete Horde_Editor subclass to
* return. If $driver is an array, then we will look
* @return Horde_Editor The concrete Horde_Editor reference, or false on
* error.
*/
- public static function &singleton($driver, $params = null)
+ public static function singleton($driver, $params = null)
{
static $instances = array();
$signature = serialize(array($driver, $params));
if (!array_key_exists($signature, $instances)) {
- $instances[$signature] = &Horde_Editor::factory($driver, $params);
+ $instances[$signature] = Horde_Editor::factory($driver, $params);
}
return $instances[$signature];
* It will only create a new instance if no History instance
* currently exists.
*
- * This method must be invoked as: $var = &History::singleton()
+ * This method must be invoked as: $var = History::singleton()
*
* @return Horde_History The concrete Horde_History reference.
* @throws Horde_Exception
throw new Horde_Exception(_("The History system is disabled."));
}
- $this->_write_db = &DB::connect($conf['sql']);
+ $this->_write_db = DB::connect($conf['sql']);
/* Set DB portability options. */
$portability = DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS;
* seperately. */
if (!empty($conf['sql']['splitread'])) {
$params = array_merge($conf['sql'], $conf['sql']['read']);
- $this->_db = &DB::connect($params);
+ $this->_db = DB::connect($params);
/* Set DB portability options. */
if (is_a($this->_db, 'DB_common')) {
*/
public function log($guid, $attributes = array(), $replaceAction = false)
{
- $history = &$this->getHistory($guid);
+ $history = $this->getHistory($guid);
if (!isset($attributes['who'])) {
$attributes['who'] = Horde_Auth::getAuth();
* get much faster now with a SELECT MAX(history_ts)
* ... query. */
try {
- $history = &$this->getHistory($guid);
+ $history = $this->getHistory($guid);
} catch (Horde_Exception $e) {
return 0;
}
* currently exists.
*
* This method must be invoked as:
- * $var = &Horde_SessionHandler::singleton()
+ * $var = Horde_SessionHandler::singleton()
*
* @param string $driver See Horde_SessionHandler::factory().
* @param array $params See Horde_SessionHandler::factory().
{
if (!empty($params['persistent_driver'])) {
try {
- $this->_persistent = &self::singleton($params['persistent_driver'], empty($params['persistent_params']) ? null : $params['persistent_params']);
+ $this->_persistent = self::singleton($params['persistent_driver'], empty($params['persistent_params']) ? null : $params['persistent_params']);
} catch (Horde_Exception $e) {
throw new Horde_Exception('Horde is unable to correctly start the persistent session handler.');
}
*/
protected function _open($save_path = null, $session_name = null)
{
- $this->_memcache = &Horde_Memcache::singleton();
+ $this->_memcache = Horde_Memcache::singleton();
if (is_a($this->_memcache, 'PEAR_Error')) {
throw new Horde_Exception($this->_memcache);
}
}
/* Connect to the SQL server using the supplied parameters. */
- $this->_write_db = &DB::connect($this->_params,
- array('persistent' => !empty($this->_params['persistent']),
- 'ssl' => !empty($this->_params['ssl'])));
+ $this->_write_db = DB::connect($this->_params,
+ array('persistent' => !empty($this->_params['persistent']),
+ 'ssl' => !empty($this->_params['ssl'])));
if (is_a($this->_write_db, 'PEAR_Error')) {
throw new Horde_Exception($this->_write_db);
}
* seperately. */
if (!empty($this->_params['splitread'])) {
$params = array_merge($this->_params, $this->_params['read']);
- $this->_db = &DB::connect($params,
- array('persistent' => !empty($params['persistent']),
- 'ssl' => !empty($params['ssl'])));
+ $this->_db = DB::connect($params,
+ array('persistent' => !empty($params['persistent']),
+ 'ssl' => !empty($params['ssl'])));
if (is_a($this->_db, 'PEAR_Error')) {
throw new Horde_Exception($this->_db);
}
// Do CLI checks and environment setup first.
require_once HORDE_BASE . '/lib/core.php';
-require_once 'Horde/CLI.php';
// Make sure no one runs this from the web.
if (!Horde_Cli::runningFromCLI()) {
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
require_once HORDE_BASE . '/lib/base.php';
}
/* Connect to the SQL server using the supplied parameters. */
- require_once 'DB.php';
- $this->_write_db = &DB::connect($this->_params,
- array('persistent' => !empty($this->_params['persistent']),
- 'ssl' => !empty($this->_params['ssl'])));
+ $this->_write_db = DB::connect($this->_params,
+ array('persistent' => !empty($this->_params['persistent']),
+ 'ssl' => !empty($this->_params['ssl'])));
if (is_a($this->_write_db, 'PEAR_Error')) {
return $this->_write_db;
}
* seperately. */
if (!empty($this->_params['splitread'])) {
$params = array_merge($this->_params, $this->_params['read']);
- $this->_db = &DB::connect($params,
- array('persistent' => !empty($params['persistent']),
- 'ssl' => !empty($params['ssl'])));
+ $this->_db = DB::connect($params,
+ array('persistent' => !empty($params['persistent']),
+ 'ssl' => !empty($params['ssl'])));
if (is_a($this->_db, 'PEAR_Error')) {
return $this->_db;
}
{
/* We may need to set a dummy parameter 'nocache' since some
* browsers do not always honor the 'no-cache' header. */
- $browser = &Horde_Browser::singleton();
+ $browser = Horde_Browser::singleton();
if ($browser->hasQuirk('cache_same_url')) {
if (is_null(self::$_randnum)) {
self::$_randnum = base_convert(microtime(), 10, 36);