[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r644 - i18nHTML-docs/WWW
From: |
grothoff |
Subject: |
[GNUnet-SVN] r644 - i18nHTML-docs/WWW |
Date: |
Sun, 10 Apr 2005 23:46:04 -0700 (PDT) |
Author: grothoff
Date: 2005-04-10 23:46:02 -0700 (Sun, 10 Apr 2005)
New Revision: 644
Modified:
i18nHTML-docs/WWW/i18nhtml.inc
Log:
update
Modified: i18nHTML-docs/WWW/i18nhtml.inc
===================================================================
--- i18nHTML-docs/WWW/i18nhtml.inc 2005-04-11 06:41:33 UTC (rev 643)
+++ i18nHTML-docs/WWW/i18nhtml.inc 2005-04-11 06:46:02 UTC (rev 644)
@@ -570,6 +570,25 @@
// database not available, just print English
return $a;
}
+
+ $fp = fopen("/tmp/clone.sql", "a+", 0);
+ $query = "SELECT * FROM map WHERE name=\"$a_sql\" ORDER BY ranking DESC";
+ $result = mysql_query($query, $connection);
+ $num = 0;
+ if ($result)
+ $num = mysql_num_rows($result);
+ $last = "English";
+ for ($i=0;$i<$num;$i++) {
+ $row = mysql_fetch_array($result);
+ if ($last != mysql_real_escape_string($row["lang"])) {
+ $last = mysql_real_escape_string($row["lang"]);
+ $trans = mysql_real_escape_string($row["translation"]);
+ $rank = $row["ranking"];
+ $ip = $row["ip"];
+ fputs($fp, "INSERT INTO map VALUES(\"$a_sql\", \"$last\", \"$trans\",
$rank, \"$ip\");\n");
+ }
+ }
+
if ("English" == $lang) {
// no need to translate english, that's the
// hard-wired source language!
@@ -614,30 +633,11 @@
}
mysql_query($query, $connection);
- /*
- $fp = fopen("/tmp/clone.sql", "a+", 0);
- $query = "SELECT * FROM map WHERE name=\"$a_sql\" ORDER BY ranking DESC";
- $result = mysql_query($query, $connection);
- $num = 0;
- if ($result)
- $num = mysql_num_rows($result);
- $last = "English";
- for ($i=0;$i<$num;$i++) {
- $row = mysql_fetch_array($result);
- if ($last != mysql_real_escape_string($row["lang"])) {
- $last = mysql_real_escape_string($row["lang"]);
- $trans = mysql_real_escape_string($row["translation"]);
- $rank = $row["ranking"];
- $ip = $row["ip"];
- fputs($fp, "INSERT INTO map VALUES(\"$a_sql\", \"$last\", \"$trans\",
$rank, \"$ip\");\n");
- }
- }
- */
-
}
$i18nHTMLhasTranslation = 0; // no translation was found
return $a; // just return English string
} else { // translation available
+
$row = mysql_fetch_array($result);
return $row["translation"];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r644 - i18nHTML-docs/WWW,
grothoff <=