Sub DoOtherRequest { ... &DoTrimUsers(); + } elsif ($action eq "authorcontrib") { + &DoAuthorContrib($id); sub GetHtmlRcLine { ... $html .= ". . . . . $author\n"; + $html .= ' | ' . &ScriptLink("action=authorcontrib&id=$userName", Ts("Contrib")) ; return $html; sub DoAuthorContrib { + my ($id, $author) = @_; + my ($status, $data, $fileData, $oldFileData); + my (@full, $full, @fullrc, @fullnewrc); + my (@firstTs, $firstTs, @Author); + my ($i, $j); + + print &GetHeader("", Ts('%s contributions', $id),""); + ($status, $fileData) = &ReadFile($RcFile); + @fullnewrc = split(/\n/, $fileData); + ($status, $oldFileData) = &ReadFile($RcOldFile); + @fullrc = split(/\n/, $oldFileData); + @full = (@fullrc, @fullnewrc); + ($i, $j) =0; + if (@full > 0) { + for ($i .. $#full) { + $j = $#full -$i; + ++$i; + @Author = split(/$FS2/, $full[$j]); + if ($id eq $Author[3]) { + @firstTs = split(/$FS3/, $full[$j]); + print &TimeToText($firstTs[0]). ' ' . &GetPageLink($firstTs[1]) , "<br>\n"; + } + } + } + print &GetCommonFooter(); +}
To distinguish according to ID Number:
sub DoContributions { my ($id, $author) = @_; my (@userAuthor, $userAuthor, @userName, $userName, @userID, $userID); my ($status, $fileData, $oldFileData); my ($firstTs, @firstTs, @firstAuthor, @firstTime, $firstTime); my ($full, @full, @fullrc, @fullnewrc); my ($i, $j, @i, @j); (@userAuthor) = split('&', $ENV{QUERY_STRING}); (@userName) = split ('=', $userAuthor[1]); (@userID) = split ('=', $userAuthor[2]); print &GetHeader('', Ts('Contributions: %s', $userName[1]),''); ($status, $fileData) = &ReadFile($RcFile); @fullnewrc = split(/\n/, $fileData); ($status, $oldFileData) = &ReadFile($RcOldFile); @fullrc = split(/\n/, $oldFileData); @full = (@fullrc, @fullnewrc); ($i, $j) =0; print '<ol>'; if (@full > 0) { # Only false if no lines in file for ($i .. $#full) { $j = $#full -$i; ++$i; @firstAuthor = split(/$FS2/, $full[$j]); if ($userName[1] eq $firstAuthor[$#j-2] and $userID[1] eq $firstAuthor[$#j]) { @firstTs = split(/$FS3/, $full[$j]); ## if ($firstAuthor[$#j-2] eq $firstAuthor[3]) { ## line pattern ok, not corrupt print '<li><nobr>' ## ' [' . $firstAuthor[$#j] . '] ' . $firstAuthor[$#j-2] . ' (' . &TimeToText($firstTs[0]) . ') ' . &GetPageOrEditAnchoredLink($firstTs[1]) . '</nobr><br>'; ## } } } } print '</ol>'; print '</div>' . &GetCommonFooter(); }
--JuanmaMP