Skip to content

Commit

Permalink
Quelques corrections pour la recherche...
Browse files Browse the repository at this point in the history
  • Loading branch information
gleu committed Feb 23, 2013
1 parent 7a1b5f7 commit 269feed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion www-docs.postgresql.fr/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

$recherche_value = strlen($recherche)>0 ? $recherche : 'Rechercher';

$pgconn = @pg_connect("host=localhost dbname=docspgfr user=docspgfr") or die('Connexion impossible');
$pgconn = pg_connect("host=somehost dbname=somedb user=someuser password=somepassword") or die('Connexion impossible');

$query = "SET client_encoding TO utf8;";
$result = pg_query($pgconn, $query);
Expand Down
12 changes: 6 additions & 6 deletions www-docs.postgresql.fr/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$recherche_value = strlen($recherche)>0 ? $recherche : 'Rechercher';

$pgconn = @pg_connect("host=localhost dbname=docspgfr user=docspgfr") or die('Connexion impossible');
$pgconn = pg_connect("host=somehost dbname=somedb user=someuser password=somepassword") or die('Connexion impossible');

$query = "SET client_encoding TO utf8;";
$result = pg_query($pgconn, $query);
Expand Down Expand Up @@ -43,8 +43,8 @@ function addEngine(name,ext,cat,type)
{
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
window.sidebar.addSearchEngine(
"http://docs.postgresqlfr.org/addon/"+name+".src",
"http://docs.postgresqlfr.org/addon/"+name+"."+ext,
"http://docs.postgresql.fr/addon/"+name+".src",
"http://docs.postgresql.fr/addon/"+name+"."+ext,
name,
cat );
} else {
Expand Down Expand Up @@ -141,7 +141,7 @@ function addEngine(name,ext,cat,type)

while ($ligne = pg_fetch_array($result)) {
echo '<li>
<a href="http://docs.postgresqlfr.org/'.$version[$ligne['version']].'/'.$ligne['url'].'">Manuel PostgreSQL '.$version[$ligne['version']].', '.$ligne['titre'].'</a></li>';
<a href="http://docs.postgresql.fr/'.$version[$ligne['version']].'/'.$ligne['url'].'">Manuel PostgreSQL '.$version[$ligne['version']].', '.$ligne['titre'].'</a></li>';
}

$result = pg_query($pgconn, $query);
Expand Down Expand Up @@ -207,7 +207,7 @@ function addEngine(name,ext,cat,type)

while ($ligne = pg_fetch_array($result)) {
echo '<li>
<a href="http://docs.postgresqlfr.org/'.$version[$ligne['version']].'/'.$ligne['url'].'">Manuel PostgreSQL '.$version[$ligne['version']].', '.$ligne['titre'].'</a> ['.$ligne['score'].' %]<br/>
<a href="http://docs.postgresql.fr/'.$version[$ligne['version']].'/'.$ligne['url'].'">Manuel PostgreSQL '.$version[$ligne['version']].', '.$ligne['titre'].'</a> ['.$ligne['score'].' %]<br/>
...'.$ligne['resume'].'...<br/>&nbsp;<br/>
</li>';
}
Expand All @@ -227,7 +227,7 @@ function addEngine(name,ext,cat,type)
echo "<p>Peut-être cherchez-vous :</p><ul>";
while ($ligne = pg_fetch_array($result)) {
echo '<li>
<a href="http://docs.postgresqlfr.org/search.php?v='.$filtreversion.'&q='.$ligne['mot'].'">'.$ligne['mot'].'</a> ['.$ligne['sml'].' %]</li>';
<a href="http://docs.postgresql.fr/search.php?v='.$filtreversion.'&q='.$ligne['mot'].'">'.$ligne['mot'].'</a> ['.$ligne['sml'].' %]</li>';
}
echo "</ul>";
}
Expand Down
6 changes: 5 additions & 1 deletion www-docs.postgresql.fr/tools/addrelease.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function usage() {

$PGPASSWORD = getenv('PGPASSWORD');

$g_passwordrequired = false;
$tags1 = '';
$tags2 = '';

// Déchiffrage des options en ligne de commande
for ($i = 1; $i < $_SERVER["argc"]; $i++) {
switch($_SERVER["argv"][$i]) {
Expand Down Expand Up @@ -94,7 +98,7 @@ function usage() {
$version_int = 902;
break;
default:
echo "Il s'agit d'une version majeure : 8.1, 8.2, 8.3, 8.4, 9.0 ou 9.1.\n";
echo "Il s'agit d'une version majeure : 8.1, 8.2, 8.3, 8.4, 9.0, 9.1 ou 9.2.\n";
exit;
break;
}
Expand Down

0 comments on commit 269feed

Please sign in to comment.