Tags:
create new tag
view all tags

Question

Hi - I have an ActionTracker question.

Currently, to receive email notification, users must either enter their Wikiname or an alternate email address. Their Wikiname gets automagically expanded to Main.Wikiname.

Since I'm only using ActionTracker in my Main web, I'd like to eliminate users having deal with the "Main." appendage.

I found that commenting out line 151 of Action.pm answers part one of this question. Wikinames no longer get automatically expanded:

# line 151 # $n = _canonicalName( $n );

Next, looking at the "sub _getMailAddress" portion of the ActionNotify.pm script, does anyone know what needs to be edited to get the script to know it is always dealing with the Main web?

Thanks !

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- SamAbrams - 02 Jan 2004

Answer

Sam, I think this can be done pretty cleanly. In Action.pm there's a function _canonicalName that has the lines:

      if ( $who !~ /\./o ) {
   $who = "$mainweb.$who";
      }
This is what expands user ids to include the web name. You can try commenting them out, though without a careful inspection I couldn't tell what impact this might have elsewhere - though I'm pretty sure _getMailAddress in ActionNotify.pm would also require changes:
    } elsif ( $who =~ m/^$TWiki::wikiWordRegex$/o ) {
      # A legal topic wikiname
      $who = ActionTrackerPlugin::Action::_canonicalName( $who );
      $addresses = _getMailAddress( $who, $mailAddress );
Changing this to:
    } elsif ( $who =~ m/^$TWiki::wikiWordRegex$/o ) {
      # A legal topic wikiname
      $addresses = _getMailAddress( TWiki::Func::getMainWebName() . $who, $mailAddress );
ought to do it. Note that this would continue to work for everyone else as well. Let me know how you get on!

-- CrawfordCurrie - 03 Feb 2004

You rock ! Okay, I should have feedback for you over the next few days.

-- SamAbrams - 18 Feb 2004

Okay, I applied your mods to the latest bugfix release. This is the error message I get:

[dreamhost]$ ./actionnotify.cgi 'open'

Undefined subroutine &TWiki::Func::getMainWebName called at ../lib/TWiki/Plugins /ActionTrackerPlugin/ActionNotify.pm line 261.

-- SamAbrams - 18 Feb 2004

Ah, bums. getMainWebname not getMainWebName

-- CrawfordCurrie - 22 Feb 2004

Okay, now I'm getting the following error:

[dreamhost]$ ./actionnotify.cgi 'open'

Deep recursion on subroutine "ActionTrackerPlugin::ActionNotify::_getMailAddress " at ../lib/TWiki/Plugins/ActionTrackerPlugin/ActionNotify.pm line 261.

Killed

-- SamAbrams - 23 Feb 2004

Oh, doublebums. Not as simple as I thought. The recursion has to be blocked. I'll get back to you.

-- CrawfordCurrie - 25 Feb 2004

I think we have a pretty good solution to the problem. See Plugins.ActionTrackerInput. This is my first attempt at sharing a complete solution to a problem. I am not sure I placed our results in the right place!

-- AlainMivilleDeChene - 12 Mar 2004

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2004-06-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.