[pLog-svn] r6687 - plog/branches/lifetype-1.2/class/data/validator

Jon Daley plogworld at jon.limedaley.com
Tue Jul 1 08:30:47 EDT 2008


 	That's much better, thanks.

On Tue, 1 Jul 2008, mark at devel.lifetype.net wrote:

> Author: mark
> Date: 2008-07-01 01:37:16 -0400 (Tue, 01 Jul 2008)
> New Revision: 6687
>
> Modified:
>   plog/branches/lifetype-1.2/class/data/validator/blognamevalidator.class.php
> Log:
> 1. nohtmlrule.class.php should be include before use it.
>
> 2. Only use domainize() to validate the blogname if subdomain_base_url use {blogname}
>
> Modified: plog/branches/lifetype-1.2/class/data/validator/blognamevalidator.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/data/validator/blognamevalidator.class.php	2008-07-01 05:26:43 UTC (rev 6686)
> +++ plog/branches/lifetype-1.2/class/data/validator/blognamevalidator.class.php	2008-07-01 05:37:16 UTC (rev 6687)
> @@ -2,6 +2,7 @@
>
> 	lt_include( PLOG_CLASS_PATH."class/data/validator/validator.class.php" );
> 	lt_include( PLOG_CLASS_PATH."class/data/validator/rules/nonemptyrule.class.php" );
> +	lt_include( PLOG_CLASS_PATH."class/data/validator/rules/nohtmlrule.class.php" );
> 	lt_include( PLOG_CLASS_PATH."class/data/validator/rules/filteredpatternsrule.class.php" );
> 	lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
>
> @@ -45,10 +46,14 @@
> 			lt_include( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
> 			lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
>
> -			if( Subdomains::getSubdomainsEnabled() )
> -				return(( Textfilter::domainize( Textfilter::filterAllHTML( $value ))) != "" );
> -			else
> -				return(( Textfilter::filterAllHTML( $value )) != "" );
> +			if( Subdomains::getSubdomainsEnabled() ) {
> +				$config =& Config::getConfig();
> +				if( strstr( $config->getValue( "subdomains_base_url" ), '{blogname}' ) ) {
> +					return( ( Textfilter::domainize( $value ) ) != "" );
> +				}
> +			}
> +
> +			return true;
> 		}
>     }
> ?>
> \ No newline at end of file
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com
~~
Eamus, O tibialia rubentia!
-- Latin for All Occasions


More information about the pLog-svn mailing list