[Rt-commit] r10579 - in rt/branches/3.999-DANGEROUS: lib/RT lib/RT/Interface lib/RT/Model
jesse at bestpractical.com
jesse at bestpractical.com
Tue Jan 29 23:01:10 EST 2008
Author: jesse
Date: Tue Jan 29 23:01:10 2008
New Revision: 10579
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
Log:
r75905 at pinglin: jesse | 2008-01-29 23:00:24 -0500
* attributes at least created
Modified: rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm Tue Jan 29 23:01:10 2008
@@ -336,7 +336,7 @@
return ( $self->parse_address_from_header($From) );
}
-=head2 ParseErrorsToAddressFromHead
+=head2 parse_errors_to_address_from_head
Takes a MIME::Header object. Return a single value : user at host
of the From (evaluated in order of Errors-To:,Reply-To:, From:, Sender)
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm Tue Jan 29 23:01:10 2008
@@ -77,7 +77,7 @@
&MailError
&ParseCcAddressesFromHead
&ParseSenderAddressFromHead
- &ParseErrorsToAddressFromHead
+ &parse_errors_to_address_from_head
&parse_address_from_header
&gateway);
@@ -923,7 +923,7 @@
return ( undef, undef );
}
-=head2 ParseErrorsToAddressFromHead HEAD
+=head2 parse_errors_to_address_from_head HEAD
Takes a MIME::Header object. Return a single value : user at host
of the From (evaluated in order of Return-path:,Errors-To:,Reply-To:,
@@ -1252,7 +1252,7 @@
$parser->_post_process_new_entity;
my $head = $Message->head;
- my $ErrorsTo = ParseErrorsToAddressFromHead($head);
+ my $ErrorsTo = parse_errors_to_address_from_head($head);
my $MessageId = $head->get('Message-ID')
|| "<no-message-id-"
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm Tue Jan 29 23:01:10 2008
@@ -107,7 +107,7 @@
};
-=head2 LookupObjectRight { object_type => undef, object_id => undef, name => undef, Right => { create, update, delete, display } }
+=head2 Lookupobjectright { object_type => undef, object_id => undef, name => undef, right => { create, update, delete, display } }
Returns the right that the user needs to have on this attribute's object to perform the related attribute operation. Returns "allow" if the right is otherwise unspecified.
@@ -118,7 +118,7 @@
my %args = (
object_type => undef,
object_id => undef,
- Right => undef,
+ right => undef,
name => undef,
@_
);
@@ -130,8 +130,8 @@
return ('allow') unless ( $PERSONAL_ACL_MAP->{ $args{'name'} } );
return ('allow')
unless (
- $PERSONAL_ACL_MAP->{ $args{'name'} }->{ $args{'Right'} } );
- return ( $PERSONAL_ACL_MAP->{ $args{'name'} }->{ $args{'Right'} } );
+ $PERSONAL_ACL_MAP->{ $args{'name'} }->{ $args{'right'} } );
+ return ( $PERSONAL_ACL_MAP->{ $args{'name'} }->{ $args{'right'} } );
}
@@ -139,8 +139,8 @@
else {
return ('allow') unless ( $ACL_MAP->{ $args{'name'} } );
return ('allow')
- unless ( $ACL_MAP->{ $args{'name'} }->{ $args{'Right'} } );
- return ( $ACL_MAP->{ $args{'name'} }->{ $args{'Right'} } );
+ unless ( $ACL_MAP->{ $args{'name'} }->{ $args{'right'} } );
+ return ( $ACL_MAP->{ $args{'name'} }->{ $args{'right'} } );
}
}
@@ -154,7 +154,7 @@
varchar(64) 'object_type'.
int(11) 'object_id'.
-You may pass a C<Object> instead of C<object_type> and C<object_id>.
+You may pass a C<object> instead of C<object_type> and C<object_id>.
=cut
@@ -165,15 +165,15 @@
description => '',
content => '',
content_type => '',
- Object => undef,
+ object => undef,
@_
);
- if ( $args{Object} and UNIVERSAL::can( $args{Object}, 'id' ) ) {
- $args{object_type} = ref( $args{Object} );
- $args{object_id} = $args{Object}->id;
+ if ( $args{object} and UNIVERSAL::can( $args{object}, 'id' ) ) {
+ $args{object_type} = ref( $args{object} );
+ $args{object_id} = $args{object}->id;
} else {
- return ( 0, _( "Required parameter '%1' not specified", 'Object' ) );
+ return ( 0, _( "Required parameter '%1' not specified", 'object' ) );
}
@@ -181,7 +181,7 @@
# object_right is the right that the user has to have on the object for them to have $right on this attribute
my $object_right = $self->lookup_object_right(
- Right => 'create',
+ right => 'create',
object_id => $args{'object_id'},
object_type => $args{'object_type'},
name => $args{'name'}
@@ -195,8 +195,8 @@
elsif (
!$self->current_user->has_right(
- Object => $args{Object},
- Right => $object_right
+ object => $args{object},
+ right => $object_right
)
)
{
@@ -224,18 +224,18 @@
}
-# {{{ sub load_by_nameAndObject
+# {{{ sub load_by_nameAndobject
-=head2 load_by_nameAndObject (Object => OBJECT, name => name)
+=head2 load_by_nameAndobject (object => OBJECT, name => name)
-Loads the Attribute named name for Object OBJECT.
+Loads the Attribute named name for object OBJECT.
=cut
sub load_by_name_and_object {
my $self = shift;
my %args = (
- Object => undef,
+ object => undef,
name => undef,
@_,
);
@@ -243,8 +243,8 @@
return (
$self->load_by_cols(
name => $args{'name'},
- object_type => ref( $args{'Object'} ),
- object_id => $args{'Object'}->id,
+ object_type => ref( $args{'object'} ),
+ object_id => $args{'object'}->id,
)
);
@@ -445,7 +445,7 @@
# object_right is the right that the user has to have on the object for them to have $right on this attribute
my $object_right = $self->lookup_object_right(
- Right => $right,
+ right => $right,
object_id => $self->__value('object_id'),
object_type => $self->__value('object_type'),
name => $self->__value('name')
@@ -456,8 +456,8 @@
return (1)
if (
$self->current_user->has_right(
- Object => $self->object,
- Right => $object_right
+ object => $self->object,
+ right => $object_right
)
);
return (0);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm Tue Jan 29 23:01:10 2008
@@ -165,16 +165,16 @@
my %args = (
name => undef,
description => undef,
- Content => undef,
+ content => undef,
@_
);
my $attr = RT::Model::Attribute->new;
my ( $id, $msg ) = $attr->create(
- Object => $self,
+ object => $self,
name => $args{'name'},
description => $args{'description'},
- Content => $args{'Content'}
+ content => $args{'content'}
);
# XXX TODO: Why won't redo_search work here?
@@ -205,7 +205,7 @@
$_->delete foreach @AttributeObjs;
$AttributeObj->set_description( $args{'description'} );
- $AttributeObj->set_content( $args{'Content'} );
+ $AttributeObj->set_content( $args{'content'} );
$self->attributes->redo_search;
return 1;
More information about the Rt-commit
mailing list