From 9855a1a9bb22d26a803a8047aa900d42034a93b4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 12 Nov 2012 01:18:04 +0100 Subject: [PATCH] removed url-shortening fixed location parser due to changes on the RWTH-Campus webpage --- php/campus/cocal.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/php/campus/cocal.php b/php/campus/cocal.php index ee5ef69..a734057 100644 --- a/php/campus/cocal.php +++ b/php/campus/cocal.php @@ -206,7 +206,7 @@ if (isset($matrnr) && isset($passwd)) { case 'LOCATION': $matches = array(); - if (preg_match('/^([0-9]+\|[0-9]+) /', $value, $matches)) { + if (preg_match('/^([0-9]+\|[0-9]+)/', $value, $matches)) { $room = $matches[1]; $address = get_address($db, $room); @@ -284,6 +284,13 @@ else { var cipher = $('#matrnr').val() + ':' + $('#passwd').val(); var link = '?hash=' + Base64.encode(cipher); + $('#result a').attr('href', link); + $('#result a').text(link); + $('#result').show(300); + + return; + + /* we dont want to store your credentials ;-) sorry for these ugly links */ $.ajax({ url : 'http://d.0l.de/add.json', data : {