summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-09 21:54:01 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-09 21:54:01 +0000
commit147bb1389a18eca73015390cc46a5fe03abfcb88 (patch)
treec5798ac604e5fd2ded01f15db2f0e422b4077abb /modules/poll/poll.module
parent364238c585cb3c2f64b99a385c577f174cdf1f39 (diff)
downloadbrdo-147bb1389a18eca73015390cc46a5fe03abfcb88.tar.gz
brdo-147bb1389a18eca73015390cc46a5fe03abfcb88.tar.bz2
#571654 follow-up by chx, peximo, plach, sun, et al:
Roll-back of node titles as fields. The Entity Translation module in contrib can add this back, but for everyone else it creates a *huge* WTF. Apologies for how late this is coming, but better now than post-alpha. :\
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 15eb9995d..c267cf260 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -222,6 +222,14 @@ function poll_form($node, &$form_state) {
$form_state['cache'] = TRUE;
+ $form['title'] = array(
+ '#type' => 'textfield',
+ '#title' => check_plain($type->title_label),
+ '#required' => TRUE,
+ '#default_value' => $node->title,
+ '#weight' => -5,
+ );
+
if (isset($form_state['choice_count'])) {
$choice_count = $form_state['choice_count'];
}
@@ -721,7 +729,7 @@ function poll_vote($form, &$form_state) {
function template_preprocess_poll_vote(&$variables) {
$form = $variables['form'];
$variables['choice'] = drupal_render($form['choice']);
- $variables['title'] = check_plain($form['#node']->title[LANGUAGE_NONE][0]['value']);
+ $variables['title'] = check_plain($form['#node']->title);
$variables['vote'] = drupal_render($form['vote']);
$variables['rest'] = drupal_render_children($form);
$variables['block'] = $form['#block'];
@@ -753,7 +761,7 @@ function poll_view_results($node, $view_mode, $block = FALSE) {
}
}
- return theme('poll_results', array('raw_title' => $node->title[LANGUAGE_NONE][0]['value'], 'results' => $poll_results, 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid, 'vote' => isset($node->vote) ? $node->vote : NULL));
+ return theme('poll_results', array('raw_title' => $node->title, 'results' => $poll_results, 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid, 'vote' => isset($node->vote) ? $node->vote : NULL));
}