summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authormomo-i <momo-i@ampache>2009-07-02 22:42:40 +0000
committermomo-i <momo-i@ampache>2009-07-02 22:42:40 +0000
commit6136bb10817c1677fb981f0c73737ad69e965d25 (patch)
tree1f2640c6e24f700a42c3ea67dff5b62ac63ae3ac /lib/ui.lib.php
parent1eec25649610a745df670a7465e24a38b2066182 (diff)
downloadampache-6136bb10817c1677fb981f0c73737ad69e965d25.tar.gz
ampache-6136bb10817c1677fb981f0c73737ad69e965d25.tar.bz2
ampache-6136bb10817c1677fb981f0c73737ad69e965d25.zip
fixed for PHP 5.3.0 deprecate warnings
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 2e9d716d..7344fccb 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -402,7 +402,7 @@ function show_preference_box($preferences) {
*/
function good_email($email) {
// First check that there's one @ symbol, and that the lengths are good
- if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) {
+ if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $email)) {
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
return false;
}
@@ -411,17 +411,17 @@ function good_email($email) {
$email_array = explode("@", $email);
$local_array = explode(".", $email_array[0]);
for ($i = 0; $i < sizeof($local_array); $i++) {
- if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
+ if (!preg_match("/^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$/", $local_array[$i])) {
return false;
}
}
- if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
+ if (!preg_match("/^\[?[0-9\.]+\]?$/", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
$domain_array = explode(".", $email_array[1]);
if (sizeof($domain_array) < 2) {
return false; // Not enough parts to domain
}
for ($i = 0; $i < sizeof($domain_array); $i++) {
- if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
+ if (!preg_match("/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/", $domain_array[$i])) {
return false;
}
}