Show
Ignore:
Timestamp:
02/25/10 15:56:33 (2 years ago)
Author:
gbastien
Message:
  • Added possibility to have a deployed geolocated node not show on map (quick fix) (#706)
  • When producing anonymised data export, two files are produced, one for the geolocated nodes and one for the connections (#705)
  • Additions and bug fixes to web service: can now logout and auth returns both error code and message
  • Starting work on #707 as needed
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/include/common.php

    r1428 r1453  
    158158/* End of Other constants */ 
    159159 
     160/* defin error codes */ 
     161define ('ERR_UNKNOWN_USERNAME', 20001); 
     162define ('ERR_WRONG_PASSWORD', 20002); 
     163define ('ERR_NO_USERNAME', 20003); 
     164define ('ERR_VALIDATION_EXPIRED', 20004); 
     165define ('ERR_ACCOUNT_INVALID', 20005); 
     166 
     167function getErrorText($errorCode) { 
     168    switch ($errorCode) { 
     169        case ERR_UNKNOWN_USERNAME: $text = _('Unknown username or email'); break; 
     170        case ERR_WRONG_PASSWORD: $text = _('Incorrect password (Maybe you have CAPS LOCK on?)'); break; 
     171        case ERR_NO_USERNAME: $text = _("Fatal error:  Username cannot be empty"); break; 
     172        case ERR_VALIDATION_EXPIRED: $text = _("Sorry, your %.0f minutes grace period to retrieve your email and validate your account has now expired. You will have to connect to the internet and validate your account from another location."); break; 
     173        case ERR_ACCOUNT_INVALID: $text = _("Sorry, your account is not valid: "); break; 
     174        default: $text = $errorCode; break; 
     175    } 
     176    return $text; 
     177} 
     178/* End error code definitions */ 
     179 
    160180/** Convert a password hash form a NoCat passwd file into the same format as get_password_hash(). 
    161181 * @return The 32 character hash.