# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- C:\Users\gapa\Documents\Downloads\drupal\git\drupal\core\modules\poll\poll.module
+++ C:\Users\gapa\Downloads\drupal-8.x-dev\drupal-8.x-dev\core\modules\poll\poll.module
@@ -104,7 +104,19 @@
 }
 
 /**
- * Callback function to see if a node is acceptable for poll menu items.
+ * Looks if a node is acceptable for poll menu items.
+ *
+ * @param $node
+ *   The poll node object.
+ * @param $perm
+ *   A permission the user must have to view the page.
+ * @param $inspect_allowvotes
+ *   Boolean indicated whether the user can view the individual votes.
+ *
+ * @return
+ *   A render array for a page containing a list of content.
+ *
+ * @see poll_menu()
  */
 function _poll_menu_access($node, $perm, $inspect_allowvotes) {
   return user_access($perm) && ($node->type == 'poll') && ($node->allowvotes || !$inspect_allowvotes);
@@ -123,6 +135,8 @@
  * Implements hook_block_view().
  *
  * Generates a block containing the latest poll.
+ * 
+ * @see poll_block_latest_poll_view()
  */
 function poll_block_view($delta = '') {
   if (user_access('access content')) {
@@ -215,6 +229,12 @@
 
 /**
  * Implements hook_form().
+ *
+ * @see poll_more_choices_submit()
+ * @see poll_node_form_submit()
+ * @see poll_choice_js()
+ * @see _poll_choice_form()
+ * @see poll_teaser()
  */
 function poll_form($node, &$form_state) {
   global $user;
@@ -338,13 +358,19 @@
 }
 
 /**
- * Submit handler to add more choices to a poll form.
+ * Form submission handler for the add more choices button on a poll node form.
  *
  * This handler is run regardless of whether JS is enabled or not. It makes
  * changes to the form state. If the button was clicked with JS disabled, then
  * the page is reloaded with the complete rebuilt form. If the button was
  * clicked with JS enabled, then ajax_form_callback() calls poll_choice_js() to
  * return just the changed part of the form.
+ *
+ * @see poll_form()
+ * @see poll_choice_js()
+ * @see poll_node_form_submit()
+ * @see _poll_choice_form()
+ * @see poll_teaser()
  */
 function poll_more_choices_submit($form, &$form_state) {
   // Add one more choice to the form.
@@ -360,6 +386,18 @@
   $form_state['rebuild'] = TRUE;
 }
 
+/**
+ * Form submit handler for node_form().
+ *
+ * Upon preview and final submission, we need to renumber poll choices and
+ * create a teaser output.
+ *
+ * @see poll_form()
+ * @see poll_choice_js()
+ * @see poll_node_form_submit()
+ * @see poll_more_choices_submit()
+ * @see poll_teaser()
+ */
 function _poll_choice_form($key, $chid = NULL, $value = '', $votes = 0, $weight = 0, $size = 10) {
   $form = array(
     '#tree' => TRUE,
@@ -407,12 +445,16 @@
 }
 
 /**
- * Ajax callback in response to new choices being added to the form.
+ * Ajax callback for adding new choices to the poll node form.
  *
  * This returns the new page content to replace the page content made obsolete
  * by the form submission.
  *
  * @see poll_more_choices_submit()
+ * @see poll_form()
+ * @see poll_node_form_submit()
+ * @see _poll_choice_form()
+ * @see poll_teaser()
  */
 function poll_choice_js($form, $form_state) {
   return $form['choice_wrapper']['choice'];
@@ -423,6 +465,12 @@
  *
  * Upon preview and final submission, we need to renumber poll choices and
  * create a teaser output.
+ *
+ * @see poll_more_choices_submit()
+ * @see poll_form()
+ * @see _poll_choice_form()
+ * @see poll_choice_js()
+ * @see poll_teaser()
  */
 function poll_node_form_submit(&$form, &$form_state) {
   // Renumber choices.
@@ -608,6 +656,9 @@
  *
  * @param $node
  *   The node object to load.
+ *
+ * @see poll_view_results()
+ * @see poll_view()
  */
 function poll_block_latest_poll_view($node) {
   global $user;
@@ -651,6 +702,9 @@
 
 /**
  * Implements hook_view().
+ *
+ * @see poll_view_results()
+ * @see poll_block_latest_poll_view()
  */
 function poll_view($node, $view_mode) {
   global $user;
@@ -669,6 +723,14 @@
  * Creates a simple teaser that lists all the choices.
  *
  * This is primarily used for RSS.
+ * 
+ * @param $node
+ *   The poll node object.
+ * 
+ * @return
+ *   String of choices.
+ * 
+ * @see poll_node_form_submit()
  */
 function poll_teaser($node) {
   $teaser = NULL;
@@ -683,10 +745,17 @@
 }
 
 /**
- * Generates the voting form for a poll.
+ * Form constructor for the poll voting form.
  *
  * @ingroup forms
+ * 
+ * @param $node
+ *   The poll node object.
+ * @param $block
+ *   (optional) TRUE if poll should be done in block. Defaults to FALSE.
+ * 
  * @see poll_vote()
+ * @see poll_view_voting_validate()
  * @see phptemplate_preprocess_poll_vote()
  */
 function poll_view_voting($form, &$form_state, $node, $block = FALSE) {
@@ -724,7 +793,11 @@
 }
 
 /**
- * Validation function for processing votes
+ * Form validation handler for poll_view_voting().
+ *
+ * @see poll_view_voting()
+ * @see phptemplate_preprocess_poll_vote()
+ * @see poll_vote()
  */
 function poll_view_voting_validate($form, &$form_state) {
   if ($form_state['values']['choice'] == -1) {
@@ -733,7 +806,10 @@
 }
 
 /**
- * Submit handler for processing a vote.
+ * Form submission handler for poll_view_voting().
+ *
+ * @see poll_view_voting()
+ * @see phptemplate_preprocess_poll_vote()
  */
 function poll_vote($form, &$form_state) {
   $node = $form['#node'];
@@ -782,9 +858,9 @@
 }
 
 /**
- * Themes the voting form for a poll.
+ * Processes variables for poll-vote.tpl.php.
  *
- * Inputs: $form
+ * @see poll-vote.tpl.php
  */
 function template_preprocess_poll_vote(&$variables) {
   $form = $variables['form'];
@@ -800,6 +876,9 @@
 
 /**
  * Generates a graphical representation of the results of a poll.
+ *
+ * @see poll_block_latest_poll_view()
+ * @see poll_view()
  */
 function poll_view_results($node, $view_mode, $block = FALSE) {
   // Make sure that choices are ordered by their weight.
@@ -893,14 +972,8 @@
 }
 
 /**
- * Preprocess the poll_results theme hook.
+ * Preprocess the poll-results.tpl.php.
  *
- * Inputs: $raw_title, $results, $votes, $raw_links, $block, $nid, $vote. The
- * $raw_* inputs to this are naturally unsafe; often safe versions are
- * made to simply overwrite the raw version, but in this case it seems likely
- * that the title and the links may be overridden by the theme layer, so they
- * are left in with a different name for that purpose.
- *
  * @see poll-results.tpl.php
  * @see poll-results--block.tpl.php
  */
@@ -914,8 +987,11 @@
 }
 
 /**
- * Builds the cancel form for a poll.
+ * Form constructor for the poll cancel form.
  *
+ * @param $nid
+ *   The poll node ID.
+ *
  * @ingroup forms
  * @see poll_cancel()
  */
@@ -936,7 +1012,9 @@
 }
 
 /**
- * Submit callback for poll_cancel_form().
+ * Form submission handler for poll_cancel_form().
+ *
+ * @ingroup forms
  */
 function poll_cancel($form, &$form_state) {
   global $user;
