aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-14 00:32:31 -0800
committerFriendika <info@friendika.com>2010-11-14 00:32:31 -0800
commit0851669b39db770e62374551c9394f0f3a652314 (patch)
treebf5dbba7080891dea1b48151022bc915d23c64c0 /boot.php
parent7db4a0dd2ee631c4b0652e5852b1bb6f5ca50e63 (diff)
downloadvolse-hubzilla-0851669b39db770e62374551c9394f0f3a652314.tar.gz
volse-hubzilla-0851669b39db770e62374551c9394f0f3a652314.tar.bz2
volse-hubzilla-0851669b39db770e62374551c9394f0f3a652314.zip
clean up some regex's for i18n, and eliminate old ereg patterns.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 948cca46d..ad1df4ed1 100644
--- a/boot.php
+++ b/boot.php
@@ -736,7 +736,7 @@ function hex2bin($s) {
if(! function_exists('paginate')) {
function paginate(&$a) {
$o = '';
- $stripped = ereg_replace("(&page=[0-9]*)","",$_SERVER['QUERY_STRING']);
+ $stripped = preg_replace('/(&page=[0-9]*)/','',$_SERVER['QUERY_STRING']);
$stripped = str_replace('q=','',$stripped);
$stripped = trim($stripped,'/');
$url = $a->get_baseurl() . '/' . $stripped;
@@ -1444,3 +1444,10 @@ function search($s) {
return $o;
}}
+if(! function_exists('valid_email')) {
+function valid_email($x){
+ if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
+ return true;
+ return false;
+}}
+