Changeset 319


Ignore:
Timestamp:
Mar 17, 2008 11:58:08 PM (16 years ago)
Author:
quinn
Message:
 
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/2.0.2/lib/Auth_SQL.inc.php

    r266 r319  
    7676        // An array of IP blocks that are bypass the remote_ip comparison check. Useful for dynamic IPs or those behind proxy servers.
    7777        'trusted_networks' => array(),
     78
     79        // Match the user's current remote IP against the one they logged in with.
     80        'match_remote_ip' => true,
    7881
    7982        // Allow user accounts to be blocked? Requires the user table to have the columns 'blocked' and 'blocked_reason'
     
    507510            && strtotime($_SESSION[$this->_sess]['login_datetime']) > time() - $this->_params['login_timeout']
    508511            && strtotime($_SESSION[$this->_sess]['last_access_datetime']) > time() - $this->_params['idle_timeout']
    509             && ($_SESSION[$this->_sess]['remote_ip'] == getRemoteAddr() || $user_in_trusted_network)
     512            && (!$this->_params['match_remote_ip'] || $_SESSION[$this->_sess]['remote_ip'] == getRemoteAddr() || $user_in_trusted_network)
    510513        ) {
    511514            // User is authenticated!
  • trunk/bin/module_maker/form_template.cli.php

    r295 r319  
    8585        <div class="sc-help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/__///__', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div>
    8686    <\x3fphp } \x3f>
    87     <div class="sc-help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div>
     87    <div class="sc-help"><\x3fphp printf(_("Allowed file types: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div>
    8888</div>
    8989E_O_F;
  • trunk/bin/module_maker/module.cli.php

    r316 r319  
    230230if ($upload_file_capability) {
    231231    // Form arguments
    232     $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo oTxt(\$_SERVER['PHP_SELF']); \x3f>\" class=\"sc-form\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"__///__\" />";
     232    $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo oTxt(\$_SERVER['PHP_SELF']); \x3f>\" class=\"sc-form\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<\x3fphp echo intval(ini_get('upload_max_filesize')) * 1024 * 1024; \x3f>\" />";
    233233
    234234    // Include statement.
Note: See TracChangeset for help on using the changeset viewer.