From 04b88a4a140aa19c355ffb9025dc3c9fb19c7c4e Mon Sep 17 00:00:00 2001 From: Christian Lefebvre <christian_lefebvre@laposte.net> Date: Sun, 27 Aug 2006 21:05:46 +0000 Subject: [PATCH] liste des serveurs ortho distante (et surchargeable) --- ecrire/inc/ortho.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ecrire/inc/ortho.php b/ecrire/inc/ortho.php index a4857103e2..e7f34462f9 100644 --- a/ecrire/inc/ortho.php +++ b/ecrire/inc/ortho.php @@ -22,17 +22,18 @@ function maj_miroirs_ortho() { $miroirs_old[$url] = $index; } - // TODO: recuperer la liste dynamiquement depuis ortho.spip.net - $urls = array( - 'http://tony.ortho.spip.net/ortho_serveur.php', - 'http://spip.destination-linux.org/ortho_serveur.php', - 'http://spip-ortho.linagora.org:18080/ortho_serveur.php', - 'http://ortho.spip.net/ortho_serveur.php' - ); + $page = recuperer_page($GLOBALS['services']['ortho']?$GLOBALS['services']['ortho']:'http://www.spip.net/services/ortho.txt'); + $urls=array(); + foreach(explode("\n", $page) as $ligne) { + if(trim($ligne)=="") continue; + $t= explode(";", $ligne); + $urls[$t[0]]=$t[1]; + } + $liste = array(); $miroirs_new = array(); $index = 1; - foreach ($urls as $url) { + foreach ($urls as $url => $contact) { if ($index_old = $miroirs_old[$url]) { $s = $GLOBALS['meta']["miroir_ortho_$index_old"]; } @@ -498,7 +499,7 @@ function panneau_ortho($ortho_result) { echo "<script type='text/javascript'><!-- var curr_suggest = null; - // http://doc.spip.org/@suggest +// http://doc.spip.org/@suggest function suggest(id) { var menu_box; if (curr_suggest) -- GitLab