Author: voxus
Date: 2006-06-25 23:59:51 +0400 (Sun, 25 Jun 2006)
New Revision: 1801
Modified:
trunk/core/Form/Primitives/PrimitiveString.class.php
Log:
* cosmetics
Modified: trunk/core/Form/Primitives/PrimitiveString.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveString.class.php 2006-06-25 19:52:02 UTC (rev 1800)
+++ trunk/core/Form/Primitives/PrimitiveString.class.php 2006-06-25 19:59:51 UTC (rev 1801)
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- * Copyright (C) 2004-2005 by Konstantin V. Arkhipov, Sveta Smirnova *
+ * Copyright (C) 2004-2006 by Konstantin V. Arkhipov, Sveta Smirnova *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -17,7 +17,7 @@
{
private $pattern = null;
- // hint: /^[^@]*\w+@[\w|\.|\-]+\.\w{2,6}$/
+ // mail hint: /^[^@]*\w+@[\w|\.|\-]+\.\w{2,6}$/
public function setAllowedPattern($pattern)
{
$this->pattern = $pattern;
@@ -30,10 +30,10 @@
if (!BasePrimitive::import($scope))
return null;
- if (is_string($scope[$this->name]) && !empty($scope[$this->name]) &&
- !($this->max && mb_strlen($scope[$this->name]) > $this->max) &&
- !($this->min && mb_strlen($scope[$this->name]) < $this->min) &&
- (!$this->pattern || preg_match($this->pattern, $scope[$this->name]))
+ if (is_string($scope[$this->name]) && !empty($scope[$this->name])
+ && !($this->max && mb_strlen($scope[$this->name]) > $this->max)
+ && !($this->min && mb_strlen($scope[$this->name]) < $this->min)
+ && (!$this->pattern || preg_match($this->pattern, $scope[$this->name]))
) {
$this->value = (string) $scope[$this->name];
@@ -45,4 +45,4 @@
return false;
}
}
-?>
+?>
\ No newline at end of file
Received on Sun Jun 25 2006 - 23:59:52 MSD
This archive was generated by hypermail 2.2.0 : Sat Oct 27 2007 - 20:15:47 MSD