Changeset 1735 in subversion


Ignore:
Timestamp:
Sep 5, 2008 3:27:23 AM (5 years ago)
Author:
thomasb
Message:

Killed one more global var + log logins to a separate file (not console)

Location:
trunk/roundcubemail
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/index.php

    r1697 r1735  
    3030// include environment 
    3131require_once 'program/include/iniset.php'; 
    32  
    33 // define global vars 
    34 $OUTPUT_TYPE = 'html'; 
    3532 
    3633// init application and start session with requested task 
     
    9592 
    9693    // log successful login 
    97     if ($RCMAIL->config->get('log_logins') && $RCMAIL->config->get('debug_level') & 1) 
    98       console(sprintf('Successful login for %s (id %d) from %s', 
    99                       trim(get_input_value('_user', RCUBE_INPUT_POST), ' '), 
    100                       $_SESSION['user_id'], 
    101                       $_SERVER['REMOTE_ADDR'])); 
     94    if ($RCMAIL->config->get('log_logins')) { 
     95      write_log('userlogins', sprintf('Successful login for %s (id %d) from %s', 
     96        $RCMAIL->user->get_username(), 
     97        $RCMAIL->user->ID, 
     98        $_SERVER['REMOTE_ADDR'])); 
     99    } 
    102100 
    103101    // send redirect 
  • trunk/roundcubemail/program/include/main.inc

    r1723 r1735  
    318318  } 
    319319  if (!$enctype) 
    320     $enctype = $GLOBALS['OUTPUT_TYPE']; 
     320    $enctype = $OUTPUT->type; 
    321321 
    322322  // encode for plaintext 
  • trunk/roundcubemail/program/include/rcube_json_output.php

    r1568 r1735  
    3535    private $commands = array(); 
    3636 
     37    public $type = 'js'; 
    3738    public $ajax_call = true; 
    3839     
  • trunk/roundcubemail/program/include/rcube_template.php

    r1722 r1735  
    4040    var $object_handlers = array(); 
    4141 
     42    public $type = 'html'; 
    4243    public $ajax_call = false; 
    4344 
  • trunk/roundcubemail/program/steps/mail/list.inc

    r1647 r1735  
    2020*/ 
    2121 
    22 $OUTPUT_TYPE = 'js'; 
    2322// is there a sort type for this request? 
    2423if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) 
Note: See TracChangeset for help on using the changeset viewer.