aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/acl.php2
-rw-r--r--mod/photos.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 8c6eae0b0..e6733351b 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -30,7 +30,7 @@ function acl_init(&$a){
if ($search != "") {
$sql_extra = " AND `name` LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
- $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . ") ";
+ $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") ";
// This horrible mess is needed because position also returns 0 if nothing is found. W/ould be MUCH easier if it instead returned a very large value
// Otherwise we could just order by LEAST(POSTION($search IN xchan_name),POSITION($search IN xchan_addr)).
diff --git a/mod/photos.php b/mod/photos.php
index f4e770ec0..8a54eca4f 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -370,7 +370,7 @@ function photos_post(&$a) {
if($fullnametagged)
continue;
- require_once('mod/item.php');
+ require_once('include/text.php');
$body = $access_tag = '';
$success = handle_tag($a, $body, $access_tag, $str_tags, (local_user()) ? local_user() : $a->profile['profile_uid'] , $tag);