/[drupal]/contributions/modules/views/plugins/views_plugin_argument_validate_numeric.inc
ViewVC logotype

Contents of /contributions/modules/views/plugins/views_plugin_argument_validate_numeric.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Sep 3 19:21:30 2008 UTC (14 months, 3 weeks ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-1, DRUPAL-6--2-0, DRUPAL-6--3-0-ALPHA1, DRUPAL-6--2-0-RC5, DRUPAL-6--2-0-RC4, DRUPAL-6--2-0-RC3, DRUPAL-6--2-0-RC2, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
File MIME type: text/x-php
Major re-organization of handlers. PLEASE NOTE: This drastically affected the Views module API and until modules are updated to match, they will stop working. Efforts have been made to ensure that this won't cause your site to crash, but that's partly up to the individual module as well.
1 <?php
2 // $Id: comment.views_default.inc,v 1.6 2008/06/10 21:30:43 merlinofchaos Exp $
3 /**
4 * @file
5 * Contains the numeric argument validator plugin.
6 */
7
8 /**
9 * Validate whether an argument is numeric or not.
10 *
11 * @ingroup views_argument_validate_plugins
12 */
13 class views_plugin_argument_validate_numeric extends views_plugin_argument_validate {
14 var $option_name = 'validate_argument_numeric';
15
16 /**
17 * Only let users with PHP block visibility permissions set/modify this
18 * validate plugin.
19 */
20 function access() {
21 return !empty($this->argument->definition['numeric']);
22 }
23
24 function validate_argument($argument) {
25 return is_numeric($argument);
26 }
27 }
28

  ViewVC Help
Powered by ViewVC 1.1.2