thomascube
2006-05-25 ed5d29f4b3c57235594931d33dde7cccaf7cd58b
program/include/main.inc
@@ -78,7 +78,7 @@
    
  // we can use the database for storing session data
  // session queries do not work with MDB2
  if ($CONFIG['db_backend']!='mdb2' && !$DB->is_error())
  if (!$DB->is_error())
    include_once('include/session.inc');
  // init session
@@ -313,8 +313,10 @@
  $javascript = "var $JS_OBJECT_NAME = new rcube_webmail();\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 (isset($CONFIG['javascript_config'] )){
    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']))
@@ -718,7 +720,7 @@
    {
    $s_header_sent = TRUE;
    send_nocacheing_headers();
    header('Content-Type: application/x-javascript');
    header('Content-Type: application/x-javascript; charset='.$CHARSET);
    print '/** remote response ['.date('d/M/Y h:i:s O')."] **/\n";
    }
@@ -1190,14 +1192,16 @@
        $task = $GLOBALS['_task'];
        $title = !empty($CONFIG['product_name']) ? $CONFIG['product_name'].' :: ' : '';
        
        if ($task=='mail' && isset($GLOBALS['MESSAGE']['subject']))
        if ($task=='login')
          $title = rcube_label(array('name' => 'welcome', 'vars' => array('product' => $CONFIG['product_name'])));
        else if ($task=='mail' && isset($GLOBALS['MESSAGE']['subject']))
          $title .= $GLOBALS['MESSAGE']['subject'];
        else if (isset($GLOBALS['PAGE_TITLE']))
          $title .= $GLOBALS['PAGE_TITLE'];
        else if ($task=='mail' && ($mbox_name = $IMAP->get_mailbox_name()))
          $title .= rcube_charset_convert($mbox_name, 'UTF-7', 'UTF-8');
        else
          $title .= $task;
          $title .= ucfirst($task);
          
        return rep_specialchars_output($title, 'html', 'all');
        }
@@ -1225,7 +1229,7 @@
  if ($attrib['type'])
    $attrib['type'] = strtolower($attrib['type']);
  else
    $attrib['type'] = ($attrib['image'] || $attrib['imagepas'] || $arg['imagect']) ? 'image' : 'link';
    $attrib['type'] = ($attrib['image'] || $attrib['imagepas'] || $arg['imageact']) ? 'image' : 'link';
  
  
  $command = $attrib['command'];
@@ -1235,7 +1239,7 @@
    $attrib = $sa_buttons[$attrib['name']];
  // add button to button stack
  else if($attrib['image'] || $arg['imagect'] || $attrib['imagepas'] || $attrib['class'])
  else if($attrib['image'] || $arg['imageact'] || $attrib['imagepas'] || $attrib['class'])
    {
    if(!$attrib['name'])
      $attrib['name'] = $command;