forked from mcantelon/drupal-sopa-blackout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsopa.module
More file actions
35 lines (27 loc) · 756 Bytes
/
sopa.module
File metadata and controls
35 lines (27 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Onerous hackin' time!
*/
$on_admin_page = strpos($_SERVER['REQUEST_URI'], 'admin') === 1;
$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') {
print file_get_contents(dirname(__FILE__) .'/template/sopa.html');
exit();
}
}
/**
* 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;
}
return $output;
}