if (o instanceof IterableDataset) {
IterableDataset id = (IterableDataset) o;
Map<String, Object> subcontext = new HashMap<String, Object>(vars);
- while (id.next(subcontext)) {
+ while (id.next(l, subcontext)) {
body.output(out, l, subcontext);
}
}
import java.util.Map;
+import org.cacert.gigi.Language;
+
/**
* Represents some kind of data, that may be iterated over in a template.
*/
/**
* Moves to the next Dataset.
*
+ * @param l
+ * the language for l10n-ed strings
* @param vars
* the variables used in this template. They need to be updated
* for each line.
* @return true, iff there was a data-line "installed". False of this set is
* already empty.
*/
- public boolean next(Map<String, Object> vars);
+ public boolean next(Language l, Map<String, Object> vars);
}
LinkedList<String> splitted = new LinkedList<String>();
LinkedList<Outputable> commands = new LinkedList<Outputable>();
StringBuffer buf = new StringBuffer();
- int ch = r.read();
outer: while (true) {
while (!endsWith(buf, "<?")) {
+ int ch = r.read();
if (ch == -1) {
break outer;
}
buf.append((char) ch);
- ch = r.read();
}
buf.delete(buf.length() - 2, buf.length());
splitted.add(buf.toString());
buf.delete(0, buf.length());
while (!endsWith(buf, "?>")) {
- buf.append((char) ch);
- ch = r.read();
+ int ch = r.read();
if (ch == -1) {
throw new EOFException();
}
+ buf.append((char) ch);
}
buf.delete(buf.length() - 2, buf.length());
String com = buf.toString().replace("\n", "");
import javax.servlet.http.HttpServletResponse;
import org.cacert.gigi.Certificate;
+import org.cacert.gigi.Language;
import org.cacert.gigi.User;
import org.cacert.gigi.database.DatabaseConnection;
import org.cacert.gigi.output.ClientCSRGenerate;
vars.put("emails", new IterableDataset() {
@Override
- public boolean next(Map<String, Object> vars) {
+ public boolean next(Language l, Map<String, Object> vars) {
try {
if (!rs.next()) {
return false;