web/callback.php
changeset 233 10d6fd6ce9ab
parent 229 74c9ddc3640b
child 557 636258d3fe4b
--- a/web/callback.php	Mon Jul 25 18:56:21 2011 +0200
+++ b/web/callback.php	Tue Jul 26 16:49:36 2011 +0200
@@ -4,7 +4,14 @@
  * include some common code (like we did in the 90s)
  * People still do this? ;)
  */
-include_once './common.php';
+include_once 'common.php';
+if(!isset($_REQUEST['rep'])) {
+	$rep = $C_default_rep;
+}
+else {
+	$rep = $_REQUEST['rep'];
+}
+
 
 /**
  * Someone's knocking at the door using the Callback URL - if they have
@@ -25,7 +32,7 @@
     /**
      * With Access Token in hand, let's try accessing the client again
      */
-    header('Location: ' . URL_ROOT . 'client.php' );
+    header('Location: ' . URL_ROOT . "$rep/client.php" );
 } else {
     /**
      * Mistaken request? Some malfeasant trying something?