From f6d198ce5dcd9fe416975ff760439dfacbb83812 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 29 Aug 2012 23:03:03 -0700 Subject: trim a bit of fat --- include/bbcode.php | 6 ------ include/security.php | 8 +++----- include/text.php | 7 +++++++ 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index f43d2f547..8ee6a4ee0 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -185,12 +185,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $Text); //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '$2', $Text); - // we may need to restrict this further if it picks up too many strays - // link acct:user@host to a webfinger profile redirector - - $Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', 'acct:' . "$1@$2$3" . '',$Text); - // Perform MAIL Search $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '$1', $Text); $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '$2', $Text); diff --git a/include/security.php b/include/security.php index 5302639d4..4141d0948 100644 --- a/include/security.php +++ b/include/security.php @@ -136,11 +136,9 @@ function authenticate_success($user_record, $login_initial = false, $interactive return; } - -unset($_SESSION['return_url']); - if(($a->module !== 'home') && isset($_SESSION['return_url']) && strlen($_SESSION['return_url'])) { - $return_url = $_SESSION['return_url']; - unset($_SESSION['return_url']); + if(($a->module !== 'home') && x($_SESSION,'login_return_url') && strlen($_SESSION['login_return_url'])) { + $return_url = $_SESSION['login_return_url']; + unset($_SESSION['login_return_url']); goaway($a->get_baseurl() . '/' . $return_url); } diff --git a/include/text.php b/include/text.php index 79b4bba39..a1b718d44 100644 --- a/include/text.php +++ b/include/text.php @@ -1681,3 +1681,10 @@ function check_webbie($arr) { return ''; } + +function ids_to_querystr($arr,$idx = 'id') { + $t = array(); + foreach($arr as $x) + $t[] = $x[$idx]; + return(implode(',', $t)); +} \ No newline at end of file -- cgit v1.2.3