[Cs-content-commits] SF.net SVN: cs-content:[491] trunk/1.0
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2011-02-01 03:57:02
|
Revision: 491
http://cs-content.svn.sourceforge.net/cs-content/?rev=491&view=rev
Author: crazedsanity
Date: 2011-02-01 03:56:56 +0000 (Tue, 01 Feb 2011)
Log Message:
-----------
The "email_plus" cleaning style leaves colons, updated tests & remove some warnings.
Modified Paths:
--------------
trunk/1.0/__autoload.php
trunk/1.0/cs_globalFunctions.class.php
trunk/1.0/tests/testOfCSGlobalFunctions.php
Modified: trunk/1.0/__autoload.php
===================================================================
--- trunk/1.0/__autoload.php 2011-01-25 02:01:09 UTC (rev 490)
+++ trunk/1.0/__autoload.php 2011-02-01 03:56:56 UTC (rev 491)
@@ -70,11 +70,13 @@
}
#print "<pre>";
#print_r($myHints);
- $tryFile = constant('LIBDIR') .'/'. $myHints[$class];
- if(isset($myHints[$class]) && file_exists($tryFile)) {
- require_once($tryFile);
- if(class_exists($class)) {
- $foundClass=true;
+ if(isset($myHints[$class])) {
+ $tryFile = constant('LIBDIR') .'/'. $myHints[$class];
+ if(file_exists($tryFile)) {
+ require_once($tryFile);
+ if(class_exists($class)) {
+ $foundClass=true;
+ }
}
}
}
Modified: trunk/1.0/cs_globalFunctions.class.php
===================================================================
--- trunk/1.0/cs_globalFunctions.class.php 2011-01-25 02:01:09 UTC (rev 490)
+++ trunk/1.0/cs_globalFunctions.class.php 2011-02-01 03:56:56 UTC (rev 491)
@@ -502,9 +502,10 @@
$cleanThis = preg_replace("/[^A-Za-z0-9\._@-]/","",$cleanThis);
break;
+ case "email_plus":
case "email_plus_spaces":
//Remove all characters that aren't allowed in an email address.
- $cleanThis = preg_replace("/[^A-Za-z0-9\ \._@-]/","",$cleanThis);
+ $cleanThis = preg_replace("/[^A-Za-z0-9\ \._@:-]/","",$cleanThis);
break;
case "phone_fax":
Modified: trunk/1.0/tests/testOfCSGlobalFunctions.php
===================================================================
--- trunk/1.0/tests/testOfCSGlobalFunctions.php 2011-01-25 02:01:09 UTC (rev 490)
+++ trunk/1.0/tests/testOfCSGlobalFunctions.php 2011-02-01 03:56:56 UTC (rev 491)
@@ -52,7 +52,7 @@
'double_entity' => '~`!@#$^&*()_+-=[]\{}|;34:\\\'\<>?,.//\.JuST THIS',
'meta' => '~`!@#\$\^&\*\(\)_\+-=\[\]\\\\{}|;34:\\\\\'\\\<>\?,\.//\\\\"\.JuST THIS',
'email' => '@_-34..JuSTTHIS',
- 'email_plus_spaces' => '@_-34..JuST THIS',
+ 'email_plus_spaces' => '@_-34:..JuST THIS',
'phone_fax' => '()+-34 ',
'integer' => '-34',
'numeric' => '-34',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|