Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/85394
Change subject: Remove mobileRedirect.php
......................................................................
Remove mobileRedirect.php
Seems to be leftovers from the ruby days, MF has code to do this
Change-Id: I38f802cc4daeb1d0551d3580ac02db7f908e2366
---
D w/mobileRedirect.php
1 file changed, 0 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/94/85394/1
diff --git a/w/mobileRedirect.php b/w/mobileRedirect.php
deleted file mode 100644
index 833b7cb..0000000
--- a/w/mobileRedirect.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-// Used to set a 3-year-long cookie to stop mobile redirects from happening
-// Created by Hampton Catlin
-if($_GET['expires_in_days']) {
- $date_of_expiry = time() + ( intval( $_GET['expires_in_days'] ) * 60 *
60 * 24 );
-} else {
- $date_of_expiry = 0;
-}
-
-setcookie( "stopMobileRedirect", "true", $date_of_expiry, "/");
-$redir_to = str_replace( "\n", '', $_GET['to'] );
-
-if ( !preg_match( "%^".preg_quote("http://".$_SERVER['SERVER_NAME']."/")."%",
$redir_to ) ) {
- header("HTTP/1.1 403 Forbidden");
- die( 'Invalid target' );
-}
-
-header( 'Location: ' . $redir_to );
--
To view, visit https://gerrit.wikimedia.org/r/85394
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I38f802cc4daeb1d0551d3580ac02db7f908e2366
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits