Changeset 36 for trunk/includes

Show
Ignore:
Timestamp:
09/26/05 00:51:38 (7 years ago)
Author:
alexx
Message:
  • flickR accept space in his login (damned !), so fix is_valid('metalbum_name'...)
  • add urldecode mapping on $token array to correctly handle space and others stranges characters in URL :)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/includes/functions.inc.php

    r35 r36  
    3939        if(ereg("\.php$", $token[0])) 
    4040                $token[0] = substr($token[0], 0, -4); 
    41         return $token; 
     41        return array_map('urldecode', $token); 
    4242} 
    4343 
     
    480480                { 
    481481                        list($login, $type) = split('@', $string); 
    482                         if(ereg("^[a-zA-Z0-9\._-]{2,32}$", $login) && is_valid('metalbum_type', $type)) 
     482                        if(ereg("^[ a-zA-Z0-9\._-]{2,32}$", $login) && is_valid('metalbum_type', $type)) 
    483483                                return true; 
    484484                }