https://src.bluestatic.org
/
isso.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c13e217
)
Remove an unnecessary if/else and replace it with a single return statement
author
Robert Sesek <rsesek@bluestatic.org>
Mon, 5 Jan 2009 03:27:20 +0000
(19:27 -0800)
committer
Robert Sesek <rsesek@bluestatic.org>
Mon, 5 Jan 2009 03:27:20 +0000
(19:27 -0800)
* Functions.php:
(BSFunctions::is_valid_email)
Functions.php
patch
|
blob
|
history
diff --git
a/Functions.php
b/Functions.php
index 91a8eeec6906f4bd2937461abaa1d3076eee4f47..92195b5af25427cbfcacc61e39518f905ea79be0 100644
(file)
--- a/
Functions.php
+++ b/
Functions.php
@@
-213,14
+213,7
@@
class BSFunctions
*/
public static function is_valid_email($email)
{
- if (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email))
- {
- return true;
- }
- else
- {
- return false;
- }
+ return (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email));
}
/**