[Jifty-commit] r3730 - in jifty/trunk: . lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jul 28 20:31:49 EDT 2007
Author: jesse
Date: Sat Jul 28 20:31:47 2007
New Revision: 3730
Modified:
jifty/trunk/ (props changed)
jifty/trunk/META.yml
jifty/trunk/lib/Jifty/Action.pm
jifty/trunk/lib/Jifty/Manual/Glossary.pod
Log:
r64900 at pinglin: jesse | 2007-07-28 18:18:31 -0500
* Moniker bulletproofing. Suggested by Mikko Lapasti
Modified: jifty/trunk/META.yml
==============================================================================
--- jifty/trunk/META.yml (original)
+++ jifty/trunk/META.yml Sat Jul 28 20:31:47 2007
@@ -65,6 +65,7 @@
Email::MIME::ContentType: 0
Email::MIME::CreateHTML: 0
Email::MIME::Creator: 0
+ Email::MIME::Modifier: 0
Email::Send: 1.99_01
Email::Simple: 0
Email::Simple::Creator: 0
@@ -97,6 +98,7 @@
Module::Refresh: 0
Module::ScanDeps: 0
Object::Declare: 0.13
+ PadWalker: 0
Params::Validate: 0
Pod::Simple: 0
SQL::ReservedWords: 0
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Sat Jul 28 20:31:47 2007
@@ -119,6 +119,26 @@
$self->_get_current_user();
}
+
+ if ( $args{'moniker'} ) {
+ if ( $args{'moniker'} =~ /[\;]/ ) {
+ $args{'moniker'} =~ s/[\;]/_/g;
+ $self->log->warn(
+ "Moniker @{[$args{'moniker'}]} contains invalid characters. It should not contain any ';' characters. "
+ . "It has been autocorrected, but you should correct your code"
+ );
+ }
+ if ( $args{'moniker'} =~ /^\d/ ) {
+ $args{'moniker'} = "fixup-" . $args{'moniker'};
+ $self->log->warn(
+ "Moniker @{[$args{'moniker'}]} contains invalid characters. It can not begin with a digit. "
+ . "It has been autocorrected, but you should correct your code"
+ );
+
+ }
+ }
+
+
$self->moniker($args{'moniker'} || $self->_generate_moniker);
$self->order($args{'order'});
Modified: jifty/trunk/lib/Jifty/Manual/Glossary.pod
==============================================================================
--- jifty/trunk/lib/Jifty/Manual/Glossary.pod (original)
+++ jifty/trunk/lib/Jifty/Manual/Glossary.pod Sat Jul 28 20:31:47 2007
@@ -102,13 +102,15 @@
=item moniker
-Every instance of a L<Jifty::Action> has a B<moniker>. A moniker is
-an arbitrary-length nonempty string containing no semicolons.
-Monikers serve as identifiers for actions, to associate arguments with
-actions and to access specific actions "by name". Monikers need not
-be globally unique, but they must be unique within a single request.
+Every instance of a L<Jifty::Action> has a B<moniker>. Monikers
+serve as identifiers for actions, to associate arguments with actions
+and to access specific actions "by name". Monikers need not be
+globally unique, but they must be unique within a single request.
Monikers have no semantic meaning. See L<Jifty::Action/monikers>
+A moniker is an arbitrary-length nonempty string containing no
+semicolons. It may not begin with a digit.
+
=item parameter
A B<parameter> is a named parameter to an L</action>. Jifty generally renders
More information about the Jifty-commit
mailing list