Issue #2601116 by heykarthikwithu: Remove various unused variables from the Poll module

merge-requests/26/head
David Rothstein 2016-01-30 16:22:38 -05:00
parent bdd6ba5a6a
commit c661e1ced4
1 changed files with 1 additions and 7 deletions

View File

@ -631,9 +631,6 @@ function poll_delete($node) {
* The node object to load.
*/
function poll_block_latest_poll_view($node) {
global $user;
$output = '';
// This is necessary for shared objects because PHP doesn't copy objects, but
// passes them by reference. So when the objects are cached it can result in
// the wrong output being displayed on subsequent calls. The cloning and
@ -674,9 +671,6 @@ function poll_block_latest_poll_view($node) {
* Implements hook_view().
*/
function poll_view($node, $view_mode) {
global $user;
$output = '';
if (!empty($node->allowvotes) && empty($node->show_results)) {
$node->content['poll_view_voting'] = drupal_get_form('poll_view_voting', $node);
}
@ -694,7 +688,7 @@ function poll_view($node, $view_mode) {
function poll_teaser($node) {
$teaser = NULL;
if (is_array($node->choice)) {
foreach ($node->choice as $k => $choice) {
foreach ($node->choice as $choice) {
if ($choice['chtext'] != '') {
$teaser .= '* ' . check_plain($choice['chtext']) . "\n";
}