Bug 534514 - Remove cookies if consent have not been given
Signed-off-by: Eric Poirier <eric.poirier@eclipse-foundation.org>
diff --git a/content/en_index.php b/content/en_index.php
index 0077706..9a1fe1a 100755
--- a/content/en_index.php
+++ b/content/en_index.php
@@ -172,23 +172,25 @@
<?php endforeach; ?>
</div>
<div class="col-md-6">
- <h3 class="news-item-twitter-title">#EclipseOxygen</h3>
- <div class="news-item-twitter">
- <a class="twitter-timeline"
- data-dnt="true"
- href="https://twitter.com/hashtag/EclipseOxygen"
- data-widget-id="859841735580692481"
- data-chrome="noheader transparent noscrollbar nofooter"
- data-link-color="#69c1bd"
- data-show-replies="false"
- data-height="300"
- data-theme="dark">#EclipseOxygen Tweets</a>
- <script>
- !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
- if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
- fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
- </script>
- </div>
+ <?php if ($Theme->hasCookieConsent()): ?>
+ <h3 class="news-item-twitter-title">#EclipseOxygen</h3>
+ <div class="news-item-twitter">
+ <a class="twitter-timeline"
+ data-dnt="true"
+ href="https://twitter.com/hashtag/EclipseOxygen"
+ data-widget-id="859841735580692481"
+ data-chrome="noheader transparent noscrollbar nofooter"
+ data-link-color="#69c1bd"
+ data-show-replies="false"
+ data-height="300"
+ data-theme="dark">#EclipseOxygen Tweets</a>
+ <script>
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
+ if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
+ fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
+ </script>
+ </div>
+ <?php endif; ?>
</div>
</div>
</div>
diff --git a/index.php b/index.php
index 145cc88..4aec3c9 100644
--- a/index.php
+++ b/index.php
@@ -31,18 +31,6 @@
$oxygen_content_json = dirname(__FILE__) . "/oxygen-content.json";
- #redirect the user if he already saw the oxygen landing page
- $uri = explode("/", $_SERVER['REQUEST_URI']);
- if (strtolower($uri[1]) != 'oxygen') {
- if (!isset($_COOKIE['eclipse_oxygen'])){
- setcookie('eclipse_oxygen', 'eclipse_oxygen', time()+3600*24*365, "/", "eclipse.org");
- }
- else {
- header('Location: /home/index.php', TRUE, 302);
- exit();
- }
- }
-
// Custom theme variables
$variables = array();
$variables['hide_breadcrumbs'] = TRUE;