diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-04-20 11:52:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-04-20 11:52:50 +0000 |
commit | 8043cb998f3325731bfab8d82251fa49639aec1d (patch) | |
tree | 3774b206865eb631134c447aa36e90af762b8c5b /modules/poll.module | |
parent | 0a966e1ed42d1b7d0827b0318bcefb7101ac56df (diff) | |
download | brdo-8043cb998f3325731bfab8d82251fa49639aec1d.tar.gz brdo-8043cb998f3325731bfab8d82251fa49639aec1d.tar.bz2 |
- Applied Marco's big patch, including contributions from Moshe:
+ Changed the db_query() API.
+ Wrapped all links in l(), lm(), la(), ..., drupal_url() functions.
+ XHTML-ified some HTML.
+ Wrapped a lot of text in the administrative pages in a t()
function.
+ Replaced all $REQUEST_URI/$PATH_INFOs by request_uri().
+ Small bugfixes (eg. bug in book_export_html() and clean-ups (eg.
RSS code).
+ Fixed some bugs in the taxonomy module (eg. tree making bug), added
new functionality (eg. new APIs for use by other modules), included
Moshe's taxonomy extensions, and some documentation udpates.
+ ...
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/poll.module b/modules/poll.module index 26d01c421..d0ab4dbf0 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -20,7 +20,7 @@ function poll_block() { poll_view($poll, 0, 1); } } - $blocks[0][subject] = strtr(t("Latest poll: %t"), array("%t" => $poll->title)); + $blocks[0][subject] = t("Latest poll: %t", array("%t" => $poll->title)); $blocks[0][content] = $poll->body; $blocks[0][info] = t("Most recent poll"); return $blocks; @@ -76,7 +76,7 @@ function poll_form(&$node, &$help, &$error) { for ($a = 0; $a < $node->choices; $a++) { $output .= form_textfield(t("Choice"). " " . ($a + 1), "choice][$a", $node->choice[$a], 50, 127, $error["choice][$a"]); if ($admin) { - $output .= form_textfield(strtr(t("Votes for choice %n"), array("%n" => ($a + 1))), "chvotes][$a", $node->chvotes[$a] ? $node->chvotes[$a] : 0, 7, 7, $error["chvotes][$a"]); + $output .= form_textfield(t("Votes for choice %n", array("%n" => ($a + 1))), "chvotes][$a", $node->chvotes[$a] ? $node->chvotes[$a] : 0, 7, 7, $error["chvotes][$a"]); } } @@ -117,7 +117,7 @@ function poll_insert($node) { function poll_link($type) { if ($type == "menu.create" && user_access("post content")) { - $links[] = "<a href=\"module.php?mod=node&op=add&type=poll\" title=\"". t("Add a new poll.") ."\">". t("create poll") ."</a>"; + $links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), t("Add a new poll.")); } return $links ? $links : array(); @@ -184,7 +184,7 @@ function poll_view(&$node, $main = 0, $block = 0) { /* When a poll is displayed twice on the same page (e.g. on the front page and in the side bar) we only want to vote on one of them. We keep count using $pollid */ - global $pollidcount, $pollvote, $pollid, $REMOTE_ADDR, $REQUEST_URI; + global $pollidcount, $pollvote, $pollid, $REMOTE_ADDR; $pollidcount++; // Only accept votes on specific cases to prevent double voting @@ -215,7 +215,7 @@ function poll_view(&$node, $main = 0, $block = 0) { if ($allowvotes) { // Display the vote form - $url = $REQUEST_URI . (strstr($REQUEST_URI, "?") ? "&" : "?") . "pollid=" . $pollidcount; + $url = request_uri() . (strstr(request_uri(), "?") ? "&" : "?") . "pollid=" . $pollidcount; $output .= "<form action=\"$url\" method=\"post\">"; $output .= "<table border=\"0\" align=\"center\"><tr><td>"; |