Difference between revisions of "Talk:Files/EditBufHacks"

From EPrints Documentation
Jump to: navigation, search
m
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
A couple of improvments:
 
A couple of improvments:
  
a - We should add a config to select which archive has this feature and which not, otherwise in multiarchive conf we send email even if not required. Luckly, modifind the global cgi edit_eprints don't create problems .
+
a - We should add a config to select which archive has this feature and which not, otherwise in multiarchive conf we send email even if not required. Luckly, modifing the global cgi edit_eprints don't create problems (even with the modification below). '''It should not be so''', cause $user->get_value( 'onlinemail' ) should abort() (in DataObj.pm) if the field is non existant.
  
 
b- The check:
 
b- The check:
  
<nowiki>my $start_work = EPrints::Utils::tree_to_utf8( $user->render_value("onlinemail") );
+
my $start_work = EPrints::Utils::tree_to_utf8( $user->render_value("onlinemail") );
  if ($start_work eq 'Yes') </nowiki>
+
if ($start_work eq 'Yes')
  
is language dependant and works only for English repositories. I suggest to change it in something like this:
 
  
  <nowiki> my $start_work = $user->{"onlinemail"};
+
is language dependant and works only for English repositories. I suggest to change it in something like this:
  if ($start_work eq 'True') {
+
 
</nowiki>
+
my $start_work = $user->get_value( 'onlinemail' );
 +
if ($start_work eq 'TRUE') {

Latest revision as of 09:44, 3 June 2007

It works.

A couple of improvments:

a - We should add a config to select which archive has this feature and which not, otherwise in multiarchive conf we send email even if not required. Luckly, modifing the global cgi edit_eprints don't create problems (even with the modification below). It should not be so, cause $user->get_value( 'onlinemail' ) should abort() (in DataObj.pm) if the field is non existant.

b- The check:

my $start_work = EPrints::Utils::tree_to_utf8( $user->render_value("onlinemail") );
if ($start_work eq 'Yes')


is language dependant and works only for English repositories. I suggest to change it in something like this:

my $start_work = $user->get_value( 'onlinemail' );
if ($start_work eq 'TRUE') {