Changeset 560


Ignore:
Timestamp:
Jan 12, 2016 11:14:55 PM (8 years ago)
Author:
anonymous
Message:

Minor code formatting and comments.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/init_codebase_tables.cli.php

    r533 r560  
    131131            // Auth_SQL!
    132132            $auth = new Auth_SQL('codebase');
    133             $auth->setParam(array('create_table' => true));
     133            $auth->setParam(array(
     134                'create_table' => true,
     135                'abuse_detection' => true,
     136            ));
    134137            $auth->initDB(isset($opt['f']));
    135138            break;
  • trunk/lib/Auth_SQL.inc.php

    r550 r560  
    397397
    398398        // Get user data for specified username.
    399         // Query DB for user matching credentials. Compare cyphertext with salted-encrypted password.
    400399        $qid = $db->query("
    401400            SELECT *, " . $this->_params['db_primary_key'] . " AS user_id
     
    408407        }
    409408
     409        // Check given password against hashed DB password.
    410410        $old_hash_type = isset($user_data['userpass_hashtype']) && !empty($user_data['userpass_hashtype']) ? $user_data['userpass_hashtype'] : $this->getParam('hash_type');
    411411        if ($this->verifyPassword($password, $user_data['userpass'], $old_hash_type)) {
  • trunk/lib/Lock.inc.php

    r526 r560  
    3636    // Configuration of this object.
    3737    protected $_params = array(
     38        // The time required to pass before a user can forcibly unlock a locked record.
    3839        'timeout' => 600,
     40
     41        // The time after which a record will automatically become unlocked.
    3942        'auto_timeout' => 1800,
     43
     44        // The URL to the lock script.
    4045        'error_url' => '/lock.php',
     46
     47        // The name of the database table to store locks.
    4148        'db_table' => 'lock_tbl',
    4249
  • trunk/lib/Utilities.inc.php

    r548 r560  
    10501050function putFormData($key, $val)
    10511051{
    1052     if ('POST' == getenv('REQUEST_METHOD')) {
     1052    switch (strtoupper(getenv('REQUEST_METHOD'))) {
     1053    case 'POST':
    10531054        $_POST[$key] = $val;
    1054     } else if ('GET' == getenv('REQUEST_METHOD')) {
     1055        break;
     1056
     1057    case 'GET':
    10551058        $_GET[$key] = $val;
     1059        break;
    10561060    }
    10571061}
Note: See TracChangeset for help on using the changeset viewer.