summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-07-12 10:17:32 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-07-12 10:17:32 +0200
commitdeb2b8d0804d1d25a3f28266747ce9041495b372 (patch)
treeeb32b73e965a3c7b6297f1adc2427689f48b7bd8 /program/lib/Roundcube/rcube.php
parentf6777712dc8c8ed2316e2926e98bb081e3785e40 (diff)
Allow to load config files for different environments (#1487311); keep (non-default) filename in URLs throughout the webmail app
Diffstat (limited to 'program/lib/Roundcube/rcube.php')
-rw-r--r--program/lib/Roundcube/rcube.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 05a94f3be..ce97cd0a5 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -105,13 +105,14 @@ class rcube
* This implements the 'singleton' design pattern
*
* @param integer Options to initialize with this instance. See rcube::INIT_WITH_* constants
+ * @param string Environment name to run (e.g. live, dev, test)
*
* @return rcube The one and only instance
*/
- static function get_instance($mode = 0)
+ static function get_instance($mode = 0, $env = '')
{
if (!self::$instance) {
- self::$instance = new rcube();
+ self::$instance = new rcube($env);
self::$instance->init($mode);
}
@@ -122,10 +123,10 @@ class rcube
/**
* Private constructor
*/
- protected function __construct()
+ protected function __construct($env = '')
{
// load configuration
- $this->config = new rcube_config;
+ $this->config = new rcube_config($env);
$this->plugins = new rcube_dummy_plugin_api;
register_shutdown_function(array($this, 'shutdown'));