anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00141
[Branch ~uws/anewt/anewt.uws] Rev 1733: [validator] Remove no longer usefule AnewtValidatorChoice
------------------------------------------------------------
revno: 1733
author: Sander van Schouwenburg <sander@xxxxxxxxxxxxx>
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sun 2009-08-02 22:30:55 +0200
message:
[validator] Remove no longer usefule AnewtValidatorChoice
It's no longer necessary, since setting disabled options is
no longer possible anyway.
removed:
validator/choice.lib.php
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== removed file 'validator/choice.lib.php'
--- validator/choice.lib.php 2009-01-18 00:36:24 +0000
+++ validator/choice.lib.php 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * Anewt, Almost No Effort Web Toolkit, validator module
- *
- * This code is copyrighted and distributed under the terms of the GNU LGPL.
- * See the README file for more information.
- */
-
-/**
- * Validator to check if a choice control has valid values.
- *
- * FIXME: currently only works for single select choice controls.
- */
-class AnewtValidatorChoice extends AnewtValidator
-{
- var $_choice_control; /**< \private The choice form control to check. */
-
- /**
- * Create a new AnewtValidatorChoice instance.
- *
- * \param $choice_control
- * The choice control to check.
- */
- function __construct($choice_control)
- {
- assert('$choice_control instanceof AnewtFormControlChoice;');
-
- parent::__construct();
-
- $this->_choice_control = $choice_control;
- }
-
- function is_valid($value)
- {
- return !$this->_choice_control->_options[$value]->get('disabled');
- }
-}
-
-?>