[pLog-svn] r4961 - plog/branches/lifetype-1.2/class/data/validator/rules
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Sat Mar 3 18:27:01 EST 2007
Author: jondaley
Date: 2007-03-03 18:27:01 -0500 (Sat, 03 Mar 2007)
New Revision: 4961
Modified:
plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php
Log:
configure some options for how we want it, and fix one bug. I'll email the author with this change
Modified: plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php 2007-03-03 23:25:04 UTC (rev 4960)
+++ plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php 2007-03-03 23:27:01 UTC (rev 4961)
@@ -67,7 +67,11 @@
/* Set up default options */
$options = array_merge(array(/**/
- 'AllowedProtocols' => array(), /* array('http', 'https', etc...) always lcase! */
+ /* array('http', 'https', etc.) always lcase! */
+ 'AllowedProtocols' =>
+ array('http', 'https', 'ftp', 'mailto',
+ 'file', 'news', 'gopher', 'telnet',
+ 'nntp'),
'AllowBracks' => false, /* Allow square brackets in the query string ? */
'Protocols' => array('http', 'https', 'ftp', 'mailto', 'file', 'news', 'gopher', 'telnet', 'nntp'), /**/
'AssumeProtocol' => false, /**/
@@ -75,7 +79,7 @@
/* Setup default values for $options['Require]*/
@ $options['Require'] = array_merge(array(/**/
- 'Protocol' => false, /**/
+ 'Protocol' => true, /**/
'User' => false, /**/
'Password' => false, /**/
'Server' => true, /**/
@@ -371,7 +375,7 @@
$tmp = preg_replace('/[^a-z0-9]$/', '', $tmp);
- if ($tmp != $serverParts[$i])
+ if ($serverParts[$i] == '' || $tmp != $serverParts[$i])
{
if ($tmp != '')
$serverParts[$i] = $tmp;
More information about the pLog-svn
mailing list