[Kos-cvs] kos-web/include toc.php,1.11,1.12
thomas at kos.enix.org
thomas at kos.enix.org
Wed Jan 5 22:44:30 CET 2005
- Previous message: [Kos-cvs] kos-web/include en.php,1.4,1.5
- Next message: [Kos-cvs]
kos-web/contents intro_en.i, 1.2, 1.3 intro_fr.i, 1.1.1.1,
1.2 snapshots_bin_en.i, 1.10, 1.11 snapshots_bin_fr.i, 1.10,
1.11 snapshots_src_en.i, 1.11, 1.12 snapshots_src_fr.i, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/kos/kos-web/include
In directory the-doors:/tmp/cvs-serv2567
Modified Files:
toc.php
Log Message:
Gestion correcte du #machinchose dans le menu.
Index: toc.php
===================================================================
RCS file: /var/cvs/kos/kos-web/include/toc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- toc.php 30 Dec 2004 01:01:29 -0000 1.11
+++ toc.php 5 Jan 2005 21:44:28 -0000 1.12
@@ -23,10 +23,20 @@
global $lang;
global $topsrcdir;
+ // Split the before-# and the after-# part, because the after-# part
+ // must be after the ?lang=$lang part of the URL
+ $url_array = split("#", $url);
+
+ // If there's an after-# part
+ if($url_array[1])
+ $anchor = "#" . $url_array[1];
+
+ $url = $url_array[0];
+
if($current == $toc_entry)
- echo " <a class=\"current_topic\" href=\"" . $topsrcdir . "/$url?lang=$lang\">$title</a><br/>\n";
+ echo " <a class=\"current_topic\" href=\"" . $topsrcdir . "/$url?lang=$lang$anchor\">$title</a><br/>\n";
else
- echo " <a class=\"other_topic\" href=\"" . $topsrcdir . "/$url?lang=$lang\">$title</a><br/>\n";
+ echo " <a class=\"other_topic\" href=\"" . $topsrcdir . "/$url?lang=$lang$anchor\">$title</a><br/>\n";
}
- Previous message: [Kos-cvs] kos-web/include en.php,1.4,1.5
- Next message: [Kos-cvs]
kos-web/contents intro_en.i, 1.2, 1.3 intro_fr.i, 1.1.1.1,
1.2 snapshots_bin_en.i, 1.10, 1.11 snapshots_bin_fr.i, 1.10,
1.11 snapshots_src_en.i, 1.11, 1.12 snapshots_src_fr.i, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Kos-cvs
mailing list