Added auth_redirect parameter V01.55
authorRaphael Velt <raph.velt@gmail.com>
Thu, 22 Mar 2012 16:25:17 +0100
changeset 559 64b3376aef6a
parent 558 541bc68826a4
child 560 2458fadd3225
Added auth_redirect parameter
web/client.php
web/live_embed_form.php
--- a/web/client.php	Thu Mar 22 12:22:53 2012 +0100
+++ b/web/client.php	Thu Mar 22 16:25:17 2012 +0100
@@ -46,8 +46,8 @@
     $embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
     $videoWidth = ( $embed ? 412 : 480 );
     $videoHeight = ( $embed ? 280 : 320 );
-    if ($embed && !isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_SERVER['HTTP_REFERER'])) {
-        $_SESSION['TWITTER_REDIRECT_URL'] = $_SERVER['HTTP_REFERER'];
+    if ($embed && !isset($_SESSION['TWITTER_ACCESS_TOKEN']) && (isset($_REQUEST['auth_redirect']) || isset($_SERVER['HTTP_REFERER']))) {
+        $_SESSION['TWITTER_REDIRECT_URL'] = isset($_REQUEST['auth_redirect']) ? $_REQUEST['auth_redirect'] : $_SERVER['HTTP_REFERER'];
     };
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
--- a/web/live_embed_form.php	Thu Mar 22 12:22:53 2012 +0100
+++ b/web/live_embed_form.php	Thu Mar 22 16:25:17 2012 +0100
@@ -58,7 +58,7 @@
   <h1 class="tweetWriterTitle" style="width:300px;" > <?php print $translate->_("EmbedTitle"); ?></h1>
   
   <p style="font-size:12px;width:300px;"><?php print $translate->_("EmbedText"); ?> </p>
-  <textarea cols="10" rows="10"><iframe src="<?php echo(URL_ROOT.$rep); ?>/client.php?embed=true" width="880" height="600" frameborder="0"></iframe><p><a href="<?php echo(URL_ROOT.$rep); ?>/client.php">Source</a> on <a href="<?php echo(URL_ROOT); ?>">PolemicTweet</a>.</p>
+  <textarea cols="10" rows="10"><iframe src="<?php echo(URL_ROOT.$rep); ?>/client.php?embed=true" width="900" height="600" frameborder="0"></iframe><p><a href="<?php echo(URL_ROOT.$rep); ?>/client.php">Source</a> on <a href="<?php echo(URL_ROOT); ?>">PolemicTweet</a>.</p>
   </textarea>
 
   </body>