| 11 |
|
|
| 12 |
/** |
/** |
| 13 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
|
* |
|
|
* @return string |
|
| 14 |
*/ |
*/ |
| 15 |
function iedestroyer_help($section) { |
function iedestroyer_help($section) { |
| 16 |
switch ($section) { |
switch ($section) { |
| 29 |
|
|
| 30 |
/** |
/** |
| 31 |
* Implementation of hook_perm() |
* Implementation of hook_perm() |
|
* |
|
|
* @return array Array containing the permissions this module provides |
|
| 32 |
*/ |
*/ |
| 33 |
function iedestroyer_perm() { |
function iedestroyer_perm() { |
| 34 |
return array('administer iedestroyer', 'view iedestroyer'); |
return array('administer iedestroyer', 'view iedestroyer'); |
| 102 |
} |
} |
| 103 |
|
|
| 104 |
/** |
/** |
| 105 |
* Admin configuration page |
* Admin configuration page |
| 106 |
*/ |
* |
| 107 |
|
* @return array A Drupal form |
| 108 |
|
*/ |
| 109 |
function iedestroyer_admin() { |
function iedestroyer_admin() { |
| 110 |
$form = array(); |
$form = array(); |
| 111 |
|
|
| 233 |
/** |
/** |
| 234 |
* Returns list of languages supported on this site |
* Returns list of languages supported on this site |
| 235 |
* |
* |
| 236 |
* @return array |
* @return array All enabled languages, structured like the result of locale_supported_languages(). |
| 237 |
*/ |
*/ |
| 238 |
function iedestroyer_supported_languages() { |
function iedestroyer_supported_languages() { |
| 239 |
if (module_exists('locale')) { |
if (module_exists('locale')) { |
| 263 |
} |
} |
| 264 |
|
|
| 265 |
/** |
/** |
| 266 |
* Render IE Destroyer |
* View IE Destroyer |
| 267 |
|
* |
| 268 |
|
* @param $severity constant IEDESTROYER_SEVERITY_BAR or IEDESTROYER_SEVERITY_BLOCK |
| 269 |
|
* |
| 270 |
|
* @return string |
| 271 |
*/ |
*/ |
| 272 |
function iedestroyer_view($severity) { |
function iedestroyer_view($severity) { |
| 273 |
if (_iedestroyer_should_display_page() == TRUE && $severity == variable_get('iedestroyer_severity', IEDESTROYER_SEVERITY_DISABLED)) { |
if (_iedestroyer_should_display_page() == TRUE && $severity == variable_get('iedestroyer_severity', IEDESTROYER_SEVERITY_DISABLED)) { |
| 410 |
/** |
/** |
| 411 |
* The default message to present to the user |
* The default message to present to the user |
| 412 |
* |
* |
| 413 |
|
* @param $type constant IEDESTROYER_SEVERITY_BAR or IEDESTROYER_SEVERITY_BLOCK, depending |
| 414 |
|
* on whether to return the message for the IE Destroyer bar or the block |
| 415 |
|
* |
| 416 |
* @return string |
* @return string |
| 417 |
*/ |
*/ |
| 418 |
function _iedestroyer_default_message($type) { |
function _iedestroyer_default_message($type) { |