Changeset 193 for tags


Ignore:
Timestamp:
Jul 1, 2006 11:37:27 PM (18 years ago)
Author:
scdev
Message:

Q - couple minor bugs.

File:
1 edited

Legend:

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

    r111 r193  
    734734 * Takes a URL and returns it without the query or anchor portion
    735735 *
    736  * @param  string $url   any kind of URI
    737  * @return string        the URI with ? or # and everything after removed
     736 * @param  string $url   Any kind of URI.
     737 * @return string        The URI with everything after ? or # removed.
    738738 */
    739739function stripQuery($url)
     
    745745 * Returns the remote IP address, taking into consideration proxy servers.
    746746 *
    747  * @param  bool $dolookup   If true we resolve to IP to a host name,
    748  *                          if false we don't.
    749  * @return string    IP address if $dolookup is false or no arg
    750  *                   Hostname if $dolookup is true
     747 * @param  bool $dolookup   If true we resolve the IP to a host name, if false we don't.
     748 * @return string    IP address if $dolookup is false,  hostname if $dolookup is true
    751749 */
    752750function getRemoteAddr($dolookup=false)
     
    759757        }
    760758    }
    761     return $dolookup && '' != $ip ? gethostbyaddr($ip) : $ip;
     759    return $dolookup && '' != $ip ? @gethostbyaddr($ip) : $ip;
    762760}
    763761
Note: See TracChangeset for help on using the changeset viewer.