DrupalBin
Submit Code
About
Recent Posts
Code
3 min 8 sec
ago
css path
1 hour 47 min
ago
Fix for Code
5 hours 47 min
ago
Fix for Code
5 hours 53 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for Code
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
/** * Implementation of hook_requirements(). */ function hs_views_taxonomy_requirements($phase) { $requirements = array(); if ($phase == 'runtime') { $pattern = <<<EOT function _views_build_filters_form(\$view) { // When the form is retrieved through an AJAX callback, the cache hasn't // been loaded yet. The cache is necesssary for _views_get_filters(). views_load_cache(); EOT; $views_with_patch_257004 = preg_match('#'. preg_quote($pattern) .'#m', file_get_contents(drupal_get_path('module', 'views') .'/views.module')); if ($views_with_patch_257004) { $value = t('The Views module is new enough.'); $description = ''; $severity = REQUIREMENT_OK; } else { $value = t('The Views module is outdated.'); $description = t("The version of Views that you have installed is either older than May 11, 2008, or doesn't have the obligatory patch applied. Please apply the <a href=\"!patch_url\">patch</a> or update to a newer version of the Views module!" ); $severity = REQUIREMENT_ERROR; } $requirements['hs_views_taxonomy'] = array( 'title' => t('Hierarchical Select Views Taxonomy'), 'value' => $value, 'description' => $description, 'severity' => $severity, ); } return $requirements; }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.