Added OPTIONS -> Javascript code

release-0.6
svncommit 19 years ago
parent 4b3af37c35
commit de8c61c4e3

@ -76,17 +76,15 @@ function rcmail_startup($task='mail')
$DB->sqlite_initials = $INSTALL_PATH.'SQL/sqlite.initial.sql'; $DB->sqlite_initials = $INSTALL_PATH.'SQL/sqlite.initial.sql';
$DB->db_connect('w'); $DB->db_connect('w');
// we can use the database for storing session data // we can use the database for storing session data
// session queries do not work with MDB2 // session queries do not work with MDB2
if ($CONFIG['db_backend']!='mdb2' && !$DB->is_error()) if ($CONFIG['db_backend']!='mdb2' && !$DB->is_error())
include_once('include/session.inc'); include_once('include/session.inc');
// init session // init session
session_start(); session_start();
$sess_id = session_id(); $sess_id = session_id();
// create session and set session vars // create session and set session vars
if (!$_SESSION['client_id']) if (!$_SESSION['client_id'])
{ {
@ -114,7 +112,6 @@ function rcmail_startup($task='mail')
// set current task to session // set current task to session
$_SESSION['task'] = $task; $_SESSION['task'] = $task;
// create IMAP object // create IMAP object
if ($task=='mail') if ($task=='mail')
rcmail_imap_init(); rcmail_imap_init();
@ -194,7 +191,6 @@ function rcmail_set_imap_prop()
if (!empty($_SESSION['mbox'])) if (!empty($_SESSION['mbox']))
$IMAP->set_mailbox($_SESSION['mbox']); $IMAP->set_mailbox($_SESSION['mbox']);
if (isset($_SESSION['page'])) if (isset($_SESSION['page']))
$IMAP->set_page($_SESSION['page']); $IMAP->set_page($_SESSION['page']);
} }
@ -317,6 +313,10 @@ function load_gui()
$javascript = "var $JS_OBJECT_NAME = new rcube_webmail();\n"; $javascript = "var $JS_OBJECT_NAME = new rcube_webmail();\n";
$javascript .= "$JS_OBJECT_NAME.set_env('comm_path', '$COMM_PATH');\n"; $javascript .= "$JS_OBJECT_NAME.set_env('comm_path', '$COMM_PATH');\n";
foreach ($CONFIG['javascript_config'] as $js_config_var){
$javascript .= "$JS_OBJECT_NAME.set_env('$js_config_var', '" . $CONFIG[$js_config_var] . "');\n";
}
if (!empty($GLOBALS['_framed'])) if (!empty($GLOBALS['_framed']))
$javascript .= "$JS_OBJECT_NAME.set_env('framed', true);\n"; $javascript .= "$JS_OBJECT_NAME.set_env('framed', true);\n";

Loading…
Cancel
Save