Author: sevein
Date: Sat Jan 28 16:32:36 2012
New Revision: 10767

Log:
Revert class rename, I was wrong

Added:
   trunk/lib/validator/QubitValidatorCountable.class.php
      - copied unchanged from r10765, 
trunk/lib/validator/QubitCountableValidator.class.php
Deleted:
   trunk/lib/validator/QubitCountableValidator.class.php
Modified:
   
trunk/apps/qubit/modules/informationobject/actions/multiFileUploadAction.class.php
   
trunk/plugins/sfIsdiahPlugin/modules/sfIsdiahPlugin/actions/indexAction.class.php
   trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/indexAction.class.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/multiFileUploadAction.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/informationobject/actions/multiFileUploadAction.class.php
  Sat Jan 28 16:31:46 2012        (r10766)
+++ 
trunk/apps/qubit/modules/informationobject/actions/multiFileUploadAction.class.php
  Sat Jan 28 16:32:36 2012        (r10767)
@@ -51,7 +51,7 @@
     $this->uploadTmpDir = "{$this->request->getRelativeUrlRoot()}/uploads/tmp";
 
     // Build form
-    $this->form->setValidator('files', new 
QubitCountableValidator(array('required' => true)));
+    $this->form->setValidator('files', new 
QubitValidatorCountable(array('required' => true)));
 
     $this->form->setValidator('title', new sfValidatorString);
     $this->form->setWidget('title', new sfWidgetFormInput);

Copied: trunk/lib/validator/QubitValidatorCountable.class.php (from r10765, 
trunk/lib/validator/QubitCountableValidator.class.php)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/lib/validator/QubitValidatorCountable.class.php       Sat Jan 28 
16:32:36 2012        (r10767, copy of r10765, 
trunk/lib/validator/QubitCountableValidator.class.php)
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class QubitCountableValidator extends sfValidatorBase
+{
+  /**
+   * @see sfValidatorBase
+   */
+  protected function doClean($value)
+  {
+    return $value;
+  }
+
+  /**
+   * @see sfValidatorBase
+   */
+  protected function isEmpty($value)
+  {
+    return 1 > count($value);
+  }
+}

Modified: 
trunk/plugins/sfIsdiahPlugin/modules/sfIsdiahPlugin/actions/indexAction.class.php
==============================================================================
--- 
trunk/plugins/sfIsdiahPlugin/modules/sfIsdiahPlugin/actions/indexAction.class.php
   Sat Jan 28 16:31:46 2012        (r10766)
+++ 
trunk/plugins/sfIsdiahPlugin/modules/sfIsdiahPlugin/actions/indexAction.class.php
   Sat Jan 28 16:32:36 2012        (r10767)
@@ -57,7 +57,7 @@
       $values['identifier'] = $this->resource->identifier;
 
       $validatorSchema->primaryContact = new sfValidatorAnd(array(
-        new QubitCountableValidator,
+        new QubitValidatorCountable,
         new sfValidatorOr(array(
           new sfValidatorSchema(array('city' => new 
sfValidatorString(array('required' => true))), array('allow_extra_fields' => 
true)),
           new sfValidatorSchema(array('countryCode' => new 
sfValidatorString(array('required' => true))), array('allow_extra_fields' => 
true)),

Modified: 
trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/indexAction.class.php
==============================================================================
--- trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/indexAction.class.php 
Sat Jan 28 16:31:46 2012        (r10766)
+++ trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/indexAction.class.php 
Sat Jan 28 16:32:36 2012        (r10767)
@@ -46,7 +46,7 @@
       $validatorSchema = new sfValidatorSchema;
       $values = array();
 
-      $validatorSchema->dates = new QubitCountableValidator(array(
+      $validatorSchema->dates = new QubitValidatorCountable(array(
         'required' => true), array(
         'required' => $this->context->i18n->__('This archival description 
requires at least one date.')));
       $values['dates'] = $this->resource->getDates();

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to