Permalink
Browse files

Merge pull request #3 from basekamp/master

Awesome stuff... thanks!
  • Loading branch information...
2 parents d93bfb2 + 301f003 commit 99ab5d5b544095fc5edbcaa0a6a7055293d9cf6e @mcantelon committed Jan 18, 2012
Showing with 7 additions and 9 deletions.
  1. +3 −3 README.txt
  2. +1 −1 sopa.info
  3. +3 −5 sopa.module
View
@@ -13,9 +13,9 @@ will only be able to access URLs starting with "user" and "admin"
without seeing the SOPA blackout page. After January 18 your site will
be back to normal.
-Developed for/tested with Drupal 6 or Drupal 7. If using it with Drupal 7
-just change "6.x" to "7.x" in the sopa.info file and you should be good
-to go.
+Developed for/tested with Drupal 6 or Drupal 7:
+* D6: checkout 6.x-1.x
+* D7: checkout 7.x-1.x
Inspired by WP-SOPA-Blackout:
View
@@ -1,5 +1,5 @@
name = Sopa Blackout
description = Black out your site on Jan 18, 2012 in protest of SOPA.
-core = "6.x"
+core = "7.x"
project = "sopa"
View
@@ -8,6 +8,9 @@ $on_user_page = strpos($_SERVER['REQUEST_URI'], 'user') === 1;
if (isset($_GET['sopa_test']) || !($on_admin_page || $on_user_page)) {
if (isset($_GET['sopa_test']) || date('Y-m-d') == '2012-01-18') {
+ // Preserve SE ranking. @see http://drupal.org/node/1405892#comment-5481540
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
+ header('Retry-After: Thu, 19 Jan 2012 00:00:00 GMT');
print file_get_contents(dirname(__FILE__) .'/template/sopa.html');
exit();
}
@@ -17,15 +20,10 @@ if (isset($_GET['sopa_test']) || !($on_admin_page || $on_user_page)) {
* Implementation of hook_help().
*/
function sopa_help($section = '') {
-
$output= '';
switch ($section) {
-
case "admin/modules#description":
- $output = t("Block out your site on January 18, 2012.");
- break;
-
case "admin/help":
$output = t("Block out your site on January 18, 2012.");
break;

0 comments on commit 99ab5d5

Please sign in to comment.