[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qsos-commits] qsos/apps/o3s search.php
From: |
Raphaël Semeteys |
Subject: |
[Qsos-commits] qsos/apps/o3s search.php |
Date: |
Sun, 17 May 2009 22:19:19 +0000 |
CVSROOT: /sources/qsos
Module name: qsos
Changes by: Raphaël Semeteys <rsemeteys> 09/05/17 22:19:19
Modified files:
apps/o3s : search.php
Log message:
Localization management
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/o3s/search.php?cvsroot=qsos&r1=1.2&r2=1.3
Patches:
Index: search.php
===================================================================
RCS file: /sources/qsos/qsos/apps/o3s/search.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- search.php 8 Jul 2007 23:21:09 -0000 1.2
+++ search.php 17 May 2009 22:19:19 -0000 1.3
@@ -9,8 +9,7 @@
$searchstr = $_REQUEST['s'];
include("config.php");
-include("fs.functions.php");
-include("locales/$lang.php");
+include("lang.php");
echo "<html>\n";
echo "<head>\n";
@@ -22,7 +21,7 @@
echo "<img src='skins/$skin/o3s.png'/>\n";
echo "<br/><br/>\n";
-echo "<p><form action='$PHP_SELF' method='post'>\n";
+echo "<p><form action='$_SERVER[PHP_SELF]' method='post'>\n";
echo " <input type='text' name='s' value='$searchstr' size='20'
maxlength='30'/>\n";
echo " <input type='submit'
value='".$msg['s1_button_search']."'/><br/><br/>\n";
echo " <input type='button' value='".$msg['s1_button_back']."'
onclick=\"location.href='index.php'\"/>\n";
@@ -43,19 +42,17 @@
// filename: line
// So, we use split() to split the data
list($fname, $fline) = split(':', $buffer, 2);
- $fname = trim($fname);
- // we take only the first hit per file matching the
locale filter
- if (isLocalizedName($fname, $locale) && !
defined($myresult[$fname])) {
+ // we take only the first hit per file
+ if (! defined($myresult[$fname])) {
$myresult[$fname] = $fline;
}
}
-
// we have results in a hash. lets walk through it and print it
if (count($myresult)) {
echo '<ul><br/>';
while (list($fname, $fline) = each ($myresult)) {
$name = basename($fname, ".qsos");
- echo "<li><a
href='show.php?svg=yes&s=$searchstr&f[]=$fname'>$name</a></li>\n";
+ echo "<li><a
href='show.php?lang=$lang&svg=yes&s=$searchstr&id[]=$name'>$name</a></li>\n";
}
echo '</ul><br/>';
} else {
@@ -63,7 +60,7 @@
echo
$msg['s1_search_msg1']."<strong>$searchstr</strong>".$msg['s1_search_msg2']."<br/>\n";
}
pclose($fp);
-}
+ }
echo "</body>\n";
echo "</html>\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qsos-commits] qsos/apps/o3s search.php,
Raphaël Semeteys <=