Last change
on this file since 58352 was
58352,
checked in by marcimat@…, 9 years ago
|
Mise à jour de l'url pour redmine
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | |
---|
4 | // trac SVN |
---|
5 | # @define('_URL_BROWSER_TRAC', 'http://trac.rezo.net/trac/spip/browser/spip/'); |
---|
6 | |
---|
7 | // trac GIT |
---|
8 | #@define('_URL_BROWSER_TRAC', 'http://core.spip.org/trac/spip/browser/@file@?rev=spip-2.1'); |
---|
9 | |
---|
10 | // redmine SVN (trunk) |
---|
11 | @define('_URL_BROWSER_TRAC', 'http://core.spip.org/projects/spip/repository/entry/spip/@file@'); |
---|
12 | |
---|
13 | // redmine SVN (branche 2.1) |
---|
14 | #@define('_URL_BROWSER_TRAC', 'http://core.spip.org/projects/spip/repository/entry/branches/spip-2.1/@file@'); |
---|
15 | |
---|
16 | /* |
---|
17 | * Un raccourci pour des chemins vers de trac |
---|
18 | * [?ecrire/inc_version.php#trac] |
---|
19 | * [?ecrire/inc_version.php#tracNNN] // NNN = numero de ligne |
---|
20 | * |
---|
21 | */ |
---|
22 | if (!function_exists('glossaire_trac')) { |
---|
23 | function glossaire_trac($texte, $id=0) { |
---|
24 | // si @file@ present dans le define, on remplace par le texte |
---|
25 | if (false !== strpos(_URL_BROWSER_TRAC, '@file@')) { |
---|
26 | return str_replace('@file@', $texte, _URL_BROWSER_TRAC) . ($id ? '#L'.$id : ''); |
---|
27 | } |
---|
28 | |
---|
29 | // sinon, on met bout a bout comme avant... |
---|
30 | return _URL_BROWSER_TRAC . $texte . ($id ? '#L'.$id : ''); |
---|
31 | } |
---|
32 | } |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.