Ignore:
Timestamp:
May 7, 2007, 6:07:23 PM (14 years ago)
Author:
Peter Johansson
Message:

moved trac link detection to separate file. refs #178

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/first_page.cc

    r285 r286  
    3232#include "Stats.h"
    3333#include "SVNlog.h"
     34#include "Trac.h"
    3435#include "utility.h"
    3536#include <config.h> // this header file is created by configure
     
    182183      if (conf->trac_ticket().empty())
    183184        hs << mess;
    184       else { // make anchors to trac
    185         char c;
    186         std::stringstream ss(mess);
    187         for (ss.get(c); ss.good(); ss.get(c)) {
    188           if (c=='#') {
    189             int ticket=0;
    190             ss >> ticket;
    191             if (!ss.fail()){
    192               std::stringstream s;
    193               s << ticket;
    194               os << anchor(conf->trac_ticket()+s.str(),"#"+s.str());
    195             }
    196             else {
    197               ss.clear(std::ios::goodbit);
    198               hs << c;
    199             }
    200           }
    201           else
    202             hs << c;
    203         }
     185      else {// make anchors to trac
     186        Trac trac(hs);
     187        trac.print(mess);
    204188      }
    205189
Note: See TracChangeset for help on using the changeset viewer.